Repository navigation
test(fp8): migrate remaining callers to the reference encoder (#5325) - #6254
Merged
Merged
Conversation
…er (#5325) 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.
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.
Part of #5325 (items B1, B2)
Context
The five B1 files named in #5325 and B2's
_fp8_checkpointfixture are alreadymigrated/fixed on current
mainby #5344 (3f38d5ee1) and #5678 (1531ff73f).I verified those exact nodes green on this base (evidence below). A repo-wide
sweep for the removed
TorchFP8Linear.pack*API still finds four unmigratedcallers. Because the removed packers raise
ValueError: FP8 is load-only: GPT-QModel no longer quantizes or exports FP8 weights,the three test builders are swallowed by their
except Exception: pytest.skipguards, so FP8 coverage is silently lost instead of failing loudly.
Changes
tests/test_training_kernel_inplace_4974.py::_fp8->pack_fp8_module.Restores
test_trainable_kernel_allows_inplace_accumulation[*-fp8_torch-cpu](2 CPU nodes) and makes the two
fp8_torch-cudanodes buildable on a GPU.tests/kernels/test_kernel_compile_levels_cpu.py: dedicated_pack_fp8()builder ->
pack_fp8_module; restorestest_cpu_kernel_reaches_declared_cpu_level[TorchFP8Linear].tests/kernels/test_kernel_compile_levels_quant.py::_build_fp8->pack_fp8_module; makes the CUDATorchFP8Linearcompile-level casebuildable (unverified here: CPU-only run).
tests/benchmark/benchmark_cpu_method_kernels.py::_build_fp8->pack_fp8_module; the CPU benchmark builder no longer raises.Red before (this patch reverted)
Mutation check on the originally listed B1 sites (already fixed upstream):
restoring the pre-#5344 import reproduces the exact collection error, and
restoring the removed
m.pack(linear, None, None)call reproduces the exactValueError:B2's assertion is not vacuous. Mutating the fixture back to
"weight_scale_semantics": "multiplier"fails the dense-logit check:Green after
ruff checkon all four changed files:All checks passed!Skips / unverified
CPU-only verification (
CUDA_VISIBLE_DEVICES=""). Not run: the twofp8_torch-cudanodes above,test_kernel_compile_levels_quant.py[TorchFP8Linear],and the CUDA-only FP8 nodes in
test_cuda_bias_epilogue.py,test_lora_cuda_autograd.py,test_compile_capability_4739.py(all collectcleanly). The 40 CUDA/ROCm parameters in
test_packing_numeric_boundaries.pyare skipped on this host. No ROCm host was available.