Skip to content

Fix mixed-role combine staging with one pure-Attention domain - #23

Closed
Etelis wants to merge 1 commit into
mainfrom
mixed-staging-slice
Closed

Etelis wants to merge 1 commit into
mainfrom
mixed-staging-slice

Conversation

@Etelis

@Etelis Etelis commented Oct 26, 2026

Copy link
Copy Markdown
Member

Fixes a race in the opt-in mixed-role path (AFDEP_MIXED_HYBRID=1, design section 18) with exactly two NVLink domains.

The bug: domain 0 stages its combine replies at the default offset when there is only one pure-Attention domain. A domain-0 Attention GPU's next dispatch then writes its own tokens there, while its NIC may still be reading those replies. The pure-Attention domain receives corrupted rows.

The fix: domain 0 always stages in the reserved slice. That's one condition in the generated mixed combine. The slice was already reserved, so memory and latency don't change.

Validation (kermit, 2–3 nodes × 4 H200)

  • main mismatches in 4 of 4 GPU-suite runs at F = 1 and 2, BF16, capacity 512: 0.1–3.1% of the pure-Attention ranks' values.
  • With the fix, the same runs pass, as do F = 1–3 on 2 × 4 and 3 × 4, BF16 and FP8, capacities 8–512.
  • Record: docs/validation-mixed-staging-fix.json.

#22 carries the same mixed combine and will pick this up on merge.

The mixed combine kept the shared staging condition, which moves
domain-0 replies into the reserved staging slice only with two or more
pure-Attention domains. With exactly one, a domain-0 Attention GPU's next
dispatch writes its own tokens into its self-lane inbox over the default
staging while its NIC may still be reading replies for the other domain.
On 2 x 4 H200, BF16, capacity 512, the shipped tree mismatched in 4 of 4
runs; domain 0 now stages in the slice for any number of pure-Attention
domains, at no memory or latency cost. Record in
docs/validation-mixed-staging-fix.json.

Signed-off-by: Itay Etelis <92247226+Etelis@users.noreply.github.com>
@Etelis
Etelis requested a review from almogtavor as a code owner October 26, 2026 22:59
@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
PR Preview Action v1.8.2
Preview removed because the pull request was closed.
2026-10-28 07:53 UTC

Comment thread docs/design.md
and a two-buffer interleave.
([record](validation-mixed-hybrid.json))

**Fix: domain-0 combine staging with one pure-Attention domain.** The mixed combine moved

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't talk in the docs about bugs and fixes, the user doesn't need to know there was a bug or a fix. Just talk about the current state

@Etelis

Etelis commented Oct 28, 2026

Copy link
Copy Markdown
Member Author

That's just an exploration I've done, I don't feel that's the right way to go, we need to completely loose the math-based approach DeepEP uses to map experts into ranks -- We rather have a lookup table, that way we don't have any assumptions on where / # of FFN worker.

@almogtavor sorry for making you reviewing that.

@Etelis Etelis closed this Oct 28, 2026
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.

2 participants