跳到正文
研踪PaperTrail
← 研踪 PaperTrail
正在查看已观测的 v1。查看最新 v2 →

arXiv:2611.36424 · v1

cuDNN Linear Attention: Optimized Mamba-2, GDN, GDP, KDA, and GDN-2 Kernels for NVIDIA GPUs

首次提交 2026-11-27 01:18
版本更新 2026-11-27 01:18
雷达观测 2026-11-30 12:31
arXiv ↗PDF ↗

摘要

Linear attention replaces the softmax attention of Transformers with a fixed-size recurrent state, so that the runtime of prefill grows linearly rather than quadratically with the sequence length and the runtime of every decode step is constant in it. Many recent models have adopted a hybrid architecture where some layers swap dense attention for linear attention variants. cuDNN now ships optimized fused kernels for five linear attention variants, Mamba-2, Gated DeltaNet (GDN), Gated DeltaProduct (GDP), Kimi Delta Attention (KDA), and Gated DeltaNet-2 (GDN-2), on Blackwell (SM100, SM103), covering the training forward and backward passes. All of the kernels are open source and ship in cuDNN at https://github.com/NVIDIA/cudnn-frontend. In this paper, we walk through the optimizations that produce speedups over the state-of-the-art baselines. We start the kernel design from a single persistent kernel per pass. Then, in low B⋅HB \cdot H settings, where a grid of one CTA per (batch, head) pair does not cover the SMs, we use intra-card context parallelism (intra-card CP) or a split of the value dimension (split-dvd_v), both introduced by prior work in FlashQLA. We also fuse the other components that surround the linear attention operation in the block, the L2 normalization of the queries and keys and the gate and write-strength transforms, in both the forward and the backward pass. On GB200, the fused kernels for the four delta-rule variants run up to 7.1×7.1\times faster than the reference Triton implementations in the forward pass and up to 8.1×8.1\times in the backward pass, up to 3.2×3.2\times faster than FlashQLA, and up to 6.1×6.1\times faster than FlashKDA. The Mamba-2 kernels run up to 15.9×15.9\times faster than FLA and up to 4.2×4.2\times faster than mamba_ssm in the forward pass, and up to 6.9×6.9\times and 5.5×5.5\times in the backward pass.

作者备注:35 pages, 22 figures, 12 tables

AI 论文解读

基于摘要 · 非全文审阅

此版本尚未生成 AI 解读。解读由后台任务生成并按论文版本保存,登录后共享已有结果。

版本差异

仅对比实际观测的元数据,不代表 PDF 正文或实验变化。版本可能不连续;带删除线为移除,下划线为新增。

摘要变化

Linear attention replaces the softmax attention of Transformers with a fixed-size recurrent state, so that the runtime of prefill grows linearly rather than quadratically with the sequence length and the runtime of every decode step is constant in it. Many recent models have adopted a hybrid architecture where some layers swap dense attention for linear attention variants. cuDNN now ships optimized fused kernels for five linear attention variants, Mamba-2, Gated DeltaNet (GDN), Gated DeltaProduct (GDP), Kimi Delta Attention (KDA), and Gated DeltaNet-2 (GDN-2), on Blackwell (SM100, SM103), covering the training forward and backward passes. All of the kernels are open source and ship in cuDNN at https://github.com/NVIDIA/cudnn-frontend. In this paper, we walk through the optimizations that produce speedups over the state-of-the-art baselines. We start the kernel design from a single persistent kernel per pass. Then, in low $B \cdot H$ settings, where a grid of one CTA per (batch, head) pair does not cover the SMs, we use intra-card context parallelism (intra-card CP) or a split of the value dimension (split-$d_v$), both introduced by prior work in FlashQLA. We also fuse the other components that surround the linear attention operation in the block, the L2 normalization of the queries and keys and the gate and write-strength transforms, in both the forward and the backward pass. On GB200, the fused kernels for the four delta-rule variants run up to $7.1\times$ faster than the reference Triton implementations in the forward pass and up to $8.1\times$ in the backward pass, up to $3.2\times$ faster than FlashQLA, and up to $6.1\times$ faster than FlashKDA. The Mamba-2 kernels run up to $15.9\times$ faster than FLA and up to $4.2\times$ faster than mamba_ssm in the forward pass, and up to $6.9\times$ and $5.5\times$ in the backward pass.

