Repository navigation
[NPU] Enable DeepGEMM MegaMoE for DeepSeek V4.1 target decode - #50
Merged
ClownBin merged 15 commits intoDec 3, 2026
Merged
Conversation
- aclnnGemmSyrkGetWorkspaceSize grew an int8_t cubeMathType argument between 9.3.0-beta.1 and the 9.3.0 release; apply the call-site adaptation to the DeepGEMM worktree as cann93-release-syrk.patch. - Record the patched-file digests in their Linux line-ending view and cover csrc/apis/aclnn.hpp as well; the previous digests were taken from a CRLF checkout and never matched a Linux prepare. - Prebuild the cann_ops_transformer ops and the triton Ascend npu_utils host extension during prepare with the default toolchain headers: their g++-13 -std=c++20 builds fail at runtime against the GCC 11 include path kept for the device JIT.
Validated on 141.61.45.121, CANN 9.3.0 release, 8 x Ascend950DT: offline 4096 finished=80, new_tokens=327680, measured_steps=10. - Drop CPLUS_INCLUDE_PATH from the run-time vendor environment: the device JIT has not needed the GCC 11 headers on the 9.3.0 release, while they break the cann_ops_transformer ops and the triton Ascend npu_utils host builds (g++-13 -std=c++20). Opt back in with DEVICE_JIT_GCC11=1. - Prepend the pip site-packages in vendor_env so the pinned pip cannbot-dsl 0.8.0 (tensor.reinterpret) shadows the cannbotdsl bundled with the host CANN release. - Extend the adapter's mHC runtime gate to the 9.3.0 release after extraction; the beta.1 pilot kernel runs on it. - Add run_all.sh: one-click offline tiers and the native vs DeepGEMM serve comparison with readiness polling and short smoke mode.
- runtime_libraries preloads the system libstdc++: the hcc toolchain dir first in LD_LIBRARY_PATH shadows it with a build missing the GLIBCXX_3.4.29 futex symbols, and mooncake (the default PD transfer backend) fails to import in the serve arm. - run_all.sh wait_ready exits as soon as the server process dies instead of polling for the full 40 minutes.
Drop the defensive layers: model-path candidate scanning, precondition re-checks, and duplicate idle checking (repro.sh already fails loudly on all of those). Keep the one-line defaults, the readiness poll that dies with the server, the SHORT smoke flag, and the per-tier summary print.
…emm-decode # Conflicts: # python/sglang/srt/hardware_backend/npu/moe/config.py # python/sglang/srt/hardware_backend/npu/moe/deepgemm_prefill.py # python/sglang/srt/layers/moe/token_dispatcher/ascend_ops.py # test/registered/unit/moe/test_ascend_deepgemm_prefill.py
ClownBin
approved these changes
Dec 3, 2026
chenxu214
approved these changes
Dec 3, 2026
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.
Enable the DeepGEMM-Ascend low-latency MegaMoE kernel for target decode and small verification batches on Ascend 950 with TP=attention DP=EP at 8 or 32 ranks. The target uses packed MXFP4 expert weights for both prefill and decode. DSpark can use a separately configured CANN draft provider.
The dispatcher uses shared DP row counts when available so idle ranks participate in the same kernel selection. The low-latency path is bounded by the configured decode capacity and the provider limit of 4096 rows.
Validation: Python compilation and git diff whitespace checks passed. A5 runtime, graph replay, accuracy and throughput validation are pending.