backend: Add FP16-destination MX dequantization - #171
Closed
DanielKellerM wants to merge 2 commits into
Closed
Conversation
COMPUTE_MXDEQUANT_FP16 expands 33B -> 64B per block at up to 512b (one block per beat, width-fenced), so the 512b roundtrip is FP16 -> MXFP8 -> FP16. The FP32 -> FP16 narrowing is IEEE RNE with overflow to Inf, cross-validated against numpy's float16 cast over 4.2M vectors and mirrored in the DPI golden; the dequant engine reuses the proven FP32 expansion path and the circular pack with a parametric insert length. ComputeOps.mxfp16 elaborates the FP16 format paths in or out per instance (both quant source and dequant destination).
Collaborator
Author
|
Superseded by branch otf/mx-compute (78be850), which carries the FP16-destination dequant together with the full MX feature on current devel. |
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.
Summary
Follow-up to #167: adds
COMPUTE_MXDEQUANT_FP16(MXFP8 -> FP16, 33B -> 64B per 32-elem block) so the 512-bit configuration roundtrips FP16 -> MXFP8 -> FP16 natively, halving the expanded footprint vs the FP32 destination. Same programming model as the other ops (compute_cfg.compute_op = 5).float32 -> float16cast over 4.2M vectors (every exponent band, both signs, plus 4M randoms): zero mismatches.ComputeOps.mxfp16gates the FP16 format paths (quant source and dequant destination) in or out per instance.ComputeMxdequantFp16Width, one block per beat), covered by firing negative case 12; the beat-alignment and length-overflow fences extend to the new op.Validation
Questa 2026.1, byte-exact vs the DPI golden at every legal StrbWidth: roundtrip FP16 leg now returns FP16 (
tb_idma_mxroundtrip), FP16-destination transfers mixed into the constrained-random stall campaign (tb_idma_mxrand), throughput gate green (tb_idma_mxperf: W = 100% at the destination bus, R at the 33:64 compression ratio), all 12 negative guards fire, transpose suites unchanged.