Uh oh!
There was an error while loading. Please reload this page.
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 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
fanshiqing
commented
May 18, 2026
/te-ci L1 pytorch |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
3e70bdf to
ed9ce68CompareUh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Jieming Zhang <jiemingz@nvidia.com> Signed-off-by: Shiqing Fan <shiqingf@nvidia.com>
Uh oh!
There was an error while loading. Please reload this page.
Signed-off-by: Shiqing Fan <shiqingf@nvidia.com>
Uh oh!
There was an error while loading. Please reload this page.
Signed-off-by: Shiqing Fan <shiqingf@nvidia.com>
Uh oh!
There was an error while loading. Please reload this page.
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>
Signed-off-by: Shiqing Fan <shiqingf@nvidia.com>
…red weights Signed-off-by: Shiqing Fan <shiqingf@nvidia.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Signed-off-by: Shiqing Fan <shiqingf@nvidia.com>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- 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>
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
timmoon10
commented
Jul 16, 2026
/te-ci pytorch L1 |
Signed-off-by: Shiqing Fan <shiqingf@nvidia.com>
Uh oh!
There was an error while loading. Please reload this page.
- 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>
timmoon10
commented
Jul 20, 2026
/te-ci pytorch L1 |
fanshiqing
commented
Jul 21, 2026
@timmoon10 Hi Tim, the online building (core/Jax/Pytorch) failed but from the log it seems it's |
Uh oh!
There was an error while loading. Please reload this page.
…ble bypass GTP MR for TE has been merged and will be released since TE>=2.19 (NVIDIA/TransformerEngine#3005) Signed-off-by: Shiqing Fan <shiqingf@nvidia.com>
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: