Enable native PAT AVG #511
Open
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:
Implements native AVG support for the PAT (Parallel All-to-All Transpose) algorithm in ReduceScatter.
Problem
Baseline NCCL doesn't support PAT + AVG op.
NCCL_ALGO=reducescatter:patis NOT SET: NCCL would fallback back to Ring algorithmNCCL_ALGO=reducescatter:patis SET: fail withncclInvalidUsage - Error : no algorithm/protocol available for functionSolution
This diff enables native AVG with PAT algorithm for reduce scatter. It divides integer nRanks at last step when writing final sum result into recvbuf.
Documentation Added:
meta/collectives/docs/ReduceScatterPat.md- Comprehensive PAT algorithmdocumentation including 5-phase breakdown and 8-rank visualization
meta/collectives/docs/ReduceScatterPatAvg.md- PAT AVG design details,multi-chunk handling, and implementation notes
Key Implementation:
isFinalWriteflag toncclPatStepstruct (set in Phase 4) to correctlyapply division for all chunks in multi-chunk transfers (fixes large message bug)
division as a postOp in final write step
Meta overlay pattern used to minimize upstream changes:
[META:PAT_AVG]comments forrebasing tracking
Differential Revision: D91948601