Repository navigation
Conversation
ariscript
requested review from
BKP,
artulab,
drprajap,
efric,
mawad-amd,
neoblizz and
nirvedhmeshram
as code owners
October 29, 2026 19:10
ariscript
force-pushed
the
arprakas/plan-destinations
branch
from
October 29, 2026 22:26
2ce10da to
c1bd950
Compare
Contributor
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
5 open issues
dst_basebeing optional here can silently compute an incorrect destination offset whendstis a… · New Same issue as the Triton TriggeredView docstring: the text implies group semantics apply… · New The limit check now covers more than writers (it also incorporates grouped arrivals via… · New This docstring is inaccurate for theowner == rankcase whenchunk.groupis set:view_words()… · Newbind_sdma_ep()is called inside the inner loop (andchain_bytes()also binds internally), which… · New
What changed in this PR
This PR extends triggered plans to support non-default destination placement, selective peer delivery, and grouped arrivals to enable patterns like reduce-scatter inboxes, all-gather into staging buffers, and two-shot all-reduce.
Changes:
- Add destination placement (
TriggeredPlan(destination=...),Region(dst_offset_bytes=..., dst_stride_bytes=...)) and propagate it through schedule builders and SDMA arming. - Add selective delivery (
Chunk(peers=...)) and grouped arrivals (Chunk(group=...),TriggeredView.group_arrived()/wait_group()). - Update disjointness validation to check destination bytes per receiver (and protect own sent bytes when destination is the buffer).
| File | Description |
|---|---|
| tests/unittests/test_plan_view_gluon.py | Updates view gate partitioning and adds tests for recipients/groups in Gluon. |
| tests/unittests/test_plan_view.py | Updates view gate partitioning and adds tests for recipients/groups in Triton view. |
| tests/unittests/test_plan_schedule.py | Adds unit tests for destination defaults, builders landing in dst, dst pitch, peer filtering, and per-receiver disjointness checks. |
| tests/unittests/test_plan.py | Adds integration tests for tiling into staging w/ pitch, reduce-scatter inbox + wait_group, and chunk-to-some-peers. |
| iris/experimental/plan/triton.py | Bumps ABI, expands view record layout, and implements group arrival/wait logic. |
| iris/experimental/plan/triggered.py | Adds destination support, per-peer queue sizing, group gate allocation, updated view encoding, and per-receiver overlap validation. |
| iris/experimental/plan/schedule.py | Extends Region with destination placement, Chunk with peers/groups, updates builders, validate(), and check_disjoint() logic. |
| iris/experimental/plan/kernels.py | Updates wait_kernel to use per-chunk arrival word + expected-per-round derived from records. |
| iris/experimental/plan/gluon.py | Mirrors Triton TriggeredView changes (arrival word/expected + group wait APIs). |
| iris/experimental/plan/armer.py | Adds dst_pitch to Copy, updates per-peer queue sizing for selective peers, and uses destination pitch for tiled copies. |
| docs/reference/host/plan.md | Exposes group_arrived/wait_group in API reference. |
| docs/conceptual/triggered-plans.md | Documents destinations/peers/groups and updates constraints/limits accordingly. |
Review effort: Lite
ariscript
force-pushed
the
arprakas/plan-destinations
branch
from
October 30, 2026 21:22
ffb6dfc to
e7f3d33
Compare
…in arrival groups - TriggeredPlan(destination=...) lands peers' chunks in another symmetric tensor, and Region(dst_offset_bytes=, dst_stride_bytes=) places each region at its own offset and row pitch there (staging buffers, reduce-scatter inboxes). The schedule builders take dst= and dst_base=. - Chunk(peers=...) sends a chunk to only some ranks; ranks it does not go to neither receive nor wait for it, and completion counts only the peers a rank sends to. - Chunk(group=...): chunks of a group signal one arrival counter at each receiver, and TriggeredView.wait_group() / group_arrived() wait for all of them at once. - The overlap check is per receiver, on destination bytes; with the buffer as destination, what lands on a rank must also miss the bytes it sends (the previous rule, generalized). - Each chunk record now names the gate word that shows it on this rank and how much it grows per round, so arrived() and the wait kernel treat own, grouped, ungrouped and not-addressed chunks alike. Tests pass at 2 and 4 ranks on MI300X (torch allocator). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…work - The schedule builders now require dst_base whenever dst is given: without it, a slice of the destination silently landed at offset 0. - arrived()'s docstring says groups apply to other ranks' chunks; a rank's own chunk always reads its counter. - The round-limit error names group counts too, not only writers. - Each plan computes its per-peer queue bytes once instead of every round. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
prepare_all_gather (#609) checks a caller's schedule with the plan's _rows(schedule); keep that helper and give the per-region version its own name. An all-gather sends every chunk in place to every rank, so it now rejects chunks with peers or destination offsets. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ariscript
force-pushed
the
arprakas/plan-destinations
branch
from
October 30, 2026 22:43
e7f3d33 to
883de57
Compare
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.



What changes
TriggeredPlan(destination=...)lands peers' chunks in another symmetric tensor.Region(dst_offset_bytes=, dst_stride_bytes=)places each region there at its own offset and rowpitch. The schedule builders take
dst=/dst_base=.Chunk(peers=...)sends a chunk to only some ranks. Other ranks neither receive it nor wait for it.Chunk(group=...): a group's chunks signal one arrival counter at each receiver.TriggeredView.wait_group()/group_arrived()wait for all of them at once.itself, what lands on a rank must also miss the bytes that rank sends; that is the previous rule,
generalized.
round.
arrived()andplan.wait()therefore treat own, grouped, ungrouped and not-addressedchunks alike.
Testing (MI300X, torch allocator)
test_plan.pyat 2 and 4 ranks. New tests:wait_groupin theconsumer kernel;