From c3de89f678b699c661a87d9505e166d5944ce1ae Mon Sep 17 00:00:00 2001 From: askiiart Date: Sat, 22 Oct 2022 18:09:47 -0500 Subject: [PATCH] Add support for any number of GPUs --- Demos/{gpu_temp.py => gpu_temp_demo.py} | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) rename Demos/{gpu_temp.py => gpu_temp_demo.py} (57%) diff --git a/Demos/gpu_temp.py b/Demos/gpu_temp_demo.py similarity index 57% rename from Demos/gpu_temp.py rename to Demos/gpu_temp_demo.py index 588fe3d..ebe2234 100644 --- a/Demos/gpu_temp.py +++ b/Demos/gpu_temp_demo.py @@ -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)