[chore] release fastvideo-kernel 0.3.0 - #1478
Merged
Merged
Conversation
Bump fastvideo-kernel 0.2.6 -> 0.3.0 and the matching dependency pins. Highlights since 0.2.6: - FP4 quantized attention for inference (SageAttention3, Blackwell sm_120a) (#1455, #1457) - Attn-QAT FP4 training Triton kernels (#1460) - VSA-256 Blackwell fastpath via FA4 CuTe block-sparse attention (#1354) - Varlen block-sparse attention + index-native block-sparse API (#1319, #1243) - GPU-less/Docker builds and uv migration (#1437, #1466, #1127, #1279) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…l FP4 on cu130 Limit the PyPI publish matrix to Python 3.12 and torch 2.12, built for CUDA 12.6 (cu126) and CUDA 13 (cu130); torch 2.12 dropped cu128. - cu130 leg additionally targets Blackwell sm_120a and force-enables the attn_qat_infer FP4 inference kernels (CUDA 13 >= 12.8). cu126 stays Hopper-only since those kernels require CUDA Toolkit 12.8+. - Publish only the cu130 wheel to PyPI (it carries the FP4 kernels); both cu126 and cu130 remain downloadable build artifacts. PyPI cannot host two wheels with the same tag under one version, and forbids local +cuXXX tags. - Bump the sdist builder to Python 3.12 for consistency. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the version of fastvideo-kernel from 0.2.6 to 0.3.0 across several files, including configuration files, dependency lists, and documentation. There are no review comments, and I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Contributor
Merge ProtectionsYour pull request matches the following merge protections and will not be merged until they are valid. 🔴 PR merge requirementsWaiting for
This rule is failing.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fastvideo-kernel 0.3.0
The largest
fastvideo-kernelrelease since the 0.2.x line. It adds FP4 quantizedattention for both inference and training on NVIDIA Blackwell, a VSA-256 Blackwell
fastpath built on FlashAttention-4 CuTe, variable-length block-sparse attention,
an index-native block-sparse API, and a round of build/packaging improvements
(GPU-less Docker builds,
uv-based install).Highlights
attn_qat_inferpackage. ([kernel] QAD 5090: Add modified SageAttention3 FP4 inference kernels (7/12) #1455, [feat] QAD 5090: Wire the Attn-QAT inference attention backend (8/12) #1457)block_sparse_attn_from_indices) that skips the bool-mask round-trip. ([Perf] Skip bool-mask round-trip in block-sparse VSA attention #1243)uvmigration. ([bugfix]: build fastvideo-kernel on GPU-less Docker runners #1437, [Bugfix] QAD 5090: Torch.compile and other optimizations (15/12) #1466, migrate uv #1127, [misc]: standardize install instructions on uv pip install #1279)New: FP4 quantized attention — inference (Blackwell)
A new top-level, importable package
attn_qat_infer(shipped in the wheelalongside
fastvideo_kernel) provides modified SageAttention3 FP4 inference kernelsfor Blackwell. Q/K/V are quantized to FP4 with FP8 (
e4m3) scale factors during theforward pass; outputs stay in BF16/FP16. (#1455, #1457)
attn_qat_infer.sageattn_blackwell(q, k, v, is_causal=False, per_block_mean=True, single_level_p_quant=True, sm_scale=None, ...)— inputs[B, H, L, D]in BF16/FP16.fp4attn_cuda(block-scaled FP4 attention) andfp4quant_cuda(FP4 quantization), using CuTe/CUTLASS and Blackwell TMA.Requirements / caveats
New: Attn-QAT FP4 training kernels (Triton)
Triton kernels for quantization-aware attention training, mirroring the inference
quantization scheme so models can be trained to match FP4 inference numerics. (#1460)
fastvideo_kernel.triton_kernels.attn_qat_train.attention(autogradFunction) — fused forward + backward.P, with optional Q/K/V quantization; straight-through estimator on the backward pass; high-precision (BF16) accumulation. SageAttn-style K-smoothing on by default.Pquantization, global vs per-block scale factors, Q/K/V backward quant toggle, warp specialization.[1, 40, 9360, 128]case (BF16).fastvideo_kerneltop level.Block-sparse / VSA attention improvements
VSA-256 Blackwell fastpath (#1354). A FlashAttention-4 CuTe block-sparse kernel for
256-token KV blocks on Blackwell, exposed transparently through
video_sparse_attn()plus a new BSHD-native
video_sparse_attn_bshd()entry point that avoids layoutround-trips on the CuTe path.
FASTVIDEO_VSA_CUTEDSL=1; transparently falls back to the Triton backend when the optional deps are absent.nvidia-cutlass-dsl>=4.5.0,torchvision, and FlashAttention CuTe pinned toflash-attention@c19cd20e(flash_attn/cute) for signature compatibility.Varlen block-sparse attention (#1319). New
block_sparse_attn_varlen()handlespacked variable-length sequences (with mismatched Q/KV lengths) in a single launch via
cu_seqlens_q/cu_seqlens_kv, instead of one kernel call per sequence. Supportsforward and backward.
Perf: skip the bool-mask round-trip (#1243). Block-sparse kernels now operate on
compact index tensors natively.
block_sparse_attn_from_indices(q, k, v, q2k_idx, q2k_num, variable_block_sizes)avoids the bool-mask → index → bool conversions on both the forward and backward paths.block_sparse_attn(..., block_map, ...)is retained as a bool-mask wrapper for backward compatibility; both the SM90 and Triton backends were refactored to accept indices directly.Build, packaging & install
build.shno longer requires a live GPU — setTORCH_CUDA_ARCH_LIST(e.g.9.0a,12.0a) and the GPU probe is skipped. sm_120 is auto-detected to12.0aso the CMakeAUTOgate compiles theattn_qat_inferFP4 kernels instead of silently skipping them.FASTVIDEO_KERNEL_BUILD_ATTN_QAT_INFERoption (AUTO/ON/OFF;AUTOrequires CUDA ≥ 12.8 + sm_120a), replacing the older..._BUILD_MODIFIED_SAGE3. sm_90 keeps auto-enabling ThunderKittens (90a); other arches build to their detected arch.build.shclears conda-injectedCC/CXX/CFLAGS/CMAKE_ARGSand discovers the system compiler, avoidingnvccconflicts with mismatched conda toolchains.MANIFEST.inandwheel.packagesnow include theattn_qat_infer/tree (*.py/*.cu/*.cuh/*.cpp/*.h) so the new kernels ship in the sdist/wheel. Triton is now gated to Linux:triton>=2.0.0; sys_platform == 'linux'.uvmigration (migrate uv #1127, [misc]: standardize install instructions on uv pip install #1279). README andbuild.shstandardize onuv pip install; README documents requiredCUDA_HOME/CUDACXXand the optional FA4 CuTe backend for the VSA-256 fastpath.New / changed public API
sageattn_blackwellattn_qat_infervideo_sparse_attn_bshdfastvideo_kernelblock_sparse_attn_from_indicesfastvideo_kernelblock_sparse_attn_varlenfastvideo_kernelblock_sparse_attnfastvideo_kernelattn_qat_train.attentionfastvideo_kernel.triton_kernelsRequirements & compatibility
nvidia-cutlass-dsl>=4.5.0+ FlashAttention CuTe (@c19cd20e); otherwise Triton fallback.Install
PRs since 0.2.6
uv pip installuvsys_platform([feat] Job Runner UI #1172/[feat] Job Runner UI #1189); ops.py fallback cleanup