Repository navigation
MOE Sequential Block with Dispatch and Combine as Basic Ops - #3503
Conversation
|
|
/te-ci pytorch |
|
/te-ci L1 pytorch |
1 similar comment
|
/te-ci L1 pytorch |
| self.tokens_per_expert = torch.empty( | ||
| self.num_local_experts, dtype=torch.int64, device=device | ||
| ) | ||
| self.num_local_tokens = self.max_tokens_per_rank |
There was a problem hiding this comment.
Reminder for myself to set + test self.num_local_tokens = input.shape[1].
|
/te-ci L1 pytorch |
timmoon10
left a comment
There was a problem hiding this comment.
I think we can decouple the EP comm dtype from the te.autocast recipe. The EP comm dtype is determined based on how EpBuffer is configured, and there's no reason that needs to match the GEMM dtype. Why not have MXFP8 GEMMs and BF16 EP comms? Or why not have NVFP4 GEMMs and MXFP8 EP comms (you need to requantize MXFP8 to NVFP4, but the plain MXFP8 path also requires requantizing the column-wise data).
|
|
||
|
|
||
| @dataclass(frozen=True, slots=True) | ||
| class EpConfig: |
There was a problem hiding this comment.
This is included in the APIs for the dispatch and combine ops, so we should make sure this only configures the math of EP communication. There should be no NCCL EP logic.
timmoon10
left a comment
There was a problem hiding this comment.
We're seeing a DCO failure. It might be easier to flatten the branch. I've made my own branch at https://github.com/timmoon10/TransformerEngine/tree/tmoon/nccl_ep_ops with some other cleanups.
Co-authored-by: Tim Moon <4406448+timmoon10@users.noreply.github.com> Signed-off-by: Varun Thumbe <vthumbe@nvidia.com>
This comment has been minimized.
This comment has been minimized.
Signed-off-by: Varun Thumbe <vthumbe@nvidia.com>
bbef591 to
261a81c
Compare
|
/te-ci L1 pytorch |
|
Thanks @timmoon10 and @0z5a for getting the PR ahead last week. @0z5a could you please create a new PR for EP=1 case like you mentioned? It can go in after this PR merges onto main |
|
/te-ci L1 pytorch |
Description
Avoid Scale copies in our ScaledActivation TE Sequential Ops
Refactoring ep.py
ep_reference.py
MOE Dispatch/Combine Op Addition
NOTE: zero copy with NCCL EP is disallowed in the ops currently to avoid the complexity of passing additional symmetric buffers to the Ops
Fixes # (issue)
Type of change
Changes
Please list the changes introduced in this PR:
Checklist: