was-node-suite-comfyui icon indicating copy to clipboard operation
was-node-suite-comfyui copied to clipboard

Passthrough_Stat_System update to add AMD GPU data on linux with pyamdgpuinfo

Open ricperry opened this issue 1 year ago • 0 comments

I'm not sure if you have time or the capacity to throw a little love toward us linux AMD GPU users. But if you do, the pyamdgpuinfo package seems to be pretty easy and straightforward. It's got polling, and all the data equivalent to the nvidia stuff in pytorch.

Pretty simple:

>>> import pyamdgpuinfo
>>> n_devices = pyamdgpuinfo.detect_gpus()
>>> print(n_devices)
1
>>> first_gpu = pyamdgpuinfo.get_gpu(0)
>>> print(first_gpu.memory_info)
{'vram_size': 17105879040, 'gtt_size': 16761364480, 'vram_cpu_accessible_size': 17105879040}
>>> vram_usage = first_gpu.query_vram_usage()
>>> print(vram_usage)
11448217600
>>> gpu_load = first_gpu.query_load()
>>> print(gpu_load)
0.0

ricperry avatar May 03 '24 20:05 ricperry