MXFP8 training bug fixes for quantized_model_init and Torch FSDP fp8 all gather#587
Open
sudhu2k wants to merge 2 commits into
Open
MXFP8 training bug fixes for quantized_model_init and Torch FSDP fp8 all gather#587sudhu2k wants to merge 2 commits into
sudhu2k wants to merge 2 commits into
Conversation
…el_init case and not just autocast case. Fix padding during fp8 all-gather
alextmagro
requested changes
May 19, 2026
| # NOTE: ROCm/HIP backend uses an unpadded scale-inv layout (see `MXFP8Quantizer.make_empty`), | ||
| # so applying the padding here would produce a per-shard scale-inv whose dim-0 | ||
| # does not match the destination scale-inv allocated for the FSDP2 local shard. | ||
| padding_multiples = [128, 4] if not IS_HIP_EXTENSION else [1, 1] |
Contributor
There was a problem hiding this comment.
I think for gfx1250 we have some other padding requirements, this should be unified with #568
Contributor
Author
There was a problem hiding this comment.
Agreed. These changes should also be present in that PR accordingly. But I think for now, let's fix the issue on existing archs and make the appropriate changes along with the #568 PR.
Contributor
There was a problem hiding this comment.
OK, @matthiasdiener can you work with Sudharshan make sure this is in your PR one way or another?
… on scale_inv_out
Contributor
|
LGTM! Just sync with Matthias on that one padding thing please. |
alextmagro
approved these changes
May 19, 2026
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.
Description
Ensure
keep_fp8_weight_transpose_cacheflag is set toTruenot only for autocast but also for quantized_model_init.Fix padding during fp8 all-gather
Fixes: #15425
#15420
Type of change
Checklist: