Skip to content

Commit 313e883

Browse files
authored
Fall back to CPU if no compute framework is found (#176)
1 parent f32e3cd commit 313e883

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/kernels/utils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,7 @@ def build_variant() -> str:
6565
cann_major, cann_minor = get_cann_version()[0], get_cann_version()[2]
6666
compute_framework = f"cann{cann_major}{cann_minor}"
6767
else:
68-
raise AssertionError(
69-
"Torch was not compiled with CUDA, Metal, XPU, NPU, or ROCm enabled."
70-
)
68+
compute_framework = "cpu"
7169

7270
torch_version = parse(torch.__version__)
7371
cpu = platform.machine()

0 commit comments

Comments
 (0)