[wave2water] Add MXFP4 support to fx_emitter and fix roundtrip comparison - #1228
Merged
martin-luecke merged 6 commits intoApr 10, 2026
Merged
Conversation
Water Code Coverage |
martin-luecke
force-pushed
the
users/martin/fx-emitter-fixes-mxfp4-roundtrip
branch
from
April 2, 2026 12:38
71d1596 to
0fa909c
Compare
tgymnich
force-pushed
the
tim/water-scaled-mma
branch
from
April 2, 2026 12:42
60b7cf8 to
93feeec
Compare
martin-luecke
force-pushed
the
users/martin/fx-emitter-fixes-mxfp4-roundtrip
branch
from
April 8, 2026 20:15
0fa909c to
f2d9a41
Compare
martin-luecke
commented
Apr 9, 2026
ftynse
approved these changes
Apr 9, 2026
ftynse
left a comment
Contributor
There was a problem hiding this comment.
LGTM % an ordering issue with index attrs.
…ison Signed-off-by: Martin Lücke <martin.luecke@amd.com>
Signed-off-by: Martin Lücke <martin.luecke@amd.com>
Signed-off-by: Martin Lücke <martin.luecke@amd.com>
Signed-off-by: Martin Lücke <martin.luecke@amd.com>
martin-luecke
force-pushed
the
users/martin/fx-emitter-fixes-mxfp4-roundtrip
branch
from
April 10, 2026 09:28
532e0cb to
a6c9a1e
Compare
Signed-off-by: Martin Lücke <martin.luecke@amd.com>
Signed-off-by: Martin Lücke <martin.luecke@amd.com>
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.
Teach the MLIR-to-FX importer to handle ops used by the MXFP4 GEMM kernel and fix the roundtrip comparison for MMA index expressions.
FX emitter:
_handle_mma_like_ophandling bothwave.mmaandwave.scaled_mma_handle_bitcast_opforwave.bitcast._resolve_dimmapping MLIR dimension names back to symbolic expressions.parse_ctxthrough all_convert_supported_attrscall sites.Attribute converter:
convert_index_mapping_array_to_sympy(which dispatched onop.namestrings) withconvert_index_mapping_dict_to_sympy(single mapping) andconvert_mma_index_to_sympy(MMA/ScaledMMA reconstruction with derived_dims support).Roundtrip comparison:
lhs_index,rhs_index, etc.) rather than on the combined dict. The combined dict carries Piecewise expressions over operand-selector symbols that are dead for certain dtype configurations and lost during MLIR serialization.subsintoassert_traces_equivalent