mirror of
https://github.com/denizsafak/abogen.git
synced 2026-07-18 21:50:28 +02:00
Update GPU check logic
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import gpustat
|
||||
|
||||
def check():
|
||||
stats = gpustat.new_query()
|
||||
for gpu in stats.gpus:
|
||||
print(gpu.name)
|
||||
if 'nvidia' in gpu.name.lower():
|
||||
return True
|
||||
return False
|
||||
|
||||
if __name__ == "__main__":
|
||||
print(check())
|
||||
Reference in New Issue
Block a user