You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once the upstream bottom-right is_causal support lands and is pinnable, emit the maskless static-cache attention graph directly:
Attention(..., is_causal=1, nonpad_kv_seqlen=<seqlens_k>) # no explicit attn_mask, no past_key
This is the end-state for the static-cache (--static-cache, ONNX Attention + TensorScatter in-place KV-cache) path. It is strictly better than the explicit-mask form on two axes: fewer nodesandFlash-eligible (an explicit attn_mask forces the Memory-Efficient Attention kernel; the maskless form routes to Flash for fp16/bf16).
Background
mobius #340 originally proposed "Option-Y" as a bridge: is_causal=0 + an explicit offset-aware causal mask + nonpad_kv_seqlen, which forces ORT to the MEA kernel — the only currently-runnable static-cache config, because today's opset-24 Attention CUDA kernel rejects is_causal=1 + nonpad_kv_seqlen (no past_key, S_q != total_kv) with NOT_IMPLEMENTED.
Option-Y was dropped, not landed (the bug-fix half of #340 shipped separately as #351). So there is nothing to revert — this issue now tracks emitting the maskless end-state directly.
Dependency chain
The blocker is not "PR merged" but "a released ORT containing the kernel fix, pinned by mobius":
Goal
Once the upstream bottom-right
is_causalsupport lands and is pinnable, emit the maskless static-cache attention graph directly:This is the end-state for the static-cache (
--static-cache, ONNXAttention+TensorScatterin-place KV-cache) path. It is strictly better than the explicit-mask form on two axes: fewer nodes and Flash-eligible (an explicitattn_maskforces the Memory-Efficient Attention kernel; the maskless form routes to Flash for fp16/bf16).Background
mobius #340 originally proposed "Option-Y" as a bridge:
is_causal=0+ an explicit offset-aware causal mask +nonpad_kv_seqlen, which forces ORT to the MEA kernel — the only currently-runnable static-cache config, because today's opset-24AttentionCUDA kernel rejectsis_causal=1+nonpad_kv_seqlen(nopast_key,S_q != total_kv) withNOT_IMPLEMENTED.Option-Y was dropped, not landed (the bug-fix half of #340 shipped separately as #351). So there is nothing to revert — this issue now tracks emitting the maskless end-state directly.
Dependency chain
The blocker is not "PR merged" but "a released ORT containing the kernel fix, pinned by mobius":
is_causal+nonpad_kv_seqlen(external KV cache)Attentionkernels for bottom-rightis_causalwithnonpad_kv_seqlen(nopast_key), and composedis_causal+attn_mask, per onnx/onnx#8068 microsoft/onnxruntime#28904 / Fix Attention is_causal bottom-right alignment for external KV cache (onnx#8068, #28904) microsoft/onnxruntime#28958 — CPU/CUDAAttentionkernel implementing it (masklessis_causal=1+nonpad_kv_seqlenbecomes Flash-eligible)Action (when the pin can bump)
is_causal=1+nonpad_kv_seqlen.