UCP: Tune Alltoall pairwise posting depth - #1343
Draft
jeffnvidia wants to merge 3 commits into
Draft
Conversation
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.
What
Replace the binary automatic choice of posting either one or all peer transfers with a coarse posting-depth selector. Explicit
ALLTOALL_PAIRWISE_NUM_POSTSvalues remain authoritative.The existing 66,000-byte aggregate-message behavior is retained. The exact 64 KiB boundary is a separate per-peer threshold. Per-peer bytes use the same calculation as the progress path.
Why
The current automatic selector uses one outstanding send and receive for every team larger than 32 ranks once the aggregate message exceeds 66,000 bytes, while teams of at most 32 ranks post the full team. The former serializes small and medium peer transfers too aggressively; the latter can over-post medium and large transfers.
NUM_POSTS=Plimits incomplete sends and receives independently, so intermediate depths provide useful admission control without changing peer order or the UCP data path.Evidence
Retrospective streaming scoring over the existing tuning corpus gives:
The selector intentionally preserves full posting for teams of eight ranks or fewer: throttling those teams did not provide a robust cross-protocol benefit, and it caused 5--25% regressions above 8 MiB per peer.
Fresh held-out Gaia validation used PPN8, streaming cadence, the default UCX protocol selection, and nine non-power-of-two sizes from 48 KiB through 12 MiB per peer. Performance scoring compares the explicit depth selected by this rule against the explicit depth selected by the old rule; the focused unit tests independently verify the automatic mapping at every boundary.
One optional P4 stress control at 64 ranks and 12 MiB per peer timed out; both the old and proposed selectors use P1 there and completed. Two of 66 position-rotated launches hit an existing UCX
lanes_distanceassertion before producing a timing; the other 64 launches completed and those two infrastructure failures are excluded.Older Doris measurements have positive aggregate scores but mixed individual cells and anomalously low values in two 64-rank streaming cases. They are not included in the no-regression statements above, and fresh Doris validation was not available.
Impact
This changes only automatic posting-depth selection in the TL/UCP pairwise Alltoall algorithm. It does not change Alltoallv, topology-aware peer ordering, or user-configured posting depths.
Checks
make distpasses, and the resulting source tarball contains the new selector header.git diff --check origin/master...HEAD.