[Common][PyTorch] EP dispatch with unfused MXFP8 quantization - #3270
Open
phu0ngng wants to merge 13 commits into
Open
[Common][PyTorch] EP dispatch with unfused MXFP8 quantization#3270phu0ngng wants to merge 13 commits into
phu0ngng wants to merge 13 commits into
Conversation
Contributor
Greptile SummaryAdds MXFP8 support to NCCL expert-parallel dispatch and combine backward.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the previously reported repository ignore-file deletion has been fully reverted in the current head. Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant PyTorch as PyTorch EP
participant Binding as C++ Binding
participant Backend as NCCL EP Backend
participant Experts
User->>PyTorch: ep_dispatch(BF16 tokens, MXFP8 recipe)
PyTorch->>PyTorch: Quantize data and block scales
PyTorch->>Binding: Dispatch data + scale buffers
Binding->>Backend: nvte_ep_dispatch
Backend->>Experts: Route token data and scales
Experts-->>PyTorch: GroupedTensor per expert
User->>PyTorch: ep_combine backward(gradient)
PyTorch->>Binding: Reverse dispatch data + scales
Binding->>Backend: nvte_ep_combine_bwd
Backend-->>User: Grouped MXFP8 expert-output gradient
Reviews (7): Last reviewed commit: "Merge branch 'main' into ep_mxfp8" | Re-trigger Greptile |
phu0ngng
commented
Jul 28, 2026
Collaborator
Author
|
/te-ci L1 pytorch |
YangFei1990
requested changes
Aug 2, 2026
YangFei1990
reviewed
Aug 5, 2026
Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
…der CUDA graph capture Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
…CUDA-graph capture Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
Collaborator
Author
|
/te-ci L1 |
Collaborator
Author
|
/te-ci L1 |
Collaborator
Author
|
/te-ci L1 |
YangFei1990
approved these changes
Aug 7, 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
This PR adds MXFP8 support to the dispatch op of the NCCL EP path. The dispatch op is used in two places, and MXFP8 applies to both:
GroupedTensor.GroupedTensor.Type of change
Changes
PyTorch frontend (
transformer_engine/pytorch/ep.py,distributed.py,csrc/extensions/ep.cpp)**dispatch_quant_recipeis set (MXFP8BlockScalingonly for now); dispatch-forward recv is returned as a per-expertGroupedTensor. A pre-quantized input is rejected.GroupedTensor. Combine forward is unchanged (high-precision).Common backend (
common/ep/ep_backend.cpp,include/.../ep.h,comm_window.h)**NCCL EP submodule**
3rdparty/nccl-extensionsto the revision providing block-scaled dispatch.Tests (
tests/cpp_distributed/test_ep.cu,tests/pytorch/distributed/run_ep.py,run_test_ep.sh)**NVTE_EP_MXFP8_PASSrun since the grouped path pins the per-expert alignment process-wide.Checklist: