OpenCL-101
OpenCL-101 copied to clipboard
How to adjust and query AMD GPU clock frequency?
I found a command using sudo aticonfig
(from this link: [ubuntu] How to adjust GPU and graphic memory frequency?), below is the part of result of this command execution about frequency:
AMD Overdrive (TM) options
AMD Overdrive (TM) options:
The following options are used to get and set current and peak, core
and memory clock information as well as read the current temperature of
adapters. By using the "--adapter=" argument the AMD Overdrive (TM)
options can be targeted to a particular adapter in a multi-adapter scenario.
If no adapter is explicitly targeted the commands will be run on the Default
adapter as indicated by the "--list-adapters" command
--od-enable
Unlocks the ability to change core or memory clock values by
acknowledging that you have read and understood the AMD Overdrive (TM)
disclaimer and accept responsibility for and recognize the potential
dangers posed to your hardware by changing the default core or memory
clocks
--od-disable
Disables AMD Overdrive(TM) set related aticonfig options. Previously
commited core and memory clock values will remain, but will not be set
on X Server restart.
--odgc, --od-getclocks
Lists various information regarding current core and memory clock
settings.
Including: current and peak clocks
the theoretical range clocks can be set to
the current load on the GPU
--odsc, --od-setclocks={NewCoreClock|0,NewMemoryClock|0}
Sets the core and memory clock to the values specified in MHz
The new clock values must be within the theoretical ranges provided
by --od-getclocks. If a 0 is passed as either the NewCoreClock or
NewMemoryClock it will retain the previous value and not be changed.
There is no guarantee that the attempted clock values will succeed
even if they lay inside the theoretical range. These newly set
clock values will revert to the default values if they are not
committed using the "--od-commitclocks" command before X is
restarted
--odrd, --od-restoredefaultclocks
Sets the core and memory clock to the default values.
Warning X needs to be restarted before these clock changes will take
effect
--odcc, --od-commitclocks
Once the stability of a new set of custom clocks has been proven this
command will ensure that the Adapter will attempt to run at these new
values whenever X is restarted
--odgt, --od-gettemperature
Returns the temperature reported by any thermal sensors available on
the adapter.
PowerXpress options
PowerXpress options:
Warning: Configure PowerXpress in console mode is not always be guaranteed to have effect.
--px-list-active-gpu
--pxl
List current activated GPU
--px-dgpu
Activate discrete GPU (High-Performance mode), must re-start X to take effect
--px-igpu
Activate integrated GPU (Power-Saving mode), must re-start X to take effect
Relative issues:
- How to set Performance mode for AMD GPU · Issue #327 · clMathLibraries/clBLAS https://github.com/clMathLibraries/clBLAS/issues/327
- Support AMD Embedded R-Series RX-416GD Radeon R6? · Issue #27 · ROCmSoftwarePlatform/MIOpen https://github.com/ROCmSoftwarePlatform/MIOpen/issues/27
aticonfig
I tried PowerXpress options but result is disappointing.
gpu@gpu-FP4:~/yuanshuai/code/CLBlast/build$ sudo aticonfig --px-list-active-gpu
PowerXpress: Discrete GPU is active (High-Performance mode).
gpu@gpu-FP4:~/yuanshuai/code/CLBlast/build$ sudo aticonfig --pxl
PowerXpress: Discrete GPU is active (High-Performance mode).
gpu@gpu-FP4:~/yuanshuai/code/CLBlast/build$ sudo aticonfig --px-dgpu
gpu@gpu-FP4:~/yuanshuai/code/CLBlast/build$ sudo aticonfig --pxl
PowerXpress: Discrete GPU is active (High-Performance mode).
gpu@gpu-FP4:~/yuanshuai/code/CLBlast/build$ sudo aticonfig --px-dgpu
gpu@gpu-FP4:~/yuanshuai/code/CLBlast/build$ sudo aticonfig --pxl
PowerXpress: Discrete GPU is active (High-Performance mode).
gpu@gpu-FP4:~/yuanshuai/code/CLBlast/build$ sudo aticonfig --px-list-active-gpu
PowerXpress: Discrete GPU is active (High-Performance mode).
gpu@gpu-FP4:~/yuanshuai/code/CLBlast/build$ sudo aticonfig --px-list-active-gpu
PowerXpress: Discrete GPU is active (High-Performance mode).
I also tried AMD Overdrive (TM) options
but result is disappointing, either.
gpu@gpu-FP4:~/yuanshuai/code/CLBlast/build$ sudo aticonfig --odgt
ERROR - X needs to be running to perform AMD Overdrive(TM) commands
gpu@gpu-FP4:~/yuanshuai/code/CLBlast/build$ sudo aticonfig --od-enalbe
aticonfig: unrecognized option '--od-enalbe'
aticonfig: parsing the command-line failed.
gpu@gpu-FP4:~/yuanshuai/code/CLBlast/build$ sudo aticonfig --od-enable
AMD Overdrive(TM) enabled
gpu@gpu-FP4:~/yuanshuai/code/CLBlast/build$ sudo aticonfig --odgc
ERROR - X needs to be running to perform AMD Overdrive(TM) commands
gpu@gpu-FP4:~/yuanshuai/code/CLBlast/build$ sudo aticonfig --od-getclocks
ERROR - X needs to be running to perform AMD Overdrive(TM) commands
gpu@gpu-FP4:~/yuanshuai/code/CLBlast/build$ sudo aticonfig --odrd
ERROR - X needs to be running to perform AMD Overdrive(TM) commands
Afterwards, I use a screen to adjust. Of course, errors (ERROR - X needs to be running to perform AMD Overdrive(TM) commands
) are fixed. However, the frequency still can't be adjusted.
Besides, I found a tool named AGT from this link: Manage your GPU HW · amd/OpenCL-caffe Wiki. However, it seems a window tool (Download AMD GPU Clock Tool | TechPowerUp or download from Guru3D.com), not Linux.