-
Notifications
You must be signed in to change notification settings - Fork 1
/
radeon_gpu2.py
50 lines (40 loc) · 1.13 KB
/
radeon_gpu2.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
from gpu_check import *
try:
from pyamdgpuinfo import *
except:
print("pyamdgpuinfo not installed")
print("Trying to install pyamdgpuinfo")
import subprocess
subprocess.call(['pip', 'install', 'pyamdgpuinfo' ])
finally:
if "amd" in gpu_info:
from pyamdgpuinfo import *
def total_amd_gpu(ID):
return get_gpu(ID)
def amd_gpu_core_clock(ID):
sclk = total_amd_gpu(ID).query_sclk()
return sclk
def amd_gpu_mem_clock(ID):
mclk =total_amd_gpu(ID).query_mclk()
return mclk
def amd_gpu_vram_usage(ID):
vram_usage = total_amd_gpu(ID).query_vram_usage()
return vram_usage
def amd_gpu_gtt(ID):
gtt = total_amd_gpu(ID).query_gtt_usage()
return gtt
def amd_gpu_temp(ID):
temp = total_amd_gpu(ID).query_temperature()
return temp
def amd_gpu_load(ID):
load = total_amd_gpu(ID).query_load()
return load
def amd_gpu_power(ID):
power = total_amd_gpu(ID).query_power
return power
def amd_gpu_nbrig_vol(ID):
nbrig = total_amd_gpu(ID).query_northbridge_voltage()
return nbrig
def amd_gpu_vol(ID):
gvol = total_amd_gpu(ID).query_graphics_voltage()
return gvol