Skip to content

Commit f8627fc

Browse files
committed
fix build in cpu env
1 parent 66d2a58 commit f8627fc

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
requires = [
33
"setuptools>=64",
44
"cmake>=3.18",
5-
"torch>=2.5.1",
65
"wheel",
76
]
87
build-backend = "setuptools.build_meta"

setup.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,8 @@ def build_cmake(self, ext: CMakeExtension):
7676
cmake_args += ["-DRUNTIME_ENVIRONMENT=maca"]
7777
cmake_args += ["-DBUILD_UCM_SPARSE=OFF"]
7878
case _:
79-
import torch
80-
81-
if hasattr(torch, "cuda") and torch.cuda.is_available():
82-
cmake_args += ["-DRUNTIME_ENVIRONMENT=cuda"]
83-
else:
84-
cmake_args += ["-DRUNTIME_ENVIRONMENT=ascend"]
79+
cmake_args += ["-DRUNTIME_ENVIRONMENT=simu"]
80+
cmake_args += ["-DBUILD_UCM_SPARSE=OFF"]
8581

8682
subprocess.check_call(
8783
["cmake", *cmake_args, ext.cmake_file_path], cwd=build_dir

0 commit comments

Comments
 (0)