[Build] Force torch version (#3791)

We notice that sometimes user build vllm-ascend with incorrect torch
version. In this case, the build is passed, but when running the code,
the error `AttributeError: '_OpNamespace' '_C_ascend' object has no
attribute 'weak_ref_tensor'` is raised. Let's force the torch version to
2.7.1 and check the torch version when build from source to fix the
issue.

closes: #3342

- vLLM version: v0.11.0rc3
- vLLM main:
c9461e05a4

Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com>
This commit is contained in:
wangxiyuan
2025-10-30 15:53:15 +08:00
committed by GitHub
parent ff47524b88
commit 10772d94e3
8 changed files with 15 additions and 8 deletions

View File

@@ -11,7 +11,7 @@ scipy
pandas
setuptools>=64
setuptools-scm>=8
torch>=2.7.1
torch==2.7.1
torchvision
wheel
pandas-stubs