Repository navigation
test(triage): restore the GGUF packer and build a load-only FP8 fixture (#5325) - #5678
Merged
Merged
Conversation
…re (#5325) Round 26 of the GPU-host triage found two more CPU-verifiable fixtures left red by #5242 (FP8 load-only) and #5344: - tests/kernels/test_cuda_bias_epilogue.py::_gguf was switched to the FP8 test packer, which writes weight_scale_inv/fp8_format onto a GGUF module; all four gguf_dense cases raised AttributeError: 'GGUFTorchLinear' object has no attribute 'fp8_format'. Restore GGUFTorchLinear.pack_original. - tests/kernels/test_compile_capability_4739.py::_build_fp8_model still quantized through GPTQModel.quantize(FP8Config), which now raises ValueError: FP8 is load-only. Write a transformers-style FineGrainedFP8 checkpoint (128x128 block scales) and load it with BACKEND.FP8_TORCH.
Qubitium
added a commit
that referenced
this pull request
Nov 29, 2026
…er (#5325) (#6254) B1/B2's listed call sites were already migrated on main by #5344/#5678. A repo-wide sweep still finds four callers of the removed FP8 packers: they now fail with 'FP8 is load-only' and are silently skipped, losing the FP8 training-inplace, CPU compile-level and CUDA compile-level coverage (plus the CPU benchmark builder). Use tests.fp8_test_utils.pack_fp8_module for the synthetic payloads. Co-authored-by: OpenAI Agent <[email protected]>
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.
Addresses the two CPU-verifiable items from the round-26 re-triage comment on #5325 (the rest of that issue is ROCm/CUDA-toolkit-only).
1.
tests/kernels/test_cuda_bias_epilogue.py::_gguf#5344 moved
_gguffromGGUFTorchLinear.pack_originalto the FP8 test packer along with_fp8. The FP8 packer writesweight_scale_inv/fp8_format, which a GGUF module never has, so all fourgguf_densecases raised:GGUFTorchLinear.pack_originalstill exists (andpack/pack_block/pack_gpuall delegate to it), so the fixture goes back to its own packer. The FP8 fixture keepspack_fp8_module.Repro:
python -m pytest -q tests/kernels/test_cuda_bias_epilogue.py -k gguf_dense-> 4 failed before, 59 passed for the whole file after.2.
tests/kernels/test_compile_capability_4739.py::test_fp8_static_cache_keeps_the_compile_and_beats_eager_build_fp8_modelbuilt its checkpoint withGPTQModel.load(..., quantize_config=FP8Config(...))+model.quantize(...), which is gone since FP8 became load-only:The fixture now writes a transformers-style
FineGrainedFP8checkpoint itself: the seven decoder projections of a tiny 2-layer Llama are encoded to E4M3 with 128x128 block scales (weight_scale_inv), the rest of the state stays BF16, andconfig.jsoncarries thefp8quantization_config. It is then loaded read-only withBACKEND.FP8_TORCH. The test still asserts theTorchFP8Linearkernel,_kernels_support_compile(), the static-cache graph count, the zero graph breaks and the measured compiled-vs-eager win.The test now passes here (GB10, sm_121, torch 2.15.0+cu132, Python 3.14t):
3 passedfor the file. On the pre-fix tree it fails with theValueErrorabove.format/check.shclean.Not in this PR
The round-26 ROCm/CUDA-toolkit items (A10/A11/A17, B3, B4 and the PanGu cases) need a ROCm or CUDA-toolkit host; B3's BF16 half tracks #5570, which is already merged. Item 18 needs the optional
ggufpackage.