Skip to main content

vllm-ascend-gdn-decode-fusion

Installer for the GDN decode-path fusion patch for vLLM-Ascend. On Ascend 910B the stock GDN decode path re-packs the convolution output into q/k/v with three reshape copies plus a torch.cat, launches two l2norm_fwd kernels, and then hands q/k/v to the RecurrentGatedDeltaRule custom operator. This patch replaces that sequence with a single Triton kernel and removes two contiguous copies from the gating path.

The patch is pure Python/Triton: no AscendC kernel and no custom-OPP package is rebuilt.

Tested with Qwen3.5-35B-A3B W4A8 (GDN-W8A8 variant), 2x910B3, TP2.

What it changes

  • vllm_ascend/ops/triton/gdn_decode_fused.py (new) - one Triton kernel that splits the packed q|k|v row of a token, normalizes every q/k head row in fp32 (same math as l2norm_fwd, eps 1e-6) and writes contiguous outputs.
  • vllm_ascend/ops/triton/fused_gdn_gating.py - the gating kernel reads the row-strided b/a halves of the ba projection directly instead of materializing two contiguous copies.
  • vllm_ascend/ops/gdn.py - decode-only batches take the fused path; prefill keeps the reference path because the chunk kernel normalizes q/k in-kernel. Unsupported shapes fall back to the reference implementation.

Requirements

  • Ascend 910B (aarch64) with a working torch_npu + Triton installation
  • The vLLM-Ascend HUST tree that ships the Ascend GDN implementation (vllm_ascend/ops/gdn.py with AscendGatedDeltaNetAttention)
  • Qwen3.5-35B-A3B W4A8 (the GDN-W8A8 variant was validated)

Install

pip install vllm-ascend-gdn-decode-fusion
gdn-decode-fusion check      # inspect the checkout and patch state
gdn-decode-fusion install    # apply the patch (auto-detects vllm_ascend)

Then restart the vLLM service so the patched modules are imported.

The installer applies a context patch with git apply (or patch) and keeps a backup under <checkout>/.gdn_decode_fusion/. When the checkout does not match the patch context it aborts without modifying anything.

Options

gdn-decode-fusion install --vllm-ascend /path/to/vllm-ascend
gdn-decode-fusion install --force      # revert first, then apply again
gdn-decode-fusion revert               # restore the backed-up files

Validation

gdn-decode-fusion assets prints the bundled assets directory. It contains validation/check_bit_exact.py, a standalone NPU script that compares:

  • the fused split+norm kernel against split + cat + l2norm_fwd,
  • the stride-aware gating kernel against a PyTorch reference,

and prints PASS/FAIL per shape. Run it with the patched tree on PYTHONPATH:

python validation/check_bit_exact.py

Evidence

Measured benchmark evidence is maintained in the organization's benchmark evidence repository rather than in this source repository; see that repository for the end-to-end comparison and the kernel-level measurements. Reproduce it with the validation script above and the TP2 harness in the evidence repository.

What is inside

gdn-decode-fusion assets

prints a directory with:

  • patches/gdn-decode-fusion.patch - the complete diff against the vllm-ascend tree,
  • validation/check_bit_exact.py - the bit-exactness check,
  • method.md - how the fusion works and which paths fall back.

Uninstall

gdn-decode-fusion revert

or restore the files from <checkout>/.gdn_decode_fusion/backup-* manually.

License

The installer code is Apache-2.0. The bundled patch edits vLLM-Ascend sources that remain under their original Apache-2.0 license and copyright headers. See NOTICE.

Metadata

Release files for vllm-ascend-gdn-decode-fusion 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vllm-ascend-gdn-decode-fusion 0.1.0
File Size Uploaded Provenance Actions
vllm_ascend_gdn_decode_fusion-0.1.0.tar.gz 18.0 kB With provenance Details for vllm_ascend_gdn_decode_fusion-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vllm-ascend-gdn-decode-fusion 0.1.0
File Interpreter ABI Platform Actions
vllm_ascend_gdn_decode_fusion-0.1.0-py3-none-any.whl Python 3 none any Details for vllm_ascend_gdn_decode_fusion-0.1.0-py3-none-any.whl

Total release size: 37.8 kB

Release files / vllm_ascend_gdn_decode_fusion-0.1.0.tar.gz

Download URL vllm_ascend_gdn_decode_fusion-0.1.0.tar.gz
Size 18.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0f22e157a8187d818638d64e883072536fec20898f063e4a2d633f86a508e310
BLAKE2b-256 checksum
How to use checksums
22951b6c48b525763e86a9d7ab1697b633f4778f588720134408050d4e66fb38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Release files / vllm_ascend_gdn_decode_fusion-0.1.0-py3-none-any.whl

Download URL vllm_ascend_gdn_decode_fusion-0.1.0-py3-none-any.whl
Size 19.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c714889b31e4a04763ec1c4971e52b7267cda9bb7c773d7988b0f077e4f1efa0
BLAKE2b-256 checksum
How to use checksums
073a2d4b92e7f51d3d1f8b0beea9add849df105b8ce69627c438fb9538832b2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

Security for vllm-ascend-gdn-decode-fusion 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for vllm_ascend_gdn_decode_fusion-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page