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
Two properties of execute-time shape override (pygraph(is_override_shape_enabled=True) + execute(..., override_uids, override_shapes, override_strides)) on the unified SDPA forward engine are not documented and cost users a plan build (or an error) when hit:
Heuristic engine flips with the declared max sequence length. Between a declared max_len of 128 and 256 the mode-A heuristic switches engine (e.g. eng8 → eng10) on SM100 and SM107, independent of batch, head dims or Stats. Overriding a graph declared long to a short real shape runs the long-class engine: 2.0-2.3x slower on 4-token rows than a graph declared short (measured on B200). So callers should also class shapes as "<= 128" vs "> 128" when they build once and override.
Also worth stating in the docs: override forces the split-K factor to 1; for the cu_seq_len form this is already the case, for the per-batch seq_len form it costs 1.2-1.6x on low-occupancy shapes.
Ask
Document these in the SDPA / dynamic shape pages (and ideally surface (1) at build time rather than at execute).
Summary
Two properties of execute-time shape override (
pygraph(is_override_shape_enabled=True)+execute(..., override_uids, override_shapes, override_strides)) on the unified SDPA forward engine are not documented and cost users a plan build (or an error) when hit:s_q == 1boundary cannot be crossed. A graph built withs_q == 1(decode class) rejects an override tos_q > 1and vice versa withCUDNN_STATUS_NOT_SUPPORTED_INVALID_DYNAMIC_SHAPE. Callers have to keep separate graphs for the two classes (FlashInfer does: perf(prefill): build the cuDNN ragged graph once per length class via execute-time shape override; keep single-token GQA rows off cuDNN (NVBug 6783545) flashinfer-ai/flashinfer#5245).max_lenof 128 and 256 the mode-A heuristic switches engine (e.g.eng8→eng10) on SM100 and SM107, independent of batch, head dims or Stats. Overriding a graph declared long to a short real shape runs the long-class engine: 2.0-2.3x slower on 4-token rows than a graph declared short (measured on B200). So callers should also class shapes as "<= 128" vs "> 128" when they build once and override.Also worth stating in the docs: override forces the split-K factor to 1; for the
cu_seq_lenform this is already the case, for the per-batchseq_lenform it costs 1.2-1.6x on low-occupancy shapes.Ask
Document these in the SDPA / dynamic shape pages (and ideally surface (1) at build time rather than at execute).
note to self: claude::61d24ed2-7c90-4a97-9cbb-b91ae18136fd — "flashinfer frost prefill/GEMM enablement" · cwd /home/scratch.yanxu_libs/flashinfer