Triton Flash Attention V2 banner
anthony-maio anthony-maio

Triton Flash Attention V2

Development community

Description

--- name: triton-flash-attention-v2 description: Implement FlashAttention v2 kernels in Triton with online softmax, causal masking, GQA head routing, multi-stream accumulators, and fused epilogues. --- # FlashAttention v2 kernels in Triton > **Targets:** Triton >= 2.1, SM70+/CDNA2+ ## Overview FlashAttention v2 computes `O = softmax(QK^T / sqrt(d_k)) V` without materializing the N×N attention matrix. The kernel iterates over K/V blocks, maintains running softmax statistics `(m, l, acc)` in r

Installation

Installs to ~/.claude/skills/anthony-maio-triton-skills-triton-flash-attention-v2/SKILL.md

Terminal
mkdir -p ~/.claude/skills/anthony-maio-triton-skills-triton-flash-attention-v2 && curl -fsSL https://raw.githubusercontent.com/anthony-maio/triton-skills/HEAD/skills/triton-flash-attention-v2.md -o ~/.claude/skills/anthony-maio-triton-skills-triton-flash-attention-v2/SKILL.md

Restart Claude Code, or start a new session, for it to be picked up.

Full documentation available on GitHub

View Source Repository