Skip to content

Commit 626d6b8

Browse files
committed
revert unnecessary
Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com>
1 parent a03a107 commit 626d6b8

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ requires = [
1212
"scipy",
1313
"setuptools>=64",
1414
"setuptools-scm>=8",
15-
"torch==2.7.1",
15+
"torch-npu==2.7.1.dev20250724",
16+
"torch>=2.7.1",
1617
"torchvision",
1718
"wheel",
1819
"msgpack",

requirements.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pyyaml
1010
scipy
1111
setuptools>=64
1212
setuptools-scm>=8
13-
torch==2.7.1
13+
torch>=2.7.1
1414
torchvision
1515
wheel
1616

@@ -21,3 +21,7 @@ quart
2121
# Required for N-gram speculative decoding
2222
numba
2323

24+
# Install torch_npu
25+
--pre
26+
--extra-index-url https://mirrors.huaweicloud.com/ascend/repos/pypi
27+
torch-npu==2.7.1.dev20250724

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,9 @@ def configure(self, ext: CMakeExtension) -> None:
202202

203203
torch_npu_command = "python3 -m pip show torch-npu | grep '^Location:' | awk '{print $2}'"
204204
try:
205-
# torch_npu_path = subprocess.check_output(
206-
# torch_npu_command, shell=True).decode().strip()
207-
torch_npu_path = "/usr/local/lib/python3.11/site-packages/torch_npu"
205+
torch_npu_path = subprocess.check_output(
206+
torch_npu_command, shell=True).decode().strip()
207+
torch_npu_path += "/torch_npu"
208208
except subprocess.CalledProcessError as e:
209209
raise RuntimeError(f"Retrieve torch version version failed: {e}")
210210

0 commit comments

Comments
 (0)