attn_qat_infer ¶
Classes¶
fastvideo.attention.backends.attn_qat_infer.AttnQatInferImpl ¶
AttnQatInferImpl(num_heads: int, head_size: int, causal: bool, softmax_scale: float, num_kv_heads: int | None = None, prefix: str = '', **extra_impl_args)
Bases: AttentionImpl[AttentionMetadata]
Source code in fastvideo/attention/backends/attn_qat_infer.py
Functions:¶
fastvideo.attention.backends.attn_qat_infer.attn_qat_infer_receipt ¶
attn_qat_infer_receipt() -> str
One-line receipt of the resolution decision (arch + kernel + quant knobs), for the selection log and for tooling. The FA4 knobs are the repo's tuned defaults passed through verbatim: qk_mode=nvfp4 (per-16 E4M3 SFs), pv_mode=bf16 -- see flash_attn/cute/README.md in the kernel repo.
Source code in fastvideo/attention/backends/attn_qat_infer.py
fastvideo.attention.backends.attn_qat_infer.is_attn_qat_infer_available ¶
is_attn_qat_infer_available() -> bool
True only when the active device has a built ATTN_QAT_INFER kernel.
The import check alone is not sufficient: CUDA 13 wheel builds can carry the sm_12x extension on any host (e.g. H100, GB200), where the import succeeds, backend selection picks this backend, and the first kernel call then fails with an unsupported-capability error instead of ever reaching the documented FlashAttention fallback in fastvideo.platforms.cuda. Gating on the active device's capability keeps that fallback working on every unsupported GPU, while sm_100a/sm_103a now resolve to the FP4 FA4 kernel (#1221).