Repository navigation
[kernels] fused sigmoid multiplication and optimized gdn update kernel - #740
Merged
Merged
Conversation
MatsueYu
force-pushed
the
feature/npu-perf-opt
branch
4 times, most recently
from
August 25, 2026 08:05
8abe3fe to
ae8f38f
Compare
MatsueYu
force-pushed
the
feature/npu-perf-opt
branch
from
August 25, 2026 08:07
ae8f38f to
7cfde05
Compare
MatsueYu
marked this pull request as ready for review
August 25, 2026 08:19
1 of 5 tasks
McZyWu
reviewed
Sep 15, 2026
sglang-npu-bot
previously approved these changes
Sep 16, 2026
WayneLuo-HW
approved these changes
Sep 17, 2026
…out/gate checks, extend device guard
sglang-npu-bot
approved these changes
Sep 17, 2026
HEX1A0A
approved these changes
Sep 17, 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.
Summary
Several optimization on Qwen3.5 decoding, including fused kernels on gdn update and sigmoid mul
Modification
GDN update recurrent decode-optimized
A new kernel optimized only for GDN decoding procedure
fused sigmoid multiplication
a simple fused kernel of sigmoid and element-wise multiplication
Kernel Test
sigmoid GDN update recurrent decode-optimized kernel
Accuracy
use the following command to test the accuracy in a Ascend NPU environment
Efficiency
compared with old kernel (fused_sigmoid_gating_recurrent),Qwen3.6 GDN shapes (
H=16, HV=32, K=128, V=128),BF16 input、FP32 state,30 warmup + 100 iterSfused sigmoid+multiplication
Accuracy
result:
Efficiency
fused_sigmoid_mulelement-wisefused_sigmoid_mul_broadcastAnswer Issue:
There is no accuracy loss when radix-cache turned on
The following image shows the baseline answer of a problem in AIME26
--speculative-algorithm NEXTN \ --speculative-num-steps 3 \ --speculative-eagle-topk 1 \ --speculative-num-draft-tokens 4 \ --speculative-draft-model-quantization unquant \Validation