Docs: how the compute split cuts programs and carries values across cuts #2325

Closed
Kalmarv wants to merge 1 commit from upstream-pr/2335 into main
Kalmarv commented 2026-11-25 15:00:05 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Kalmarv on 2026-11-25T15:00:05Z.


A design note for the compute split (gpu/dxil/module/split.rs, from #2080, #2107 and #2126), so whoever changes it next, and whoever reviews that change, doesn't have to rebuild the reasoning from the code. It covers three things:

  • why the cuts are at CFG edges and loops stay whole;
  • how live values cross a cut and where they are restored;
  • what the fixed per-value payload slots guarantee, and what they cost in scratch size.

What is in it

  • docs/compute-split.md (new, 84 lines). No code change.

Tested

  • Docs only: no build or test run. Every statement was checked against split.rs, kernel.rs (dispatch_piece_limit), pso.rs (record_dispatch_chain) and real/dispatch_chain.rs on main 06c9f55.

Not tested

  • Nothing runs. split.rs's module comment still says "Each crossing edge has its own compact state layout". That predates #2126's fixed per-value slots. It changes with the next code change to split.rs rather than in this docs-only PR.

AI use

  • Claude Code (Claude Opus 5.5) wrote the note from the code; I checked it against the source.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:6607398615 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2335). Originally posted by [Kalmarv](https://github.com/Kalmarv) on 2026-11-25T15:00:05Z. --- A design note for the compute split (`gpu/dxil/module/split.rs`, from #2080, #2107 and #2126), so whoever changes it next, and whoever reviews that change, doesn't have to rebuild the reasoning from the code. It covers three things: - why the cuts are at CFG edges and loops stay whole; - how live values cross a cut and where they are restored; - what the fixed per-value payload slots guarantee, and what they cost in scratch size. **What is in it** - `docs/compute-split.md` (new, 84 lines). No code change. **Tested** - Docs only: no build or test run. Every statement was checked against `split.rs`, `kernel.rs` (`dispatch_piece_limit`), `pso.rs` (`record_dispatch_chain`) and `real/dispatch_chain.rs` on `main` `06c9f55`. **Not tested** - Nothing runs. `split.rs`'s module comment still says "Each crossing edge has its own compact state layout". That predates #2126's fixed per-value slots. It changes with the next code change to `split.rs` rather than in this docs-only PR. **AI use** - Claude Code (Claude Opus 5.5) wrote the note from the code; I checked it against the source. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
upstream-sync closed this pull request 2026-11-25 15:07:41 +00:00
Kalmarv commented 2026-11-25 15:08:05 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Kalmarv on 2026-11-25T15:01:42Z.


Closing: a separate docs PR isn't worth a review slot. The short version lives in split.rs's module comment instead (corrected in #2097).

AI use: Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7166188745 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2335#issuecomment-7166188745). Originally posted by [Kalmarv](https://github.com/Kalmarv) on 2026-11-25T15:01:42Z. --- Closing: a separate docs PR isn't worth a review slot. The short version lives in split.rs's module comment instead (corrected in #2097). AI use: Claude Code (Claude Opus 5.5).

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!2325
No description provided.