AMDTPowerProfileAPI Library

CodeXL

PreviousNext
CodeXL User Guide
Help > Using CodeXL > Power Profiler > AMDTPowerProfileAPI Library
AMDTPowerProfileAPI Library

The CodeXL Power Profile API library is useful to analyze the energy efficiency of systems based on AMD CPUs, APUs and dGPUs (Discrete GPU). These APIs provide interface to read the power, thermal and frequency characteristics of APU/dGPU and their subcomponents.

These APIs are targeted for software developers who want to write their own application to sample the power counters based on their specific use case.

For detail information of these APIs, refer AMDTPowerProfileAPI.chm (on Windows platforms) or AMDTPowerProfileAPI.pdf (on Linux based platforms) file in the SDK/AMDTPowerProfile/doc subdirectory under the CodeXL installation directory.

 

AMDTPowerProfileAPI shared library has dependencies on AMDTBaseTools and AMDTOSWrappers shared libraries, so the corresponding .DLL (on Windows system) and .SO (on Linux system) should be added.

 

To build and execute a test application (test.cpp) following steps should be performed on Linux machine.

1.       Assuming test.cpp is located at  in /home/<user-dir>/samples

$ cd /home/<user-dir>/samples

2.       Set LD_LIBRARY_PATH

$ export LD_LIBRARY_PATH=<codexl-install-dir>

3.       Compile application code

$ g++ test.cpp –I<codexl-install-dir>/SDK/AMDTPowerProfile/inc –L<codexl-install-dir>/SDK/AMDTPowerProfile/bin/x86_64 –lAMDTPowerProfileAPI -L<codexl-install-dir> -lAMDTOSWrappers -lAMDTBaseTools -o test

4.       Execute

$ ./test