I look for a software measurement tool or an API I can include to know my kernel power consumption during execution on GPU / linux. How can I do that? With GPUperf?
You can use the Power Profiling capabilities of AMD CodeXL to measure power consumed by the internal GPU of an AMD APU processor.
CodeXL's upcoming release will also support power profiling on discrete AMD GPUs.
Profiling shows the power consumed by the whole GPU and not just your specific kernel execution. If there are no other significant workloads running on the GPU then this profile can be used to give a fair estimation of your kernel's power consumption.
Note: Only recently released models of APUs and GPUs are supported:
CodeXL includes a graphic client as well as a command line tool for power profiling.
AMD CodeXL can be freely downloaded from the CodeXL web page
Yes, thank you.
I've tried with CodeXL. Before running an opencl program I tried first with a small program that runs only on CPU and I dont understand why the power is 16W for the GPU and only 0.12W for the CPU... I expected to be the opposite because in that case I dont use the GPU... Is there an explanation? It is a Kaveri A10 7850K. And CodeXL Version 1.7.7300.0
Can you try using command line tool and let us know how these power values are appearing.
Command to collect power values using command line tool
CodeXLPowerProfile.exe -P Power -T 100 -d 50 -o /tmp/output.txt
Please use "CodeXLPowerProfile.exe -h" to know about all the options
You can try following:
Here are some results of the command
/opt/AMD/CodeXL/CodeXLPowerProfiler -P power -T 100 -d 50 -o /tmp/output_file.txt
|RecordId Timestamp||pcie-ctrl-power mem-ctrl-power||total-apu-power display-ctrl-powe cpu-cu0-power||cpu-cu1-power||igpu-power|
Do you have AMD Catalyst graphics driver installed in your machine? If catalyst is not installed, low power state will not be enabled and you are expected to see more power consumption. If you haven't installed catalyst graphics driver. Please install and let us know the result.
Not yet... I have troubles installing the latest Catalyst drivers (15.7) on ubuntu server x64 (14.04.3 LTS)...
System doesn't start correctly... black screen with white cursor for me...
Looks like Catalyst driver is installed now.
You can try following again:
Seems like the minimal resolution of power measurement profiling is 20ms... What is the resolution for the "timeline profiling"? Is it the same? 20ms?
The Application Timeline Trace profile session traces OpenCL and DirectCompute API calls and their respective GPU async invocations. These are presented on a timeline scale with a fine resolution of 1 microsecond.
The timeline of the Power Profiler has a minimal resolution of 20 milliseconds as you have noted.
On my ubuntu 14.04.1 I just updated the drivers with sudo apt-get -y install fglrx-updates and the module loaded is then fglrx 15.20.3 [Sep 8 2015]
I run latest CodeXL but I dont undestand the error message: