Spaces:
Running
on
Zero
Running
on
Zero
Update modules/Device/Device.py
Browse files- modules/Device/Device.py +2 -2
modules/Device/Device.py
CHANGED
|
@@ -89,9 +89,9 @@ def get_torch_device() -> torch.device:
|
|
| 89 |
if is_intel_xpu():
|
| 90 |
return torch.device("xpu", torch.xpu.current_device())
|
| 91 |
else:
|
| 92 |
-
|
| 93 |
return torch.device(torch.cuda.current_device())
|
| 94 |
-
|
| 95 |
return torch.device("cpu")
|
| 96 |
|
| 97 |
|
|
|
|
| 89 |
if is_intel_xpu():
|
| 90 |
return torch.device("xpu", torch.xpu.current_device())
|
| 91 |
else:
|
| 92 |
+
if is_nvidia():
|
| 93 |
return torch.device(torch.cuda.current_device())
|
| 94 |
+
else:
|
| 95 |
return torch.device("cpu")
|
| 96 |
|
| 97 |
|