[misc] Clean up QAD 5090 example inference scripts - #1496
Conversation
Merge Protections🔴 1 of 1 protections blocking · waiting on 👀 reviews and 🤖 CI
🔴 PR merge requirementsWaiting for
This rule is failing.
|
|
This PR has merge conflicts with the base branch. Please rebase: git fetch origin main
git rebase origin/main
# Resolve any conflicts, then:
git push --force-with-lease |
There was a problem hiding this comment.
Code Review
This pull request refactors and updates several inference optimization scripts (FP8, NVFP4 QAT, and a new SageAttention 2 script) to use a unified TaehvDecoder class and the updated PipelineConfig system, while also updating project dependencies in pyproject.toml and adjusting a CUDA kernel. The review feedback highlights critical issues that need to be addressed: a typo in the PyTorch dependency index name in pyproject.toml, missing return_frames parameters in generator requests across multiple scripts when TAEHV is enabled (which will cause runtime crashes), and an incorrect CUDA architecture format (12.0a instead of 120a) in the environment configuration for Blackwell GPUs.
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.
4400eef to
58c3148
Compare
|
return_frames defaults to True in OutputConfig
|
|
Maintainer review + approved fix wave pushed to this branch. Review findings (5 majors, condensed):
Owner directive: keep this cleanup exactly as shaped — the deletion stands and the examples stay lean single-run examples — but separate the benchmark machinery out as its own standalone script rather than embedding multi-run stats into the examples. Pushed commits:
Validation: |
Pre-commit checks failedHi @kevin314, the pre-commit checks have failed. To fix them locally: # Install pre-commit if you haven't already
uv pip install pre-commit
pre-commit install
# Run all checks and auto-fix what's possible
pre-commit run --all-filesCommon fixes:
After fixing, commit and push the changes. The checks will re-run automatically. For future commits, |
|
CI note on the current reds — neither is caused by this PR's content:
Plan: one rebase once the resolver-test fix lands on main, which clears both in a single pass. Holding until then. |
fastvideo-kernel/benchmarks/bench_attn_kernels.py benches all four attention kernels on the real logged Wan2.1-1.3B shapes plus an L sweep (1k/4k/16k/32760, H=12 D=128 B=1): bf16_flash_attn|bf16_sdpa high-precision baseline (labels which ran) fp8_sageattn SageAttention qk-int8/pv-fp8 (PR #1496 path) nvfp4_local attn_qat_infer sageattn_blackwell (sm_120a) nvfp4_flashinfer flashinfer nvfp4_attention_sm120 (SM 12.0/12.1) Per kernel x shape: CUDA-event latency (mean/std), TFLOPS (4*B*H*L^2*D), and accuracy (cos / max abs err / mean rel err) vs a query-chunked fp32 SDPA reference. Inputs are biased (+1.0 mean shift on q/k) by default because zero-mean randn is blind to the flashinfer per-block-mean qk-correction head-broadcast bug; --include-zeromean adds the zero-mean rows for contrast. Lanes probe availability + arch gates and skip with a printed reason; oversized shapes are preflighted (chunked reference, qk_correction workspace check) instead of OOMing. Replaces bench_nvfp4_fp8_attention.py (logic folded in; docs pointer updated, CPU unit tests renamed to test_attn_kernels_bench.py and extended for the new --shapes/--bias surface).
aa4b6b0 to
4a177ef
Compare
|
/test full |
|
This PR has merge conflicts with the base branch. Please rebase: git fetch origin main
git rebase origin/main
# Resolve any conflicts, then:
git push --force-with-lease |
|
This PR has merge conflicts with the base branch. Please rebase: git fetch origin main
git rebase origin/main
# Resolve any conflicts, then:
git push --force-with-lease |
Purpose
Cleans up and homogenizes the example inference scripts involved in the 5090 QAD release
Changes
Test Plan
Tested on RTX 5090, torch=2.12, CUDA 13.0
Test Results
Verified visual quality + reported speeds
Checklist
pre-commit run --all-filesand fixed all issuesFor model/pipeline changes, also check: