We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 098130d commit 17a3d54Copy full SHA for 17a3d54
1 file changed
tests/config.py
@@ -57,6 +57,18 @@ def is_supported(self, device: DeviceType) -> bool:
57
# Triton requires GPU/XPU
58
if not (torch.cuda.is_available() or (hasattr(torch, "xpu") and torch.xpu.is_available())):
59
return False
60
+ if self == Backend.foreach:
61
+ # skip foreach on CPU
62
+ if device == DeviceType.cpu:
63
+ return False
64
+ # forach has limited support on MPS/XPU
65
+ if (hasattr(torch.backends, "mps") and torch.backends.mps.is_available()) or (
66
+ hasattr(torch, "xpu") and torch.xpu.is_available()
67
+ ):
68
69
+ # foreach wors best on CUDA devices
70
+ if not torch.cuda.is_available():
71
72
return True
73
74
0 commit comments