Reputation: 75
I'm looking to find the utilisation percentage of the core of an AMD graphics card. I also need to write a function which will output the name of the graphics card, i.e. AMD Radeon R9 380.
I have seen options such as GPUtil which work well for NVIDIA cards. Here is the function I wrote for the NVIDIA side, to get an idea.
def N_gpu_util_timer(self):
for n in range(10):
GPUs = GPUtil.getGPUs()
gpu_load = GPUs[0].load
Graph_Util.gpu_y.append(gpu_load)
Graph_Util.time_x.append(n)
time.sleep(1)
print(Graph_Util.gpu_y)
print('gpu done')
Upvotes: 2
Views: 2031
Reputation: 3461
Try PyADL. Using this PyADL library you could get from it ADLManager.getInstance().getDevices()
and device.getCurrentUsage()
.
As I mentioned in the comment, GPUtils will not work with AMD graphics cards. It was written for NVIDIA graphics cards.
Upvotes: 3