8 lines
146 B
Python
Executable File
8 lines
146 B
Python
Executable File
#!/usr/bin/python3
|
|
|
|
from pynvml import *
|
|
|
|
nvmlInit()
|
|
handle = nvmlDeviceGetHandleByIndex(0)
|
|
print(str(nvmlDeviceGetUtilizationRates(handle).gpu))
|