Spaces:
Running
on
Zero
Running
on
Zero
Upload folder using huggingface_hub
Browse files- modules/Device/Device.py +2 -2
modules/Device/Device.py
CHANGED
@@ -1457,9 +1457,9 @@ def should_use_fp16(
|
|
1457 |
if torch.version.hip:
|
1458 |
return True
|
1459 |
|
1460 |
-
|
1461 |
props = torch.cuda.get_device_properties("cuda")
|
1462 |
-
|
1463 |
return False
|
1464 |
if props.major >= 8:
|
1465 |
return True
|
|
|
1457 |
if torch.version.hip:
|
1458 |
return True
|
1459 |
|
1460 |
+
if torch.cuda.is_available():
|
1461 |
props = torch.cuda.get_device_properties("cuda")
|
1462 |
+
else:
|
1463 |
return False
|
1464 |
if props.major >= 8:
|
1465 |
return True
|