On SM120, cuDNN-backed SDPA is the encoder default — 203.61 TFLOP/s, 97.19% of the RTX 5090 BF16 roofline

Asked:

best available flash attention implementation for encoder like models for sm120?

Seven evidence rows as of September 1, 2026 — recommendations, one RTX 5090 forward benchmark, FlashAttention source-tree maturity facts, and one architecture caveat — cover attention backends for bidirectional, non-causal encoder workloads on NVIDIA SM120 (consumer/workstation Blackwell, e.g. RTX 5090). Throughput is in TFLOP/s, BF16.

Recommended default

PyTorch SDPA → cuDNN Attention

SM120 production path; exact non-causal encoder attention and training through PyTorch autograd.

Force CUDNN_ATTENTION to test it, but permit automatic fallback if a mask or shape is unsupported.

Use recent CUDA-enabled PyTorch/cuDNN; call F.scaled_dot_product_attention with is_causal=False. docs.nvidia.com

Bleeding-edge alternative

Dao FlashAttention CuTe, SM120 source path

Native SM120 build target; non-causal capability should be validated on the model shape.

Main repository setup now emits sm_120 code; benchmark against cuDNN before adopting.

CUDA 12.8+ and an SM120-targeted source build. github.com

Readiness matrix: each row is an implementation path, each column a capability an encoder stack needs on SM120. Filled squares are supported with cited evidence; hollow squares are unproven or not applicable on SM120. The bar on the right is the one measured RTX 5090 number against its stated roofline — forward pass only, one shape (B=1, H=8, Q=4096, KV=8192, BF16, CUDA 12.9). Hover any mark for the source detail.

Use it like this

# exact non-causal encoder attention, trains through autograd
out = F.scaled_dot_product_attention(q, k, v, is_causal=False)

# when benchmarking, pin the backend; in production keep automatic fallback
with sdpa_kernel(SDPBackend.CUDNN_ATTENTION):
    out = F.scaled_dot_product_attention(q, k, v, attn_mask=mask, is_causal=False)
cuDNN SDPA is the mature SM120 production path: exact non-causal encoder attention with training through autograd, requiring only SM80+ and CUDA 12.x — docs.nvidia.com
Dao-AILab FlashAttention now targets sm_120 in setup.py with CUDA 12.8+; forward PR #2329 is merged and an SM120 backward is committed — github.com, github.com
FlashAttention-4's 1.3× over cuDNN and up to 1613 TFLOP/s are measured on B200/GB200 datacenter Blackwell — do not infer RTX 5090 / SM120 compatibility — proceedings.mlsys.org
vLLM-Omni ships cuDNN Attention (cuDNN ≥ 9.5) as its default Blackwell backend and reports 2× end-to-end versus generic SDPA on a mask-heavy DiT workload — docs.vllm.ai

Every evidence row

TierImplementationResult / supportGuidanceSource
Recommended defaultPyTorch SDPA → cuDNN Attentioncudnn SDPA operation requires SM80 (Ampere) or newer architectures and cuda toolkit 12.x or newer.Force CUDNN_ATTENTION to test it, but permit automatic fallback if a mask or shape is unsupporteddocs.nvidia.com
Benchmark evidencePyTorch SDPA → cuDNN Attention203.61 TFLOPS (97.19% of SOL)203.61 TFLOP/s, 97.19% of the stated BF16 roofline at B=1, H=8, Q=4096, KV=8192gau-nernst.github.io
Bleeding-edge alternativeDao-AILab FlashAttention CuTe SM120 pathsupported under compute capability 120 (sm_120) with CUDA 12.8 and aboveMain repository setup now emits sm_120 code; benchmark against cuDNN before adoptinggithub.com
FlashAttention maturity evidenceDao-AILab FlashAttention CuTe SM120 forwardMergedForward support is mergedgithub.com
FlashAttention maturity evidenceDao-AILab FlashAttention CuTe SM120 backwardSM120 backward implementation committedTraining support exists in source, but validate correctness and speed for the exact workloadgithub.com
Do not confuse architecturesFlashAttention-41.3× speedup over cuDNN 9.13 and 2.7× over Triton on B200 GPUs with BF16, reaching up to 1613 TFLOPs/sDo not infer RTX 5090 / SM120 compatibility from B200 resultsproceedings.mlsys.org
Framework corroborationcuDNN Attention backendCUDNN_ATTNvLLM-Omni reports 2× end-to-end versus generic SDPA on a mask-heavy DiT workloaddocs.vllm.ai

Recommendation and evidence table for SM120 (consumer Blackwell) encoder attention: 7 rows, one per recommendation, benchmark, maturity fact or architecture caveat, compiled as of 2026-09-01. The single throughput number measures BF16 forward attention TFLOP/s on an RTX 5090 at one shape and is not a training or multi-shape result. Requirement details are shortened in the table; full text is at each source.

This report was generated automatically by Keenable SELECT at a user's request, from publicly available web sources linked herein. Keenable does not review, verify, or endorse its contents and makes no representation as to accuracy, completeness, or timeliness; AI-based extraction may contain errors. Nothing in this report is investment, legal, financial, or other professional advice. All trademarks and referenced content remain the property of their respective owners; no affiliation or endorsement is implied. To report an error, rights concern, or request removal: legal@keenable.ai.

Made withKeenable SELECT · 4,361 pages in 5m 33s · Ask your own questionShare:XLinkedInReddit
Made with Keenable SELECT