Generalized Tensor Parallelism (GTP) #3005
Conversation
Greptile SummaryThis PR introduces Generalized Tensor Parallelism (GTP) support into TransformerEngine by adding a
Confidence Score: 3/5The fused CuTeGEMM path embeds GTP-specific attribute access outside the protocol, and the wgrad finalization relies on an in-place side-effect contract that is not enforced or clearly documented. The fused CuTeGEMM path hard-codes GTP-internal attributes outside the protocol contract (is_routed_expert, weight_list), and the finalize_weight_grads in-place side-effect is load-bearing but undocumented — the test FakeDistributedWeight does not exercise the production assumption, leaving the in-place contract untested. transformer_engine/pytorch/ops/fused/grouped_mlp.py (GTP-specific assertions at lines 921-922) and transformer_engine/pytorch/ops/basic/grouped_linear.py (finalize_weight_grads return-value contract in both backward methods). Important Files Changed
Reviews (26): Last reviewed commit: "Unify distributed-weight wgrad finalize ..." | Re-trigger Greptile |
|
/te-ci L1 pytorch |
3e70bdf to
ed9ce68
Compare
Co-authored-by: Jieming Zhang <jiemingz@nvidia.com> Signed-off-by: Shiqing Fan <shiqingf@nvidia.com>
Signed-off-by: Shiqing Fan <shiqingf@nvidia.com>
Signed-off-by: Shiqing Fan <shiqingf@nvidia.com>
Signed-off-by: Shiqing Fan <shiqingf@nvidia.com>
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
Signed-off-by: Shiqing Fan <shiqingf@nvidia.com>
Signed-off-by: Shiqing Fan <shiqingf@nvidia.com>
Signed-off-by: Shiqing Fan <shiqingf@nvidia.com>
for more information, see https://pre-commit.ci
…ped MLP" This reverts commit 8bb26f0. Signed-off-by: Shiqing Fan <shiqingf@nvidia.com>
Signed-off-by: Shiqing Fan <shiqingf@nvidia.com>
…red weights Signed-off-by: Shiqing Fan <shiqingf@nvidia.com>
Signed-off-by: Shiqing Fan <shiqingf@nvidia.com>
- Take a single leader weight in the DistributedWeight dispatchers - Gather the FC2 grouped weight late in the fused grouped MLP Signed-off-by: Shiqing Fan <shiqingf@nvidia.com>
…ht before the NVFP4 dgrad dispatch Signed-off-by: Shiqing Fan <shiqingf@nvidia.com>
- Rename gather coalescing flag grouped -> external_coalescing; - Clean up DistributedWeight wiring in TE modules - Restructure _all_gather_nvfp4 Signed-off-by: Shiqing Fan <shiqingf@nvidia.com>
Signed-off-by: Shiqing Fan <shiqingf@nvidia.com>
|
/te-ci pytorch L1 |
Signed-off-by: Shiqing Fan <shiqingf@nvidia.com>
- Add a self-contained dispatch test with a fake DistributedWeight implementer Signed-off-by: Shiqing Fan <shiqingf@nvidia.com>
- `finalize_weight_grads` now accepts a weight list or a bare leader, mirroring materialize_weight_for_backward; - Centralize the in-place / dummy / async-None finalize contract in DistributedWeight.finalize_group_grads and delegate the dispatcher docstring to it. Signed-off-by: Shiqing Fan <shiqingf@nvidia.com>
|
/te-ci pytorch L1 |
|
@timmoon10 Hi Tim, the online building (core/Jax/Pytorch) failed but from the log it seems it's |
Description
Core-idea: add Generalized Tensor Parallelism (GTP), which is a flexible fine-grained sharding/just-in time materialization of both activations and parameters with efficient computation-communication overlap.
Mission: improve LLM pretraining efficiency through generalized tensor parallelism, enabling high performance, memory efficiency, ease of use, and strong scalability.
GTP introduction
GTP_introduction.md
How Mcore interacts with TE
• TE ships self-contained: Protocol + dispatcher no-op.
• GTP lives 100% in Mcore as one protocol implementer.
Type of change
Changes
Please list the changes introduced in this PR:
Checklist: