Repository navigation
Fix/epv2 fp4 push reads input - #720
Merged
Merged
Conversation
…wn sync #719 made the gather and fp4 combines share one cross-device barrier in which every block polls the peers' signals. On hosts whose local VRAM is mapped MTYPE_NC (f01) that made the gather combine 10-17 us slower than before #719, and the fp4 combine no faster than the gather at ct=512. The gather combine goes back to #719's parent's barrier, word for word. The fp4 combine goes back to the report/release sync it had before the shared barrier: every block reports to every peer, and each rank's last block collects the reports and releases the rest. Its waits are now unbounded like the gather's, instead of giving up after 65536 polls. hip_backend reserves the report/release slots behind the landing rows and rejects fp4 combine variants that differ in block count. EP4, hidden 7168, topk 6, fp4 dispatch, combine us at ct=512: f01-2 (NC): gather 52.40 -> 35.35 (8bffec7 35.23), fp4 35.00 -> 21.91 c3-1 (RW): gather 32.12 -> 33.47 (8bffec7 33.37), fp4 19.13 -> 19.46
#719 made the op copy the fp4 combine input into out_tok first (up to 65536 x 7168 bf16 a layer), because the first row load of each warp in the send stage is speculative and could read past a caller buffer shorter than the receive capacity. PUSH never exposes that buffer to peers, so the copy is not needed: a warp whose first row is at or past totalRecvTokenNum now returns before loading, and the input goes straight to the kernel. Gather and dispatch machine code is unchanged.
…ne its own sync" This reverts commit a05e7b3.
…rrier #719 made the gather and fp4 combines share one cross-device barrier in which every block polls the peers' signals. On hosts whose local VRAM is mapped MTYPE_NC (f01) that made the gather combine 10-17 us slower than before #719. The gather combine gets #719's parent's barrier back word for word; the fp4 combine keeps #719's barrier, so its machine code is unchanged.
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.
fix(ep/v2): fp4 push combine reads the input in place; restore the pre-#719 gather barrier