Gate nvfp4 compute on CUDA 13+ to avoid cuBLAS failures/OOM on older builds - #15067
Gate nvfp4 compute on CUDA 13+ to avoid cuBLAS failures/OOM on older builds#15067Alan5168 wants to merge 1 commit into
Conversation
cuBLAS FP4 matmul kernels (cublasLtMatmulAlgoGetHeuristic) require CUDA 13.0+. On Blackwell GPUs with torch built against CUDA <13 (e.g. cu128), the previous check only looked at compute capability and let native NVFP4 through, causing CUBLAS_STATUS_NOT_SUPPORTED errors or VRAM blowups at matmul time. Now falls back to the regular quantized-storage path when the CUDA build is too old. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
✅ All contributors have signed the CLA. Thank you! This PR is ready to be merged. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📜 Recent review details
|
| Check name | Status | Explanation |
|---|---|---|
| Title check | ✅ Passed | The title matches the main change: gating NVFP4 compute on CUDA 13+ to avoid failures on older builds. |
| Description check | ✅ Passed | The description accurately explains the CUDA 13+ gate, the failure mode it addresses, and the test plan. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
| Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
|
I have read and agree to the Contributor License Agreement |
Summary
supports_nvfp4_compute()only checks vendor + compute capability (SM ≥ 10), so Blackwell GPUs on torch builds compiled against CUDA < 13 (e.g. cu128) still take the native NVFP4 path and fail at matmul time —CUBLAS_STATUS_NOT_SUPPORTEDfromcublasLtMatmulAlgoGetHeuristic, or large VRAM inflation / OOM. Multiple reports in Native NVFP4 (Blackwell) Loading Failure on RTX 5090 - Wan 2.2/Flux2Dev/LTX2 Workflow #11864.torch_version_numericparsing idiom; a missing/unparseabletorch.version.cudais treated as unsupported. Affected setups degrade to the regular quantized-storage path instead of erroring.Test plan
python -m py_compile comfy/model_management.pytorch.version.cudasimulated as"12.8": returns False, gating the Native NVFP4 (Blackwell) Loading Failure on RTX 5090 - Wan 2.2/Flux2Dev/LTX2 Workflow #11864 failure mode🤖 Generated with Claude Code