Skip to content

Conversation

@machenglong2025
Copy link
Contributor

@machenglong2025 machenglong2025 commented Sep 8, 2025

What this PR does / why we need it?

line 408 already declared mc2_mask , remove duplicated unused code

Does this PR introduce any user-facing change?

no

How was this patch tested?

CI passed with existing test.

Signed-off-by: machenglong <machenglong_yewu@cmss.chinamobile.com>
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 correctly removes a redundant line of code in fused_moe.py, which improves code clarity. My review confirms this change is beneficial. I have also pointed out other nearby unused variables that could also be removed to align with the goal of this PR.

# When all_reduce_merge is in progress, shared_experts does not do all_reduce in mlp, but waits until shared_experts+router_experts are completed before doing all_reduce
shared_hidden_states = shared_experts(hidden_states)

mc2_mask = forward_context.mc2_mask
Copy link
Contributor

Choose a reason for hiding this comment

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

high

This removal is correct as mc2_mask was already assigned at line 408. In the spirit of removing unused code, the variables quantized_x_for_share and dynamic_scale_for_share initialized at line 410 also appear to be unused. They are always None and are passed to self.quant_method.apply. Removing them and their usage in the apply call would further improve code clarity and maintainability.

@github-actions
Copy link

github-actions bot commented Sep 8, 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.

@codecov
Copy link

codecov bot commented Sep 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.61%. Comparing base (2693196) to head (5f7abc4).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2805   +/-   ##
=======================================
  Coverage   72.61%   72.61%           
=======================================
  Files         154      154           
  Lines       21319    21317    -2     
=======================================
  Hits        15480    15480           
+ Misses       5839     5837    -2     
Flag Coverage Δ
unittests 72.61% <ø> (+<0.01%) ⬆️

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.

@wangxiyuan wangxiyuan merged commit 1a82b16 into vllm-project:main Sep 8, 2025
25 checks passed
1Fire4 pushed a commit to 1Fire4/vllm-ascend that referenced this pull request Sep 9, 2025
### What this PR does / why we need it?
line 408 already declared mc2_mask ,  remove duplicated unused code

### Does this PR introduce _any_ user-facing change?
no

### How was this patch tested?
CI passed with existing test.

- vLLM version: v0.10.1.1
- vLLM main:
vllm-project/vllm@60f0843

Signed-off-by: machenglong <machenglong_yewu@cmss.chinamobile.com>
Signed-off-by: 1Fire4 <wangdingyi2@huawei.com>
Angazenn pushed a commit to Angazenn/vllm-ascend that referenced this pull request Sep 10, 2025
### What this PR does / why we need it?
line 408 already declared mc2_mask ,  remove duplicated unused code

### Does this PR introduce _any_ user-facing change?
no

### How was this patch tested?
CI passed with existing test.

- vLLM version: v0.10.1.1
- vLLM main:
vllm-project/vllm@60f0843

Signed-off-by: machenglong <machenglong_yewu@cmss.chinamobile.com>
offline893 pushed a commit to offline893/vllm-ascend that referenced this pull request Sep 16, 2025
### What this PR does / why we need it?
line 408 already declared mc2_mask ,  remove duplicated unused code

### Does this PR introduce _any_ user-facing change?
no

### How was this patch tested?
CI passed with existing test.

- vLLM version: v0.10.1.1
- vLLM main:
vllm-project/vllm@60f0843

Signed-off-by: machenglong <machenglong_yewu@cmss.chinamobile.com>
Signed-off-by: offline0806 <z00858301@china.huawei.com>
wangxiaoteng888 pushed a commit to LCAIZJ/vllm-ascend that referenced this pull request Sep 25, 2025
### What this PR does / why we need it?
line 408 already declared mc2_mask ,  remove duplicated unused code

### Does this PR introduce _any_ user-facing change?
no

### How was this patch tested?
CI passed with existing test.

- vLLM version: v0.10.1.1
- vLLM main:
vllm-project/vllm@60f0843

Signed-off-by: machenglong <machenglong_yewu@cmss.chinamobile.com>
chopper0126 pushed a commit to chopper0126/vllm-ascend that referenced this pull request Sep 26, 2025
### What this PR does / why we need it?
line 408 already declared mc2_mask ,  remove duplicated unused code

### Does this PR introduce _any_ user-facing change?
no

### How was this patch tested?
CI passed with existing test.

- vLLM version: v0.10.1.1
- vLLM main:
vllm-project/vllm@60f0843

Signed-off-by: machenglong <machenglong_yewu@cmss.chinamobile.com>
Angazenn pushed a commit to Angazenn/vllm-ascend that referenced this pull request Oct 21, 2025
### What this PR does / why we need it?
line 408 already declared mc2_mask ,  remove duplicated unused code

### Does this PR introduce _any_ user-facing change?
no

### How was this patch tested?
CI passed with existing test.

- vLLM version: v0.10.1.1
- vLLM main:
vllm-project/vllm@60f0843

Signed-off-by: machenglong <machenglong_yewu@cmss.chinamobile.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants