Repository navigation
[NPU][Bugfix] use CANN libdevice for DSpark Markov sampling - #43849
Merged
sglang-npu-bot merged 1 commit intoOct 14, 2026
Merged
Conversation
Select the Ascend libdevice implementation on NPU so log1p lowers to the CANN intrinsic instead of executing the generic Triton stub. This fixes draft graph capture failing with a NoneType unary negation error. Keep the existing libdevice selection on other platforms.
AndyLi429
marked this pull request as ready for review
October 12, 2026 12:18
AndyLi429
requested review from
BBuf,
DarkSharpness,
HaiShaw,
HydraQYH,
celve and
yuan-luo
as code owners
October 12, 2026 12:18
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Collaborator
|
/tag-and-rerun-ci |
Contributor
Author
|
fix base-c-test-acc-16-npu-a3 test_npu_deepseek_v4_flash_w8a8_8p_gpqa.py |
Contributor
Author
|
/rerun-failed-ci |
1 similar comment
Contributor
Author
|
/rerun-failed-ci |
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
DeepSeek V4 Flash with DSpark fails during NPU draft graph capture in [this CI job](https://github.com/sgl-project/sglang/actions/runs/38233348303/job/114772999125).
MarkovSampleStepcalls-libdevice.log1p(-uniform), but the Ascend backend does not map the generic Tritonlibdevicestub to its CANN implementation. The call returnsNone, causing compilation to fail with:The sampling kernel was introduced in #43621 and integrated into draft graph capture in #43668.
Modifications
triton.language.extra.cann.libdeviceon NPU inmarkov_sample.py.libdeviceimport on other platforms.Accuracy Tests
Speed Tests and Profiling
Pending follow-up: verify NPU inference performance after restoring successful compilation. No performance improvement is claimed.
Checklist
Review and Merge Process
/tag-and-rerun-ci,/tag-run-ci-label,/rerun-failed-ciCI States
Latest PR Test (Base): ✅ Run #38245525089
Latest PR Test (Extra): ❌ Run #38245524642
Latest PR Test (AMD ROCm 10): ❌ Run #38245525423