feat: support Qwen3.5 eager-mode on NPU with Python executor. - #2264
Open
Wang-1F wants to merge 1 commit into
Open
feat: support Qwen3.5 eager-mode on NPU with Python executor.#2264Wang-1F wants to merge 1 commit into
Wang-1F wants to merge 1 commit into
Conversation
Wang-1F
requested review from
DongheJin,
DragonFive,
JimHsiung,
Kang-Meng,
liujinguang0125,
liutongxuan,
ustcfy,
xiao-yu-chen,
yingxudeng,
yinjiawei01 and
zhang-minchao
as code owners
August 18, 2026 14:31
Collaborator
yingxudeng
reviewed
Aug 19, 2026
| params.block_idx_last_scheduled_token, | ||
| params.initial_state_idx); | ||
| #elif defined(USE_NPU) | ||
| const bool has_silu = params.activation; |
Collaborator
There was a problem hiding this comment.
是否会影响libtorch 组图的 qwen3.5
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
Support Qwen3.5 on NPU via the Python executor path by replacing all PyTorch small-op kernel stubs with high-performance NPU operator calls.
What this PR does
Registers 8 new
torch.ops.xllm_opsoperators for the Python executor's GDN (Gated Delta Net) layer on NPU:rms_norm_gated— fused RMSNorm + SiLU gate (CANNaclnnLayerNormFwd)l2_norm— L2 normalization (Triton-on-Ascend)causal_conv1d_update— decode-path causal convolution (TileLang)causal_conv1d_prefill— prefill-path causal convolution (CANNaclnnCausalConv1d)causal_conv1d_qkv_prefill— fused conv + QKV split + L2norm (CANNaclnnCausalConv1dQkv)chunk_gated_delta_rule— prefill delta-rule recurrence (CANNaclnnMegaChunkGdn)fused_gdn_gating— decay gate computation (TileLang)fused_sigmoid_gating_delta_rule_decode— fused decode recurrence (Triton-on-Ascend)Refactors
ops_api.cppNPUcausal_conv1d_updateimplementation into a reusable tilelang wrapper (causal_conv1d_update_wrapper.cpp), shared by both the C++ model layer and the Pythontorch.opsdispatch.Introduces
gdn_prefill_prepareas a unified interface for both CUDA and NPU prefill paths, encapsulating platform-specific fusion strategies.Enables
qwen3_5inmodel_platform_support.pyfor NPU.Precision
Test plan
xllm serve --model_impl=pythonstarts successfully with Qwen3.5-4B on NPUpython_executor_testafter fixing_EXPORTSsync