mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
cuda exception handler
This commit is contained in:
+5
-2
@@ -18,8 +18,11 @@ def _join_rocm_home(*paths) -> str:
|
||||
|
||||
|
||||
def is_zluda(device: DeviceLikeType):
|
||||
device = torch.device(device)
|
||||
return torch.cuda.get_device_name(device).endswith("[ZLUDA]")
|
||||
try:
|
||||
device = torch.device(device)
|
||||
return torch.cuda.get_device_name(device).endswith("[ZLUDA]")
|
||||
except Exception:
|
||||
return False
|
||||
|
||||
|
||||
def test(device: DeviceLikeType) -> Union[Exception, None]:
|
||||
|
||||
Reference in New Issue
Block a user