Repository navigation
Feat/pcie share - #104
Open
wtr0504 wants to merge 3 commits into
Open
Feat/pcie share#104wtr0504 wants to merge 3 commits into
wtr0504 wants to merge 3 commits into
Conversation
…ll-to-alls and H2D loads Add transfer_link_sharing (auto/pcie/nvlink/off). Without NVLink, NCCL weight all-gathers and graph all-to-alls are queued on the H2D load stream, and loads are placed only on the compute time those collectives leave free. With NVLink, collectives share one link stream of their own while loads overlap them freely. 'auto' picks the mode from NVML's NVLink state.
…d link and charge the overrun as exposure With link sharing, collectives queued on the load stream used to be windows no transfer could straddle, so a load longer than every gap before its wait could only sit right in front of it, fully exposed. Now a transfer may start in a gap and run into the next collective: on one stream that collective waits for it, and only the part past the gap is exposed. The link is free again once that collective is done, so the overrun does not cascade into the next transfer. The backward planner scores each gap by the transfer's exposure there plus the link it leaves idle, weighted by the link's load factor, so a busy link keeps a load in the gap that barely hides it while an idle one hoists it back to a gap that hides it whole. ScheduleResult reports the transfers that run into a window, and the H2D reorder log prints how many and how much they expose.
…pileConfig.pairwise_all_to_all) On PCIe without NVLink, NCCL's all-to-all runs every peer at once and the transfers contend for the same links. With pairwise_all_to_all every _c10d_functional.all_to_all_single in the graph is routed to magi::link_pairwise_all_to_all_single, which runs world_size - 1 steps with one peer in flight per rank: at step k rank r sends to r + k and receives from r - k. The exchange queues on the stream transfer_link_sharing picks for collectives, or, with link sharing off, on a stream of its own; the routing pass is then installed even without FSDP or inserted loads. The profiling estimator replays an all-to-all as the same pairwise exchange, so its cost matches what runs.
This branch has not been deployed
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.
🗂️ PR Category
📝 Description