Add support for any number of GPUs

This commit is contained in:
askiiart 2022-10-22 18:09:47 -05:00
parent c0bf1cdf2b
commit c3de89f678

View file

@ -2,8 +2,7 @@ import GPUtil
import time
gpus = GPUtil.getGPUs()
gpu = gpus[0]
while True:
print(str(gpu.temperature) + " C")
print(str(max(gpu.temperature for gpu in gpus)) + " C")
time.sleep(3)