Skip to content

test(triage): restore the GGUF packer and build a load-only FP8 fixture (#5325) - #5678

Merged
Qubitium merged 1 commit into
mainfrom
fix/triage-round26-fixtures-5325
Nov 20, 2026
Merged

Qubitium merged 1 commit into
mainfrom
fix/triage-round26-fixtures-5325

Conversation

@Qubitium

Copy link
Copy Markdown
Collaborator

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 _gguf from GGUFTorchLinear.pack_original to the FP8 test packer along with _fp8. The FP8 packer writes weight_scale_inv/fp8_format, which a GGUF module never has, so all four gguf_dense cases raised:

AttributeError: 'GGUFTorchLinear' object has no attribute 'fp8_format'

GGUFTorchLinear.pack_original still exists (and pack/pack_block/pack_gpu all delegate to it), so the fixture goes back to its own packer. The FP8 fixture keeps pack_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_model built its checkpoint with GPTQModel.load(..., quantize_config=FP8Config(...)) + model.quantize(...), which is gone since FP8 became load-only:

ValueError: FP8 is load-only: GPT-QModel no longer quantizes or exports FP8 checkpoints.

The fixture now writes a transformers-style FineGrainedFP8 checkpoint 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, and config.json carries the fp8 quantization_config. It is then loaded read-only with BACKEND.FP8_TORCH. The test still asserts the TorchFP8Linear kernel, _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 passed for the file. On the pre-fix tree it fails with the ValueError above.

format/check.sh clean.

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 gguf package.

…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
Qubitium merged commit 1531ff7 into main Nov 20, 2026
6 checks passed
@Qubitium
Qubitium deleted the fix/triage-round26-fixtures-5325 branch November 20, 2026 05:36
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant