Skip to content

add gdn custom conv1d#555

Open
zhaozx-cn wants to merge 8 commits into
sgl-project:mainfrom
zhaozx-cn:gdn_conv1d
Open

add gdn custom conv1d#555
zhaozx-cn wants to merge 8 commits into
sgl-project:mainfrom
zhaozx-cn:gdn_conv1d

Conversation

@zhaozx-cn

@zhaozx-cn zhaozx-cn commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds GDN (Grouped Deformable Normalization) custom conv1d op, which could be used in:

  • Prefill
  • Decode
  • MTP (Multi-Token Prediction)

Accuracy Test

Model Task Score Official
Qwen/Qwen3.5-35B-A3B CEVAL 0.9057 0.902
Qwen/Qwen3.5-397B-A17B CEVAL 0.922 0.93

Performance Test

Model: Qwen/Qwen3.5-35B-A3B

Stage Input / Output Batch Size Metric Before this PR After this PR
Prefill 8k / 1 bs1 TTFT (ms) 531 446
Decode 8k / 2k bs48 TPOT (ms) 37.81 33.49

Model: Qwen/Qwen3.5-397B-A17B

Stage Input / Output Batch Size Metric Before this PR After this PR
MTP 3k / 1.5k bs54 output throughput (tokens) 5015 5579

zhaozx-cn added 3 commits June 6, 2026 17:10
Signed-off-by: zhaozx-cn <zhaozx2116@163.com>
Signed-off-by: zhaozx-cn <zhaozx2116@163.com>
Signed-off-by: zhaozx-cn <zhaozx2116@163.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the causal_conv1d operator to support CANN graph mode, template kernels, and speculative decoding, introducing extensive host-side tiling, validation, and kernel dispatching logic. Feedback on the changes highlights several critical issues: a data type mismatch for num_accepted_tokens between the host-side implementation and the CANN/tiling validation code, thread-safety concerns regarding unprotected global static variables, potential race conditions and cross-device compatibility errors from using static global tensors (globalNumAcceptBuffer and globalTilingBuffer), and the omission of device compatibility checks for input tensors.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread csrc/causal_conv1d/op_host/causal_conv1d.cpp
Comment thread csrc/causal_conv1d/op_host/causal_conv1d.cpp
Comment thread csrc/causal_conv1d/op_host/causal_conv1d.cpp Outdated
Comment thread csrc/causal_conv1d/op_host/causal_conv1d.cpp
Comment thread csrc/causal_conv1d/op_host/causal_conv1d.cpp
Signed-off-by: zhaozx-cn <zhaozx2116@163.com>
Signed-off-by: zhaozx-cn <zhaozx2116@163.com>
Signed-off-by: zhaozx-cn <zhaozx2116@163.com>
Signed-off-by: zhaozx-cn <zhaozx2116@163.com>
Signed-off-by: zhaozx-cn <zhaozx2116@163.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant