Skip to content

Bump torch version to 2.7.1 #1562

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

leo-pony
Copy link
Contributor

@leo-pony leo-pony commented Jul 1, 2025

Signed-off-by: Yikun Jiang yikunkero@gmail.com
Signed-off-by: leo-pony nengjunma@outlook.com

Replace PR 1527

What this PR does / why we need it?

What this PR does / why we need it?
Bump torch version to 2.7.1
Cleanup 857f489 (#837)

Does this PR introduce any user-facing change?

No

How was this patch tested?
CI passed

torch-npu 2.7.1rc1 install guide:
https://gitee.com/ascend/pytorch/tree/v2.7.1/
install depending:

pip3 install pyyaml
pip3 install setuptools

install torch-npu:

@leo-pony leo-pony marked this pull request as draft July 1, 2025 09:39
Copy link

github-actions bot commented Jul 1, 2025

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@leo-pony leo-pony closed this Jul 1, 2025
@leo-pony leo-pony reopened this Jul 1, 2025
@github-actions github-actions bot added documentation Improvements or additions to documentation and removed merge-conflicts labels Jul 1, 2025
@leo-pony leo-pony force-pushed the torch_2_7_adapt branch 2 times, most recently from 04ddefc to 7bab351 Compare July 3, 2025 08:34
@leo-pony leo-pony force-pushed the torch_2_7_adapt branch 2 times, most recently from 4f45d58 to b67e468 Compare July 4, 2025 09:45
Copy link

codecov bot commented Jul 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.27%. Comparing base (b5ad70e) to head (2e3f6f3).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1562      +/-   ##
==========================================
+ Coverage   65.78%   71.27%   +5.49%     
==========================================
  Files          78       84       +6     
  Lines        8406     9063     +657     
==========================================
+ Hits         5530     6460     +930     
+ Misses       2876     2603     -273     
Flag Coverage Δ
unittests 71.27% <100.00%> (+5.49%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

github-actions bot commented Jul 6, 2025

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@wangxiyuan wangxiyuan force-pushed the torch_2_7_adapt branch 2 times, most recently from e113a90 to f10b808 Compare July 9, 2025 03:38
@leo-pony leo-pony marked this pull request as ready for review July 10, 2025 06:11
@leo-pony leo-pony marked this pull request as draft July 10, 2025 06:13
@Yikun Yikun added accuracy-test enable all accuracy test for PR ready-for-test start test by label for PR labels Jul 10, 2025
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Yikun and others added 13 commits July 24, 2025 02:23
Signed-off-by: Yikun Jiang <yikunkero@gmail.com>
Signed-off-by: Yikun Jiang <yikunkero@gmail.com>
Co-authored-by: leo-pony <nengjunma@outlook.com>
Signed-off-by: Yikun Jiang <yikunkero@gmail.com>
Signed-off-by: Yikun Jiang <yikunkero@gmail.com>
…h_common.patch_utils

Signed-off-by: leo-pony <nengjunma@outlook.com>
…ions now

Signed-off-by: leo-pony <nengjunma@outlook.com>
Signed-off-by: leo-pony <nengjunma@outlook.com>
Signed-off-by: leo-pony <nengjunma@outlook.com>
Signed-off-by: leo-pony <nengjunma@outlook.com>
Signed-off-by: leo-pony <nengjunma@outlook.com>
…nt calculating logical to device

Signed-off-by: leo-pony <nengjunma@outlook.com>
…ted liberror_manager.so reference

Signed-off-by: leo-pony <nengjunma@outlook.com>
Signed-off-by: leo-pony <nengjunma@outlook.com>
@leo-pony leo-pony marked this pull request as ready for review July 24, 2025 06:46
Copy link
Collaborator

@Yikun Yikun left a comment

Choose a reason for hiding this comment

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

Let's wait torch npu 2.7.1 first POC version.

@@ -12,7 +12,6 @@
# limitations under the License.
# This file is a part of the vllm-ascend project.
#

Copy link
Collaborator

Choose a reason for hiding this comment

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

revert unrelated change to avoid cherrypick conflict

@@ -193,7 +192,6 @@ std::tuple<at::Tensor, at::Tensor> get_masked_input_and_mask(
size,
loop_cnt,
aiv_num);

Copy link
Collaborator

Choose a reason for hiding this comment

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

revert unrelated change to avoid cherrypick conflict

@@ -178,7 +178,6 @@ std::tuple<at::Tensor, at::Tensor> get_masked_input_and_mask(
int64_t aiv_num = 0;
TORCH_CHECK(aclGetDeviceCapability(device_id, ACL_DEVICE_INFO_VECTOR_CORE_NUM, &aiv_num) == ACL_SUCCESS);
uint32_t loop_cnt = (size + aiv_num - 1) / aiv_num;

Copy link
Collaborator

Choose a reason for hiding this comment

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

revert unrelated change to avoid cherrypick conflict

@@ -42,7 +42,7 @@ By using vLLM Ascend plugin, popular open-source models, including Transformer-l
- Software:
* Python >= 3.9, < 3.12
* CANN >= 8.1.RC1
* PyTorch >= 2.5.1, torch-npu >= 2.5.1.post1.dev20250619
* PyTorch >= 2.7.1, torch-npu >= 2.7.1rc1
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
* PyTorch >= 2.7.1, torch-npu >= 2.7.1rc1
* PyTorch >= 2.7.1, torch-npu >= 2.7.1.dev20250724

@@ -42,7 +42,7 @@ vLLM 昇腾插件 (`vllm-ascend`) 是一个由社区维护的让vLLM在Ascend NP
- 软件:
* Python >= 3.9, < 3.12
* CANN >= 8.1.RC1
* PyTorch >= 2.5.1, torch-npu >= 2.5.1.post1.dev20250619
* PyTorch >= 2.5.1, torch-npu >= 2.7.1rc1
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
* PyTorch >= 2.5.1, torch-npu >= 2.7.1rc1
* PyTorch >= 2.5.1, torch-npu >= 2.7.1.dev20250724

"torch-npu==2.5.1.post1.dev20250619",
"torch>=2.5.1",
"torchvision<0.21.0",
"torch-npu==2.7.1rc1",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
"torch-npu==2.7.1rc1",
"torch-npu==2.7.1.dev20250724",

@@ -24,4 +24,4 @@ numba
# Install torch_npu
--pre
--extra-index-url https://mirrors.huaweicloud.com/ascend/repos/pypi
torch-npu==2.5.1.post1.dev20250619
torch-npu==2.7.1rc1
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
torch-npu==2.7.1rc1
torch-npu==2.7.1.dev20250724

@@ -1,4 +1,3 @@
#
Copy link
Collaborator

Choose a reason for hiding this comment

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

revert unrelated change

@@ -254,16 +254,10 @@ def stateless_init_device_torch_dist_pg(

assert is_hccl_available()

# TODO(Yizhou): The reason we need to set options while vllm does not
Copy link
Collaborator

Choose a reason for hiding this comment

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

@yiz-liu FYI, we can finally clean up this, thanks for your note.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accuracy-test enable all accuracy test for PR ci/build documentation Improvements or additions to documentation module:core module:quantization module:tests ready-for-test start test by label for PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants