Skip to content

Conversation

@wangxiyuan
Copy link
Collaborator

@wangxiyuan wangxiyuan commented Nov 3, 2025

This PR upgrade CANN from 8.2rc1 to 8.3rc1 and remove the CANN version check logic.

TODO: we notice that UT runs failed with CANN 8.3 image. So the base image for UT is still 8.2. We'll fix it later.

@github-actions github-actions bot added documentation Improvements or additions to documentation module:tests module:ops labels Nov 3, 2025
@github-actions
Copy link

github-actions bot commented Nov 3, 2025

👋 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.

@wangxiyuan wangxiyuan force-pushed the cherry-pick_cann_8.3 branch 2 times, most recently from 452b4a0 to 922c8b9 Compare November 3, 2025 12:33
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 upgrades the CANN dependency from 8.2.rc1 to 8.3.rc1. The changes primarily involve updating version strings in Dockerfiles, documentation, and configuration files. Additionally, conditional logic based on the CANN version has been removed from the Python source code, making the 8.3-specific logic the default. While most changes are straightforward, I've identified an issue in one of the unit tests that appears to have been modified incorrectly, which could lead to it not properly testing the intended functionality.

Comment on lines 77 to 80
self.assertEqual(attn_mask[0][-1], torch.tensor(True))
self.assertEqual(attention_mask_builder._seq_len_cached, 1024)
self.assertEqual(attention_mask_builder.attn_mask_cache.shape,
(2048, 2048))
(1024, 1024))
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The assertions in this part of the test appear to be incorrect. The get_attn_mask method calls _update_attn_cache, which should update _seq_len_cached to 2048 when called with max_seq_len=2048 (since it was initialized with 1024). However, the test asserts that _seq_len_cached remains 1024. This contradicts the implementation of _update_attn_cache and the comment on line 73.

Additionally, attn_mask[0][-1] is asserted to be torch.tensor(True). For dtype=torch.float16, _generate_attn_mask creates a mask with float("-inf"). This assertion also seems incorrect.

If _update_attn_cache does not update as the test suggests, get_attn_mask would try to slice [:2048, :2048] from a (1024, 1024) tensor, which would raise an error. The test seems to be asserting an impossible state. It appears the original test logic was correct and should be restored.

        self.assertEqual(attn_mask[0][-1],
                         torch.tensor(float("-inf"), dtype=torch.float16))
        self.assertEqual(attention_mask_builder._seq_len_cached, 2048)
        self.assertEqual(attention_mask_builder.attn_mask_cache.shape,
                         (2048, 2048))

@wangxiyuan wangxiyuan force-pushed the cherry-pick_cann_8.3 branch 4 times, most recently from 94f8ff1 to d21af27 Compare November 4, 2025 08:03
@wangxiyuan wangxiyuan changed the title Upgrade CANN to 8.3.rc1 (#3945) [cherry-pick]Upgrade CANN to 8.3.rc1 (#3945) Nov 4, 2025
@wangxiyuan wangxiyuan added ready read for review ready-for-test start test by label for PR labels Nov 4, 2025
Signed-off-by: wangxiyuan <[email protected]>
@wangxiyuan wangxiyuan force-pushed the cherry-pick_cann_8.3 branch from d21af27 to 338f3b4 Compare November 5, 2025 01:12
@wangxiyuan wangxiyuan merged commit 7ee0b0b into vllm-project:v0.11.0-dev Nov 6, 2025
24 of 31 checks passed
@wangxiyuan wangxiyuan deleted the cherry-pick_cann_8.3 branch November 18, 2025 08:59
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: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