[ROCm]: fix: JAX/TE sharding compatibility and tmem reduction foundations (PR1)#4191
Open
cj401-amd wants to merge 5 commits into
Open
[ROCm]: fix: JAX/TE sharding compatibility and tmem reduction foundations (PR1)#4191cj401-amd wants to merge 5 commits into
cj401-amd wants to merge 5 commits into
Conversation
4f116aa to
2f5fa82
Compare
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
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
logical_axis_rulesto only include axes present in the mesh,preventing crashes when
fsdp_transposeor other axes are absentskip_trivial_specsparameter tomaybe_shard_with_logicaltoskip no-op resharding constraints (all-None PartitionSpecs), reducing XLA overhead
reshard()for explicit shard mode; replacejnp.einsumscaleapplication with direct multiply to avoid unnecessary XLA ops
mask_type="causal"directly instead ofmaterializing the full
[seq, seq]attention mask — avoids ~5 GiB temp memory fromXLA
loop_broadcast_fusionhoisting the mask into the pipeline scan carryscale_factorandcontext_parallel_strategyparams from
DotProductAttentionfor newer TransformerEngine compatibilitygrad_dtypecast whengrad_dtype == float32;set
flax_always_shard_variable=Falseserialize()API change (tuple vs bytes return type);pyink formatting
pipeline_save_decoder_layer_inputflag (used by PR 2)Test plan
python3 -m pytest tests/unit/train_compile_test.py -v -k "test_save_compiled_v5e or test_save_compiled_v4"