Skip to content

perf(combine): schedule scale-out puts remote-first to mitigate node variance - #8

Open
Xuan-1998 wants to merge 1 commit into
amazon-contributing:mainfrom
Xuan-1998:combine-remote-first-order
Open

perf(combine): schedule scale-out puts remote-first to mitigate node variance#8
Xuan-1998 wants to merge 1 commit into
amazon-contributing:mainfrom
Xuan-1998:combine-remote-first-order

Conversation

@Xuan-1998

Copy link
Copy Markdown

The combine forward warps replayed tokens in the dispatch arrival order frozen into the handle, which interleaves local-bypass tokens (no RDMA) with remote tokens in a network timing dependent way. A node whose replay front loads local tokens back loads all of its scale-out puts will cause its peer node's exit-wait tail, so one node runs ~62 GB/s SO (waiting for the remote tokens to arrive since the local tokens were processed first) while the other runs ~76 GB/s SO.

So here we made both scaleup and forward warps processing remote tokens first and then local tokens to mitigate the issue.

…stagger

The combine forward warps replayed tokens in the dispatch arrival order
frozen into the handle, which interleaves local-bypass tokens (no RDMA)
with remote tokens in a network-timing-dependent way. A node whose
replay front-loads local tokens back-loads all of its scale-out puts so
with the NIC near saturation the shift never drains and surfaces as the
peer node's exit-wait tail, so one node runs ~62 GB/s SO while the other
runs ~76.

Here we make the schedule deterministic: the scale-up warps sweep the
linked list twice (remote-destined tokens first, local-bypass second)
and the forward warps replay in the same two-pass order, so count-based
tail gating is unchanged and every rank issues its puts on the same
schedule. Pass 0 flushes its TMA record and remainder batches before
pass 1 so the wire keeps draining while locals are reduced.
@Xuan-1998 Xuan-1998 changed the title perf(combine): schedule scale-out puts remote-first to mitigate node … perf(combine): schedule scale-out puts remote-first to mitigate node variance Aug 28, 2026
@Xuan-1998 Xuan-1998 closed this Aug 29, 2026
@Xuan-1998
Xuan-1998 deleted the combine-remote-first-order branch August 29, 2026 21:03
@Xuan-1998
Xuan-1998 restored the combine-remote-first-order branch August 30, 2026 13:37
@Xuan-1998 Xuan-1998 reopened this Aug 30, 2026
@vladimiraerov

Copy link
Copy Markdown

This commit also exist in https://github.com/amazon-contributing/DeepEP/pull/9/commits.
Can ww close this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants