Repository navigation
fix: stop shadowing the DSpark shared-experts fusion guard - #39366
Merged
hnyls2002 merged 1 commit intoSep 15, 2026
Merged
Conversation
mmangkad
approved these changes
Sep 15, 2026
Contributor
|
/rerun-test test/registered/unit/models/test_deepseek_v4_shared_expert_fusion.py |
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
DeepseekV4ForCausalLMDSparkdefinesshared_experts_fusion_disable_reasontwice. The second definition wins, so the first one, the only one with the NPU
branch, is dead code:
The effect is that on NPU, shared-experts fusion is not disabled for the DSpark
draft even though the guard was written to disable it. Per the message that
guard carries, NPU ModelSlim weight loading cannot map shared experts into
fused expert slots, so the draft ends up fusing experts on a path that does not
support it.
CUDA is unaffected: both definitions fall through to the same base
implementation there.
The NPU-aware version arrived in #33676 alongside the plain one from #33312; the
overwrite looks like a merge artifact rather than an intentional revert.
Modifications
Delete the second, shadowing definition. No other change.
Accuracy Tests
Not applicable on CUDA, where both definitions were equivalent and behavior is
byte-identical.
I do not have NPU hardware, so the restored branch is not exercised here. It
restores the behavior #33676 intended; an NPU reviewer confirming that intent
would be the right check before merge.
Speed Tests and Profiling
Not applicable. Dead-code removal with no CUDA behavior change.
Checklist
Found while auditing DSV4 startup; unrelated to that work, so it is on its own.
CI States
Latest PR Test (Base): ❌ Run #34808005605
Latest PR Test (Extra): ❌ Run #34808005393
Latest PR Test (AMD ROCm 10): ❌ Run #34808005509