1

I am trying to estimate the power consumption of my OpenCL Kernel running on AMD Radeon RX Vega GPU. is there a way to access the power consumption through OpenCL directly?

I tried using profilers but could not find one that supports amd GPUs or opencl. so I want to do it through programming if that's possible

Lama RL
  • 31
  • 3
  • Even radeon-profile doesn't report power consumption so it might not be possible programmatically. It does report GPU usage as a percentage though which might be as close as you can get. Good question. – Simon Goater Nov 21 '22 at 11:57

1 Answers1

2

I now managed to access the average power consumption of the GPU (provided in mW) through the rocm_smi library. this is a little tricky and more of an estimate because it is hard to call while the kernel is launched. However, if the kernel's runtime is long enough, I can run rocm_smi from command line and get the average power consumption during the kernel's launch.

Lama RL
  • 31
  • 3