观测到的版本

相邻记录可能跳过中间版本;首次发现 v2 及以上也会标为版本更新。

v2 · 2026-11-30 12:43 · 最新观测版本

cuDNN Linear Attention: Optimized Mamba-2, GDN, GDP, KDA, and GDN-2 Kernels for NVIDIA GPUs

Linear attention replaces the softmax attention of Transformers with a fixed-size recurrent state, so that the runtime of prefill grows linearly rather than quadratically with the sequence length and the runtime of every decode step is constant in it. Many recent models have adopted a hybrid architecture where some layers swap dense attention for linear attention variants. cuDNN now ships optimized fused kernels for five linear attention variants, Mamba-2, Gated DeltaNet (GDN), Gated DeltaProduct (GDP), Kimi Delta Attention (KDA), and Gated DeltaNet-2 (GDN-2), on Blackwell (SM100, SM103), covering the training forward and backward passes. All of the kernels are open source and ship in cuDNN. In this paper, we walk through the optimizations that produce speedups over the state-of-the-art baselines. We start the kernel design from a single persistent kernel per pass. Then, in low B⋅HB \cdot H settings, where a grid of one CTA per (batch, head) pair does not cover the SMs, we use intra-card context parallelism (intra-card CP) or a split of the value dimension (split-dvd_v), both introduced by prior work in FlashQLA. We also fuse the other components that surround the linear attention operation in the block, the L2 normalization of the queries and keys and the gate and write-strength transforms, in both the forward and the backward pass. On GB200, the fused kernels for the four delta-rule variants run up to 7.1×7.1\times faster than the reference Triton implementations in the forward pass and up to 8.1×8.1\times in the backward pass, up to 3.2×3.2\times faster than FlashQLA, and up to 6.1×6.1\times faster than FlashKDA. The Mamba-2 kernels run up to 15.9×15.9\times faster than FLA and up to 4.2×4.2\times faster than mamba_ssm in the forward pass, and up to 6.9×6.9\times and 5.5×5.5\times in the backward pass.

查看此版本解读 →查看此版本原文 ↗
v1 · 2026-11-27 01:18

cuDNN Linear Attention: Optimized Mamba-2, GDN, GDP, KDA, and GDN-2 Kernels for NVIDIA GPUs

Linear attention replaces the softmax attention of Transformers with a fixed-size recurrent state, so that the runtime of prefill grows linearly rather than quadratically with the sequence length and the runtime of every decode step is constant in it. Many recent models have adopted a hybrid architecture where some layers swap dense attention for linear attention variants. cuDNN now ships optimized fused kernels for five linear attention variants, Mamba-2, Gated DeltaNet (GDN), Gated DeltaProduct (GDP), Kimi Delta Attention (KDA), and Gated DeltaNet-2 (GDN-2), on Blackwell (SM100, SM103), covering the training forward and backward passes. All of the kernels are open source and ship in cuDNN at https://github.com/NVIDIA/cudnn-frontend. In this paper, we walk through the optimizations that produce speedups over the state-of-the-art baselines. We start the kernel design from a single persistent kernel per pass. Then, in low B⋅HB \cdot H settings, where a grid of one CTA per (batch, head) pair does not cover the SMs, we use intra-card context parallelism (intra-card CP) or a split of the value dimension (split-dvd_v), both introduced by prior work in FlashQLA. We also fuse the other components that surround the linear attention operation in the block, the L2 normalization of the queries and keys and the gate and write-strength transforms, in both the forward and the backward pass. On GB200, the fused kernels for the four delta-rule variants run up to 7.1×7.1\times faster than the reference Triton implementations in the forward pass and up to 8.1×8.1\times in the backward pass, up to 3.2×3.2\times faster than FlashQLA, and up to 6.1×6.1\times faster than FlashKDA. The Mamba-2 kernels run up to 15.9×15.9\times faster than FLA and up to 4.2×4.2\times faster than mamba_ssm in the forward pass, and up to 6.9×6.9\times and 5.5×5.5\times in the backward pass.

查看此版本解读 →查看此版本原文 ↗