Skip to content

Add Ascend Dlinfer BuildSpec implementations for Qwen3.5 GDN - #4999

Open
wanfengcxz wants to merge 3 commits into
InternLM:mainfrom
wanfengcxz:fix/qwen35-gdn-ascend-specs
Open

wanfengcxz wants to merge 3 commits into
InternLM:mainfrom
wanfengcxz:fix/qwen35-gdn-ascend-specs

Conversation

@wanfengcxz

Copy link
Copy Markdown
Collaborator

Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily receiving feedbacks. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.

Motivation

Qwen3.5 GDN currently fails on the Ascend/Dlinfer backend because three BuildSpecs are not implemented.

This PR adds Ascend implementations for:

  • CausalConv1dBuildSpec
  • GatedDeltaMetaBuildSpec
  • GatedDeltaRuleBuildSpec

The changes are isolated to the Ascend/Dlinfer backend and do not modify CUDA or shared LMDeploy logic.

Validated with Qwen3.5 offline inference on Ascend cards.

Modification

Please briefly describe what modification is made in this PR.

BC-breaking (Optional)

Does the modification introduce changes that break the backward-compatibility of the downstream repositories?
If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.

Use cases (Optional)

If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.

Checklist

  1. Pre-commit or other linting tools are used to fix the potential lint issues.
  2. The modification is covered by complete unit tests. If not, please add more unit tests to ensure the correctness.
  3. If the modification has a dependency on downstream projects of a newer version, this PR should be tested with all supported versions of downstream projects.
  4. The documentation has been modified accordingly, like docstring or example tutorials.

@wanfengcxz
wanfengcxz marked this pull request as ready for review September 23, 2026 06:32
@lvhan028
lvhan028 requested a lite review from Copilot September 23, 2026 07:15

Copilot AI 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.

Copilot review overview

🟡 Changes recommended

Unresolved critical state-layout and cache-handling issues block approval.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 3 High severity

Open (3)
What changed in this PR

Adds Ascend/Dlinfer BuildSpec implementations for Qwen3.5 GDN operations.

Changes:

  • Registers three Ascend BuildSpecs.
  • Adds causal-convolution and gated-delta kernel adapters.
  • Supports Ascend metadata and recurrent-state handling.
File Summary
lmdeploy/​pytorch/​backends/​dlinfer/​ascend/​op_backend.py Dispatches the three Ascend BuildSpecs.
lmdeploy/​pytorch/​backends/​dlinfer/​ascend/​gated_delta_rule.py Implements GDN metadata and execution; critical state-index and layout issues remain.
lmdeploy/​pytorch/​backends/​dlinfer/​ascend/​causal_conv1d.py Wraps causal-convolution kernels; critical cache-layout and moderate sequence-boundary issues remain.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lmdeploy/pytorch/backends/dlinfer/ascend/causal_conv1d.py
Comment thread lmdeploy/pytorch/backends/dlinfer/ascend/gated_delta_rule.py
Comment thread lmdeploy/pytorch/backends/dlinfer/ascend/gated_delta_rule.py
@wanfengcxz
wanfengcxz force-pushed the fix/qwen35-gdn-ascend-specs branch from bcbb903 to b3165c9 Compare October 21, 2026 09:44

This branch has not been deployed

No deployments
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.

2 participants