[PyTorch] Integrate cuDNN GQA + DSA backend into DotProductAttention
维护者通常 2 天内回复
@cyanguwa 已经在做这个了。
开始于 2026年5月26日。
评估
这个 Issue 还没有评估数据。
描述
Is your feature request related to a problem? Please describe.
Transformer Engine currently does not expose a path that combines Grouped Query Attention (GQA) with DeepSeek-style sparse attention (DSA), where each query token attends only to a TopK subset of key/value tokens. Several training workloads need this combination — a GQA attention shape (many query heads sharing fewer K/V heads) with a sparsity pattern that drops attention to all but a small index list per query. Without a TE-native backend, teams either fall back to community Triton kernels, which can't reach production-scale performance, or implement sparse attention outside of TE — losing autograd integration, kernel fusion, and parity with TE's existing attention features.
Describe the solution you'd like
Add a cuDNN-backed sparse-attention path inside DotProductAttention for the PyTorch frontend that:
- Recognizes a sparse-attention mode and dispatches to the new cuDNN GQA + DSA kernel
- Accepts a per-query sparse_indices tensor of shape [B, S_q, topk] selecting which K/V positions each query attends to
- Supports the standard GQA shape (num_attention_heads ≠ num_gqa_groups)
- Supports BF16 attention at minimum (FP8 indexer extension as a follow-on if needed)
- Integrates cleanly with TE's autograd and existing context-parallelism path
- Ships with numerical-equivalence tests against a reference dense-attention baseline restricted to the same TopK indices
cc: @cyanguwa
- 主要语言
- Python
- 星标
- 3.6k
- 派生
- 851
- 平均合并
- 5 天 1 小时
- 30 天内合并 PR
- 52
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NVIDIA/TransformerEngine 的其他 Issue
-
[Bug] group_quantize_fp8_blockwise: mbarrier invalidated before other threads finish waiting on it未关闭
难度 2/5 1-3 小时 新手友好度 82/100
NVIDIA/TransformerEngine#3647 ·
维护者通常 2 天内回复
-
[PyTorch] fp8_cs_quantize fake implementation returns a vector inverse scale instead of a scalar可能已有人在做 @sanjana658 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
NVIDIA/TransformerEngine#3636 · 2 条评论 ·
维护者通常 2 天内回复
-
[Bug] Backend selection picks FA3 for training with head_dim_qk=192 / v_head_dim=128, but FA3 backward cannot run it可能已有人在做 @yuweih205 于 31 天前认领。 未关闭attention
难度 2/5 1-3 小时 新手友好度 85/100
NVIDIA/TransformerEngine#3481 · 4 条评论 ·
维护者通常 2 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
NVIDIA/TransformerEngine#2189 · 7 条评论 · 5 个 reaction ·
维护者通常 2 天内回复
-
[PyTorch] CUDA graph RNG registration floods training logs on automatic-registration builds可能已有人在做 @ksivaman 今天认领。 未关闭
难度 4/5 3-5 天 新手友好度 50/100
NVIDIA/TransformerEngine#3645 · 1 条评论 · 已指派 1 人 ·
维护者通常 2 天内回复
查看 NVIDIA/TransformerEngine 的全部 Issue
相似的 Issue
-
bug ready for review
难度 2/5 1-3 小时 新手友好度 86/100
odysseus-dev/odysseus#6641 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
happypawspillaro/happypaws#78 ·
维护者通常 4 天内回复
-
pydanty:is-working
难度 2/5 1-3 小时 新手友好度 82/100
pydantic/pydantic-ai#10020 ·
维护者通常 1 天内回复
-
Bug
难度 2/5 1-3 小时 新手友好度 78/100
ansible-collections/ibm_zos_core#2650 ·
-
hw: pvc tests: vllm vllm
难度 2/5 1-3 小时 新手友好度 68/100
intel/intel-xpu-backend-for-triton#8362 ·
维护者通常 1 天内回复