Skip to content

Conversation

@wangxiyuan
Copy link
Collaborator

@wangxiyuan wangxiyuan commented Oct 31, 2025

This PR cherry-pick two commit from main to upgrade torch-npu to 2.7.1 official release

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: vllm-project#3342

- vLLM version: v0.11.0rc3
- vLLM main:
vllm-project/vllm@c9461e0

Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com>
Upgrade torch-npu to the official release version 2.7.1

- vLLM version: v0.11.0
- vLLM main:
vllm-project/vllm@83f478b

---------

Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com>
@github-actions
Copy link

👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:‌‌

  • A PR should do only one thing, smaller PRs enable faster reviews.
  • Every PR should include unit tests and end-to-end tests ‌to ensure it works and is not broken by other future PRs.
  • Write the commit message by fulfilling the PR description to help reviewer and future developers understand.

If CI fails, you can run linting and testing checks locally according Contributing and Testing.

@github-actions github-actions bot added documentation Improvements or additions to documentation module:tests module:ops module:core labels Oct 31, 2025
@wangxiyuan wangxiyuan added ready read for review ready-for-test start test by label for PR labels Oct 31, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request pins the torch and torch-npu dependencies to version 2.7.1. This is reflected in the build files, requirement files, and documentation. As a result of this version pinning, a significant amount of conditional logic and version checks (version_check()) have been removed from the codebase, leading to a good simplification. The tests have also been updated accordingly.

However, I've found a critical issue in requirements.txt where the --extra-index-url needed to locate the torch-npu package has been commented out. This will likely break the installation process for users.

@wangxiyuan wangxiyuan merged commit 8a71540 into vllm-project:v0.11.0-dev Oct 31, 2025
40 checks passed
@wangxiyuan wangxiyuan deleted the chery-pick-271 branch November 18, 2025 08:59
liquan31 pushed a commit to liquan31/vllm-ascend that referenced this pull request Dec 5, 2025
This PR cherry-pick two commit from main to upgrade torch-npu to 2.7.1
official release

---------

Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com>
Clorist33 pushed a commit to Clorist33/vllm-ascend that referenced this pull request Dec 9, 2025
This PR cherry-pick two commit from main to upgrade torch-npu to 2.7.1
official release

---------

Signed-off-by: wangxiyuan <wangxiyuan1007@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation module:core module:ops module:tests ready read for review ready-for-test start test by label for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant