Skip to content
AI-generated research idea🟠Medium💡Moderate InnovationNo close match found

Fused Shared-Memory Kernels for Dual-Path Chunkwise Delta Attention

A fused GPU kernel system that computes dual-path chunkwise linear attention interactions in shared memory to eliminate the latency and memory bandwidth overhead of residual state writes.

Time

several weeks

Compute level

Multiple GPUs

Resources

A single NVIDIA A100 or H100 GPU for kernel development and benchmarking; multi-GPU node for validation.

What the paper used

Training uses BF16 mixed precision and full activation recomputation on 16 NVIDIA H800 GPUs per run across 39,473 optimizer steps on 82.78B tokens.

Prerequisites

CUDA C++, Triton GPU programming, chunkwise parallel linear attention algorithms

Scope

modify existing code

The Gap

In Section 4.3 and Section 5, chunkwise parallel training computes two distinct causal interaction matrices, L and J, and two output projection components, Pu and Pr. These separate operations require additional matrix multiplications and global memory reads/writes during the intra-chunk forward and backward passes.

“Within this schedule, residual writing contributes additional matrix products to the correction, state, and output computations while retaining the same C × C triangular system size.”
From the paper, Section 5, page 8. Matched against the PDF text.

Limitation

Stable GDN-2 introduces significant memory bandwidth and runtime overhead by evaluating separate intra-chunk interaction matrices and auxiliary states for symmetric and residual pathways across global GPU memory.

Proposed Solution

Develop a specialized fused Triton/CUDA kernel that loads keys, symmetric factors, and residual factors simultaneously into SRAM. Compute the causal lower triangular products for both pathways within a single shared-memory tiling loop, reusing the cumulative decay vector and shared value matrix to evaluate token updates and output blocks in a single kernel pass.

Why This Matters

Fusing the dual-path computation is expected to reduce intra-chunk latency by 25-40% and match the training throughput of simpler linear attention baselines like KDA.

How to Get Started

How to test it: Benchmark the fused kernel against the unfused PyTorch implementation across chunk sizes 64 to 256 on 64K sequences. Discontinue if kernel compilation overhead or register spilling prevents achieving at least a 20% speedup in end-to-end forward-backward step time.

  1. Profile the existing Stable GDN-2 chunkwise implementation with PyTorch Profiler to pinpoint memory bandwidth bottlenecks in computing auxiliary matrices.
  2. Draft a Triton kernel that fuses the calculation of the strictly lower triangular causal matrices for both symmetric and residual terms within block SRAM.
  3. Benchmark forward and backward pass speeds against standard KDA across key/value dimensions 64 and 128.
  4. Integrate the fused kernel into the 1.6B Stable GDN-2 pretraining pipeline and verify exact numerical equivalence with the reference implementation.

Suggested by AI. Adapt it to your setup.

Has This Been Done?

No close match in 10 results

The listed works explore hardware acceleration, fused compiling, and various forms of delta attention such as Systolic Linear Attention and FlexLinearAttention, but none of them detail a fused shared-memory Triton/CUDA kernel specifically designed for dual-path chunkwise delta attention utilizing a single shared-memory tiling loop.

We searched OpenAlex and arXiv for “fused chunkwise delta rule triton kernel linear attention” and “Fused Shared-Memory Kernels for Dual-Path Chunkwise Delta Attention” and an AI compared the idea with the top 10 results. A small search can miss relevant work.

Source Paper

Stable Gated DeltaNet-2: Understanding and Mitigating Recurrent State Instability

Xichong Zhang, Xixuan Hao, Zhichen Liu +11 more · 2026

This paper investigates recurrent state instability in Gated DeltaNet-2 (GDN-2), demonstrating that asymmetric erase operators induce non-normal state transitions whose directional gains accumulate and trigger exponential state growth and training crashes during long-context training. To resolve this, the authors introduce Stable GDN-2, which enforces non-expansive recurrent state propagation via symmetric erasure while preserving update flexibility through decay-regulated residual writing. Evaluated at the 1.6B parameter scale across recurrent and hybrid configurations, Stable GDN-2 eliminates catastrophic numerical failures, guarantees an O(sqrt(T)) recurrent state norm bound, and improves long-context retrieval scores on RULER at 128K context length.

Related Ideas

Is this a good idea?

Share onXLinkedIn