GPUOpen-Tools / gpu_performance_api

GPU Performance API for AMD GPUs
MIT License
251 stars 46 forks source link

Fixing frequency for GPU #13

Closed sergei-sl closed 6 years ago

sergei-sl commented 7 years ago

Hi, I'm trying to use GPA library, but I believe that the values of GPU performance counters strongly depend on the current GPU frequency. Is there any software way to force GPU to work on certain frequency? Global WattMan (which comes with AMD drivers for graphics cards) provides the opportunity to fix the frequency on the selected level, but I'd like to do it automatically in my application. Also, is there a counter, which shows GPU frequency?

ysh329 commented 6 years ago

same issue

chesik-amd commented 6 years ago

Hello. GPUPerfAPI 3.0 which has just been released has support for using stable GPU clocks while profiling. Take a look at the flags parameter of the GPA_OpenContext function:

https://github.com/GPUOpen-Tools/GPA/blob/master/Src/GPUPerfAPI-Common/GPUPerfAPI.h#L119

and the clock mode bits in the GPA_OpenContext_Bits type:

https://github.com/GPUOpen-Tools/GPA/blob/master/Src/GPUPerfAPI-Common/GPUPerfAPITypes.h#L183