We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e3742d3 commit 1f4ffdbCopy full SHA for 1f4ffdb
tilelang/utils/device.py
@@ -1,7 +1,14 @@
1
import torch
2
3
IS_CUDA = torch.cuda.is_available()
4
-IS_MPS = torch.mps.is_available()
+
5
+IS_MPS = False
6
+try:
7
+ IS_MPS = torch.backends.mps.is_available()
8
+except AttributeError:
9
+ print("MPS backend is not available in this PyTorch build.")
10
+except Exception as e:
11
+ print(f"An unexpected error occurred while checking MPS availability: {e}")
12
13
14
def get_current_device():
0 commit comments