Plan for extracting focused PRs from #2778 #2777

Open
opened 2026-11-26 12:35:57 +00:00 by KOLESNiii · 9 comments
KOLESNiii commented 2026-11-26 12:35:57 +00:00 (Migrated from github.com)
Contributor

Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-26T12:35:57Z.


Take the correctness fixes and self-contained improvements from #2778. Extract the larger runtime changes only where they solve a demonstrated problem. Leave the unfinished eviction and sparse planning systems on the branch.

This is a breakdown of #2778 at a4f0399f19e4 against main at b49be1836844 (371 commits, 70 files). The commit IDs identify the changes to extract. Each row proposes one PR unless it gives an explicit sequence. Rebase the behavior and its tests onto current main, preserving attribution. The overlap notes at the end are for avoiding duplicate submissions.

The commit-by-commit plan below gives the pick order and prerequisites, starting with the three slices requested on #2778.

Worth pulling first

Proposed PR Change from #2778 and what the PR should demonstrate
Signal DirectStorage events in request order 3fd55dff. Implement the X1 event marker through the existing retirement path. Test sequential and parallel retirement and caller handle closure. This addresses a title wait that otherwise has no completion event.
Order a list wait after its deferred CPU write 311fc618 with the minimum write-producer tracking from 62de4d55 / b3d9441e. Prove a preceding CPU store becomes visible before the waiting continuation and independent stores stay asynchronous. Add immutable submission-effect capture (1b0b589c) only to the extent the fix needs it.
Keep failed native lists out of Execute Start with the put-off segment Close fix (3364f184). Follow with separate split-continuation reservation and Kickoff Close/Reset recovery PRs (d5aa0a6a, 617b493d, 03e4d27d, 73898793, 974e3395). Use fault injection to show the prior valid recording survives and the failed segment never executes.
Retire object bookkeeping at the right lifetime boundary Separate PRs for command-list and heap address reuse (2d8b8295, fb810988). For allocators, first reserve the recorded backing before native Execute (06d03e60), then retain it and its UMA through the correct retirement/reset (93693054, 9ec2b4a3). Cover creation on a rotated backing (3d0d0558) where that path needs a follow-up. Exercise address reuse, outstanding work, and Reset/Release.
Recover sparse uploads without losing work Three PRs in order. Bound ring waits and refuse unsafe reuse (faea307a, 37271a3c). Publish sent hashes only after a successful queue signal (41a369ee). Preserve and retry the dirty snapshot and stop submission when ordering remains unknown (3cd053e4). Test Close/Wait/Signal failure, including partial batches. Separately take 054270ca to preserve newer CPU writes during sparse copyback.
Fix the selected PSO and complete worker failures Take the ExecuteIndirect stand-in classification fix (4e62e7c8)) and failed-job completion (0eaef7e6)) as separate PRs. Cover completion during bind and cancellation/failure waking waiters. Take cold builds off bind threads (aff341e1) separately, with early wanted promotion (11cf89f9) and bounded-wait segmentation (76e87252) split out by behavior.
Fix DispatchX thread dimensions Split ba659963 into whole-group conversion and tail-lane masking with deferred replay. Test non-multiples of the group size, multidimensional IDs, and overflow. Both behaviors are needed for partial-group parity.
Preserve pipeline stream state One PR for compute FLAGS (2bfc36eb), another for graphics projection/cache safety (32ecdb27), then faithful extended rasterizer state (e3a52f43). Keep native-stream caching (9e82e2aa, 6457c188) separate until identity and rejected-blob fallback are tested.
Fix linked DXC error handling and argument forwarding Split b271eba5 into retryable OOM and forwarding optimization/extra arguments. Test that OOM leaves linking enabled and that arguments reach the live linker. Review slot admission (2e45718b) separately with concurrent callers.
Fix cache identity before expanding persistence Separate stale-generation invalidation (fba7de2b)), static-sampler identity (be772deb), and node/device and graphics identities (e5d2e5ee, 4cd1b772, 5afb11ad, 14524632). Test stale rejection after replacement and differing roots/node masks. Extract graphics precompile parity (5d91261c`) as its own PR with a cold-cache runtime hit test.
Fix descriptor bounds and sparse object ownership Take descriptor bounds (b0deef15)) separately from lock elision. Take generation-checked sparse placed-buffer publication (7619ff8c)) separately. Test stale state and COM address reuse.
Land small, independently measurable improvements One PR each for unsplit shader-cache buffer reuse (355826c5), single-copy DXIL containers (3cf3451c), loader range rejection (b59e59b6), zero-mip staging reuse (396a4144), streaming shader effects plus its far-jump cap (e67817e4, 911ad65d), contiguous 2D tiling runs (b81ac2eb), and BCPack bit packing (9fdfe6c9). Require byte/output parity and measure the operation being improved. For Opus, split scratch reuse and validation (5a5b6504)) from PCM copying and output preallocation (87c5c52c, 2a577d7d). For frame pacing (75c4a245`), split writable-target validation from removing wait allocations.

Worth extracting as stacks, with a measured reason to activate them

  1. GPU-ordered texture uploads. Port the submitting-queue path and its page-mapping wait together (d8ddd5b5, e12049fe). The commit reports 3 hangs in 4 RTX 3080 world-load runs before the wait and 0 in 7 with it. Those runs support the dependency and need repeating on the extracted PR. Preserve staging ownership after a failed wait (0ea9a959) and per-queue ordering (23d7f4e8) in the activation or its prerequisites. Omit the reverted intermediate upload implementation (01c0835a and its revert).
  2. GPU-written texture copyback. First take owned queue snapshots and exact retirement as separate prerequisites (d93c63a7, c52ad726, 0540a23c, 9374675e, 12b1b786). If needed, land native queue-slot dispatch and submission ordering independently (89343644, e10df30d, 87b55ac8). Then split copyback into reverse layout conversion (b7af0096), generation/subresource writer and transition tracking (972f66ec, 24ffb0e7, b0442a22), writer-queue staging and lifetime (e564cbb7, fafeee3e), and publication before the title observes fence completion (4cc28d40, 547f3211). Activate with a title-path regression covering partial subresources, two queues, and failed waits.
  3. PSO build coalescing and priorities. First separate stand-in ownership from build lifetime (6f6b5a27), then define and test canonical identity (0fef9d5a, 67629ad4, fedfbe4c), then enable in-process coalescing (b946815d). Measure duplicate builds and first-use wait time. Review priority queue activation (e7c522d8, 2ccea5e1), bounded compile helpers, and prior-use preload ranking (56cffc2b) independently. Keep off-bind used-key journaling (7ea65ea9, 77eb9e7f) separate and test shutdown and ordering.
  4. Split ExecuteIndirect. Split indirect root ABI and execution (202c9623, ffac3219, 2a6a8ba2), per-recording command storage reuse (aa446c29), and used-only prewarming (c162ffb1, 6495067f). Compare direct/indirect output, first-use wait, and GPU time per piece. Review whole-build failure memoization (deb5fccf) separately with transient OOM recovery.
  5. Shader lowering. Each DXIL change needs its own parity tests and emitted-size or compile-time evidence. Start with carries, min/max, bit masks and signed FFBH, frexp/alignbit, and liveness pruning (3e417232, 2f608f80, 4db26aec, b077218f, 7273e250). Keep branchless heap guards (0aa15353) apart from split-wave64 remapping (e0416843). Take the flat/guarded GPU parity test (ab323147) where it adds coverage beyond main. Treat CFG allocation, EXEC folding and split-piece binding pruning as separate candidates.
  6. Measurement tools. First extract the isolated cold/warm runner and workload manifest (5bdaa54e, dfcd4bbb)), then the comparator (fd237b1b). Keep fixtures with their scripts and describe cold/warm as XCL cache states since driver caches are uncontrolled. Add coarse stall tracing (dab895e5, e0635a1c)) separately. Wait64 recording history and memory by owner have concrete diagnostic uses and can each stand alone. Add detailed hooks only for a specific investigation.

Leave out of the initial merge series

  • Disconnected sparse planner models (c8889e88, b5f7fc0e, 3116f06f, 4e0b3555, 7d0487c4). They model claims, plans, reservations, commit and receipt ordering without driving live uploads. The live failure fixes above have a direct testable outcome. The newer b628cfb4 refactors the live synchronous path by bundling the slot, rollback point and pending hashes. Consider it separately after correctness lands, if it makes a concrete follow-up smaller.
  • Pipeline eviction/rehydration and descriptor/mip residency groundwork (08662496, 729dac6f, c77b4849, c58bf39a, 96950cbb, fa2167b2, bf0db1ad, 025dc2fa, 0bd24ca7, cf4c3ebc, 70a58f43). The branch adds opt-in tracking and ownership machinery while leaving pressure-driven eviction and descriptor mutation uncalled. Revisit with a workload that demonstrates reclaimed memory, safe in-flight lifetimes, and bounded reload cost.
  • Broad performance and policy changes without isolated evidence on current main. This includes cross-process PSO claims (4893eb6c), AMD persistence defaults and compile lanes (80bb4516, 16e58563), slow-blob persistence past the RAM cap (4ca5c6fe), write-watch gap tuning, pending lookup sharding, allocator spare pooling, wider fence-lock changes, persistent detile workers, and the XAudio2 atomic dispatch table. Measure them independently if the corresponding bottleneck remains. Keep the first-fault instruction rewrite (bf157ece) outside this series.
  • Already covered on main. Drop portions of flat root-UAV lowering and offline PSO reuse already covered by #2368 and #2371. Keep only the delta that adds behavior or coverage.

Overlap to check when assigning the extracted changes includes #2569 (DirectStorage events), #2585 (linked DXC), #2610 (DispatchX group conversion), #2621 (graphics stream state), #2622 (deferred Close), #2633 (indirect CBV), #2691 (list Release), and #2702 (BCPack). Fold equivalent work into its focused PR and submit only a distinct follow-up where needed.

Target roughly 400 changed lines per PR and use Stacked on #N for actual dependencies. Runtime PRs need a focused regression, full Windows suite counts with GPU skips, and same-title/same-duration smoke blocks for clean main and the exact PR head. This review was static. Windows/MSVC, GPU, and retail smoke tests were unavailable.

Commit-by-commit extraction plan

The three slices requested in the #2778 handoff comment come first. The remaining rows are a backlog, subject to author coordination and the evidence gates below. Arrows give the order of commits within a PR. A dependency on another PR means stack on it or wait for it to land. Each new branch starts from current main or the named prerequisite.

Patch applicability was checked against b49be1836844 with three-way Git application in a temporary index. That checks conflicts only. Pick means the listed source changes are the intended inputs to git cherry-pick -x. Port means adapt the named hunks to the current implementation, preserving source SHAs and attribution. A whole commit that applies can still need code or test changes after review. Use individual source commits, leaving the umbrella merge commits behind.

1. Sparse upload recovery

PR Ordered sources and boundaries Review evidence
S1. Stop timed-out uploads from reusing live staging Port faea307a → 37271a3c. Coordinate the ring timeout and its test with #1277. If that timeout lands first, reuse it and extract only the unsubmitted-range handling plus the allocator/readback guards. Keep the scope to bounded waits, Reset/Close failure, and withholding CPU readback on incomplete copies. Inject a stalled fence and failed Reset/Close. Verify no allocator/staging reuse, no readback publication, and that the unsent suffix remains dirty.
S2. Publish sparse hashes after the upload signal Port 41a369ee on S1. In sparse.rs, make scanning plan dirty ranges without publishing sent hashes. Record proposed hashes per staging batch, apply only after the queue signal succeeds, and retain GPU-owned staging when Execute may have happened without a usable marker. The original commit conflicts with main
carry the small submission-outcome plumbing this invariant needs.
Verify that a signalled prefix stays published, an unsubmitted suffix stays dirty, and a CPU write during planning is still seen on the next scan. Inject signal failure after Execute.
S3. Keep dirty pages until title submission is safe Port 3cd053e4 on S2. Limit runtime changes to the write-watch retry journal, rollback of a failed title-queue wait reservation, and the shared preparation checks at Execute and Kickoff. Keep the newer synchronous refactor b628cfb4 out of S1–S3. Verify a retry uses the same dirty snapshot, a failed wait rolls back only its own reservation, and terminal preparation failure prevents native Execute on both entry points.

2. Deferred CPU write ordering

The five commits below applied in source order as a stack. The original ordering fix alone conflicted with main. Divide the stack this way so the behavior change has one reviewable boundary.

PR Commit order Review evidence
W1. Track exact list write ranges Pick 62de4d55. Check adjacent and overlapping ranges, Reset, and coverage at the end of a write.
W2. Capture immutable list effects for submission Pick 1b0b589c on W1. Preserve wait, signal, sparse-write and deferred-store effects across split submission and list reuse.
W3. Name and reuse list split reasons Pick 4d17a73b on W2. Exercise the existing Wait64 and deferred-dispatch paths with their current recording and binding behavior.
W4. Classify the producer of each recorded write Pick b3d9441e on W3. Show that GPU writes, post-segment CPU stores and Write64 cases retain their distinct ordering, with the existing wait policy.
W5. Wait for the exact deferred CPU store Pick 311fc618 on W4. This is the behavior change. Keep 9b847915 as an optional measured follow-up for avoiding repeated scans of earlier segments. Cover Wait32/64, a matching producer in an earlier segment, an unrelated CPU write, and failed split creation. Test ordinary Execute and Kickoff.

3. Contiguous 2D tiling

T1. Pick b81ac2eb alone. It applied to main as a one-file change in gpu/tiling.rs (383 changed lines in the source commit). Retain the tiled and detiled comparisons against the element-by-element path, including base XOR, block formats and mip edges. Report byte parity and a before/after timing on the same texture workload. Keep persistent workers (6dd9d53f) out so the measurement isolates the copy strategy.

Other extraction candidates

Each line in the table proposes a separate PR unless an explicit sequence is given. Where a source commit mixes scopes, extract the named hunks and retain its SHA in the new commit message.

Area Candidate PRs and source commits
Independent compatibility and lifetime fixes Ordered DirectStorage event pick 3fd55dff (overlap #2569)
command-list Release pick 2d8b8295 (#2691)
heap Release port fb810988
descriptor publication bounds pick b0deef15 (#2631)
sparse placement lifetime port 7619ff8c (#2539).
Failed segment handling Deferred Close port 3364f184 (#2622)
reserve a continuation before closing port d5aa0a6a and only the related split recovery from 617b493d / 03e4d27d
Kickoff Close port 73898793
Kickoff Reset port 974e3395. Share W3 where it is needed.
Allocator ownership Submit reservation port cf40395a → 06d03e60 as one change, keeping only their final reservation path
hold busy backing across final Release port 93693054
make list creation use the active backing port 3d0d0558
pin UMA to native backing until retirement port 9ec2b4a3 after backing ownership is in place.
Cold PSOs and indirect binds Correct selected stand-in port 4e62e7c8
finish failed worker jobs port 0eaef7e6)<br>keep cold compiles off bind threads **port** aff341e1<br>record wanted state at deferred record time **port** 11cf89f9<br>avoid put-off segments for bounded waits **port** 76e87252`.
Stream state and compiler fixes Compute FLAGS pick 2bfc36eb
conservative graphics projection port 32ecdb27
extended rasterizer state port e3a52f43 after projection
native cache lifecycle port 9e82e2aa → 6457c188 after stream support. From b271eba5, extract DXC OOM handling and linker arguments as two PRs
serialized DXC admission pick 2e45718b independently. From ba659963, extract group-count conversion first and tail-lane masking/deferred replay second.
Cache correctness Exact stale generation port fba7de2b
static samplers port be772deb
NodeMask runtime and disk identity port e5d2e5ee → 4cd1b772 → 5afb11ad
graphics cache identity port 14524632
graphics CLI/runtime variant parity pick 5d91261c.
Small independent performance PRs Unsplit cache buffer reuse port 355826c5
DXIL container copy pick 3cf3451c
loader range filter pick b59e59b6
zero-mip staging port 396a4144
effects analysis pick e67817e4 → 911ad65d together
BCPack pick 9fdfe6c9
Opus scratch and validation pick 5a5b6504), then PCM bulk copy and preallocation **pick** 87c5c52c→2a577d7dafter scratch. Split writability checks from allocations in75c4a245`.
GPU texture uploads and copyback Port d8ddd5b5 → e12049fe together for upload ordering, with staging and queue lifetime prerequisites where needed (0ea9a959, 23d7f4e8). For copyback: owned queue snapshots d93c63a7
retirement model then activation c52ad726 followed by 0540a23c → 9374675e, with sparse consumers 12b1b786 following separately
native slots 89343644 → e10df30d and queue ordering 87b55ac8 as distinct prerequisites where needed
reverse conversion pick b7af0096
writer metadata port 972f66ec → 24ffb0e7 → b0442a22
staging plans port e564cbb7 → fafeee3e
activate fence-visible publication port 4cc28d40 → 547f3211. Split writer metadata into bookkeeping and publication if it exceeds the size target.
PSO performance Build ownership 6f6b5a27
canonical key 0fef9d5a → 67629ad4 → fedfbe4c
coalescing b946815d
queue foundation e7c522d8 and activation 2ccea5e1) as separate PRs<br>rank preloads 56cffc2b<br>journal used keys 7ea65ea9→77eb9e7f. Split indirect CBV ABI 202c9623→ffac3219from activation2a6a8ba2)
command-buffer reuse aa446c29
observed-use prewarm c162ffb1 → 6495067f. Treat these as ports on the minimum landed prerequisites.
Shader lowering and diagnostics One candidate PR per lowering change and its tests, in the order needed by that module. Keep 0aa15353 (guards) and e0416843 (wave remap) separate. For tooling, runner pick 5bdaa54e then port the runner/fixture parts of dfcd4bbb with it
comparator port fd237b1b plus comparator/fixture parts of dfcd4bbb after the runner. Defer the later counters until their producers land. Stall report foundation dab895e5 → e0635a1c is separate from hook sets.

The refreshed source head also adds 54039442 and a4f0399f. Leave both out of these PRs. They extend the sparse claim ledger and the inert pipeline eviction ledger, respectively.

After each extraction, review the diff against its base and retain only the named behavior, its regression, and any required README update. Link the source commits and this issue, preserve original author and co-author credit, and note any adaptation in the PR. Run the Windows/GPU suite and paired smoke checks described above before marking a runtime PR ready. No Windows, GPU or retail runs were performed for this plan.

AI use — Codex (GPT-6) inspected the diff, commit history and related PRs and drafted this issue.

<!-- greyfinch-sync:ivall/xcl:issue:6626772592 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/2787). Originally posted by [KOLESNiii](https://github.com/KOLESNiii) on 2026-11-26T12:35:57Z. --- Take the correctness fixes and self-contained improvements from #2778. Extract the larger runtime changes only where they solve a demonstrated problem. Leave the unfinished eviction and sparse planning systems on the branch. This is a breakdown of #2778 at `a4f0399f19e4` against `main` at `b49be1836844` (371 commits, 70 files). The commit IDs identify the changes to extract. Each row proposes one PR unless it gives an explicit sequence. Rebase the behavior and its tests onto current `main`, preserving attribution. The overlap notes at the end are for avoiding duplicate submissions. The [commit-by-commit plan](#commit-by-commit-extraction-plan) below gives the pick order and prerequisites, starting with the three slices requested on #2778. ## Worth pulling first | Proposed PR | Change from #2778 and what the PR should demonstrate | | --- | --- | | **Signal DirectStorage events in request order** | `3fd55dff`. Implement the X1 event marker through the existing retirement path. Test sequential and parallel retirement and caller handle closure. This addresses a title wait that otherwise has no completion event. | | **Order a list wait after its deferred CPU write** | `311fc618` with the minimum write-producer tracking from `62de4d55` / `b3d9441e`. Prove a preceding CPU store becomes visible before the waiting continuation and independent stores stay asynchronous. Add immutable submission-effect capture (`1b0b589c`) only to the extent the fix needs it. | | **Keep failed native lists out of Execute** | Start with the put-off segment Close fix (`3364f184`). Follow with separate split-continuation reservation and Kickoff Close/Reset recovery PRs (`d5aa0a6a`, `617b493d`, `03e4d27d`, `73898793`, `974e3395`). Use fault injection to show the prior valid recording survives and the failed segment never executes. | | **Retire object bookkeeping at the right lifetime boundary** | Separate PRs for command-list and heap address reuse (`2d8b8295`, `fb810988`). For allocators, first reserve the recorded backing before native Execute (`06d03e60`), then retain it and its UMA through the correct retirement/reset (`93693054`, `9ec2b4a3`). Cover creation on a rotated backing (`3d0d0558`) where that path needs a follow-up. Exercise address reuse, outstanding work, and Reset/Release. | | **Recover sparse uploads without losing work** | Three PRs in order. Bound ring waits and refuse unsafe reuse (`faea307a`, `37271a3c`). Publish sent hashes only after a successful queue signal (`41a369ee`). Preserve and retry the dirty snapshot and stop submission when ordering remains unknown (`3cd053e4`). Test Close/Wait/Signal failure, including partial batches. Separately take `054270ca` to preserve newer CPU writes during sparse copyback. | | **Fix the selected PSO and complete worker failures** | Take the ExecuteIndirect stand-in classification fix (`4e62e7c8)) and failed-job completion (`0eaef7e6)) as separate PRs. Cover completion during bind and cancellation/failure waking waiters. Take cold builds off bind threads (`aff341e1`) separately, with early wanted promotion (`11cf89f9`) and bounded-wait segmentation (`76e87252`) split out by behavior. | | **Fix DispatchX thread dimensions** | Split `ba659963` into whole-group conversion and tail-lane masking with deferred replay. Test non-multiples of the group size, multidimensional IDs, and overflow. Both behaviors are needed for partial-group parity. | | **Preserve pipeline stream state** | One PR for compute FLAGS (`2bfc36eb`), another for graphics projection/cache safety (`32ecdb27`), then faithful extended rasterizer state (`e3a52f43`). Keep native-stream caching (`9e82e2aa`, `6457c188`) separate until identity and rejected-blob fallback are tested. | | **Fix linked DXC error handling and argument forwarding** | Split `b271eba5` into retryable OOM and forwarding optimization/extra arguments. Test that OOM leaves linking enabled and that arguments reach the live linker. Review slot admission (`2e45718b`) separately with concurrent callers. | | **Fix cache identity before expanding persistence** | Separate stale-generation invalidation (`fba7de2b)), static-sampler identity (`be772deb`), and node/device and graphics identities (`e5d2e5ee`, `4cd1b772`, `5afb11ad`, `14524632`). Test stale rejection after replacement and differing roots/node masks. Extract graphics precompile parity (`5d91261c`) as its own PR with a cold-cache runtime hit test. | | **Fix descriptor bounds and sparse object ownership** | Take descriptor bounds (`b0deef15)) separately from lock elision. Take generation-checked sparse placed-buffer publication (`7619ff8c)) separately. Test stale state and COM address reuse. | | **Land small, independently measurable improvements** | One PR each for unsplit shader-cache buffer reuse (`355826c5`), single-copy DXIL containers (`3cf3451c`), loader range rejection (`b59e59b6`), zero-mip staging reuse (`396a4144`), streaming shader effects plus its far-jump cap (`e67817e4`, `911ad65d`), contiguous 2D tiling runs (`b81ac2eb`), and BCPack bit packing (`9fdfe6c9`). Require byte/output parity and measure the operation being improved. For Opus, split scratch reuse and validation (`5a5b6504)) from PCM copying and output preallocation (`87c5c52c`, `2a577d7d`). For frame pacing (`75c4a245`), split writable-target validation from removing wait allocations. | ## Worth extracting as stacks, with a measured reason to activate them 1. **GPU-ordered texture uploads.** Port the submitting-queue path and its page-mapping wait together (`d8ddd5b5`, `e12049fe`). The commit reports 3 hangs in 4 RTX 3080 world-load runs before the wait and 0 in 7 with it. Those runs support the dependency and need repeating on the extracted PR. Preserve staging ownership after a failed wait (`0ea9a959`) and per-queue ordering (`23d7f4e8`) in the activation or its prerequisites. Omit the reverted intermediate upload implementation (`01c0835a` and its revert). 2. **GPU-written texture copyback.** First take owned queue snapshots and exact retirement as separate prerequisites (`d93c63a7`, `c52ad726`, `0540a23c`, `9374675e`, `12b1b786`). If needed, land native queue-slot dispatch and submission ordering independently (`89343644`, `e10df30d`, `87b55ac8`). Then split copyback into **reverse layout conversion** (`b7af0096`), **generation/subresource writer and transition tracking** (`972f66ec`, `24ffb0e7`, `b0442a22`), **writer-queue staging and lifetime** (`e564cbb7`, `fafeee3e`), and **publication before the title observes fence completion** (`4cc28d40`, `547f3211`). Activate with a title-path regression covering partial subresources, two queues, and failed waits. 3. **PSO build coalescing and priorities.** First separate stand-in ownership from build lifetime (`6f6b5a27`), then define and test canonical identity (`0fef9d5a`, `67629ad4`, `fedfbe4c`), then enable in-process coalescing (`b946815d`). Measure duplicate builds and first-use wait time. Review priority queue activation (`e7c522d8`, `2ccea5e1`), bounded compile helpers, and prior-use preload ranking (`56cffc2b`) independently. Keep off-bind used-key journaling (`7ea65ea9`, `77eb9e7f`) separate and test shutdown and ordering. 4. **Split ExecuteIndirect.** Split **indirect root ABI and execution** (`202c9623`, `ffac3219`, `2a6a8ba2`), **per-recording command storage reuse** (`aa446c29`), and **used-only prewarming** (`c162ffb1`, `6495067f`). Compare direct/indirect output, first-use wait, and GPU time per piece. Review whole-build failure memoization (`deb5fccf`) separately with transient OOM recovery. 5. **Shader lowering.** Each DXIL change needs its own parity tests and emitted-size or compile-time evidence. Start with carries, min/max, bit masks and signed FFBH, frexp/alignbit, and liveness pruning (`3e417232`, `2f608f80`, `4db26aec`, `b077218f`, `7273e250`). Keep branchless heap guards (`0aa15353`) apart from split-wave64 remapping (`e0416843`). Take the flat/guarded GPU parity test (`ab323147`) where it adds coverage beyond `main`. Treat CFG allocation, EXEC folding and split-piece binding pruning as separate candidates. 6. **Measurement tools.** First extract the isolated cold/warm runner and workload manifest (`5bdaa54e`, `dfcd4bbb)), then the comparator (`fd237b1b`). Keep fixtures with their scripts and describe cold/warm as XCL cache states since driver caches are uncontrolled. Add coarse stall tracing (`dab895e5`, `e0635a1c)) separately. Wait64 recording history and memory by owner have concrete diagnostic uses and can each stand alone. Add detailed hooks only for a specific investigation. ## Leave out of the initial merge series - **Disconnected sparse planner models** (`c8889e88`, `b5f7fc0e`, `3116f06f`, `4e0b3555`, `7d0487c4`). They model claims, plans, reservations, commit and receipt ordering without driving live uploads. The live failure fixes above have a direct testable outcome. The newer `b628cfb4` refactors the live synchronous path by bundling the slot, rollback point and pending hashes. Consider it separately after correctness lands, if it makes a concrete follow-up smaller. - **Pipeline eviction/rehydration and descriptor/mip residency groundwork** (`08662496`, `729dac6f`, `c77b4849`, `c58bf39a`, `96950cbb`, `fa2167b2`, `bf0db1ad`, `025dc2fa`, `0bd24ca7`, `cf4c3ebc`, `70a58f43`). The branch adds opt-in tracking and ownership machinery while leaving pressure-driven eviction and descriptor mutation uncalled. Revisit with a workload that demonstrates reclaimed memory, safe in-flight lifetimes, and bounded reload cost. - **Broad performance and policy changes without isolated evidence on current main.** This includes cross-process PSO claims (`4893eb6c`), AMD persistence defaults and compile lanes (`80bb4516`, `16e58563`), slow-blob persistence past the RAM cap (`4ca5c6fe`), write-watch gap tuning, pending lookup sharding, allocator spare pooling, wider fence-lock changes, persistent detile workers, and the XAudio2 atomic dispatch table. Measure them independently if the corresponding bottleneck remains. Keep the first-fault instruction rewrite (`bf157ece`) outside this series. - **Already covered on main.** Drop portions of flat root-UAV lowering and offline PSO reuse already covered by #2368 and #2371. Keep only the delta that adds behavior or coverage. Overlap to check when assigning the extracted changes includes #2569 (DirectStorage events), #2585 (linked DXC), #2610 (DispatchX group conversion), #2621 (graphics stream state), #2622 (deferred Close), #2633 (indirect CBV), #2691 (list Release), and #2702 (BCPack). Fold equivalent work into its focused PR and submit only a distinct follow-up where needed. Target roughly 400 changed lines per PR and use `Stacked on #N` for actual dependencies. Runtime PRs need a focused regression, full Windows suite counts with GPU skips, and same-title/same-duration smoke blocks for clean `main` and the exact PR head. This review was static. Windows/MSVC, GPU, and retail smoke tests were unavailable. ## Commit-by-commit extraction plan The three slices requested in the [#2778 handoff comment](https://github.com/xcl-dev/xcl/pull/2778#issuecomment-7192442264) come first. The remaining rows are a backlog, subject to author coordination and the evidence gates below. Arrows give the order of commits within a PR. A dependency on another PR means stack on it or wait for it to land. Each new branch starts from current `main` or the named prerequisite. Patch applicability was checked against `b49be1836844` with three-way Git application in a temporary index. That checks conflicts only. **Pick** means the listed source changes are the intended inputs to `git cherry-pick -x`. **Port** means adapt the named hunks to the current implementation, preserving source SHAs and attribution. A whole commit that applies can still need code or test changes after review. Use individual source commits, leaving the umbrella merge commits behind. ### 1. Sparse upload recovery | PR | Ordered sources and boundaries | Review evidence | | --- | --- | --- | | **S1. Stop timed-out uploads from reusing live staging** | **Port** `faea307a` → `37271a3c`. Coordinate the ring timeout and its test with #1277. If that timeout lands first, reuse it and extract only the unsubmitted-range handling plus the allocator/readback guards. Keep the scope to bounded waits, Reset/Close failure, and withholding CPU readback on incomplete copies. | Inject a stalled fence and failed Reset/Close. Verify no allocator/staging reuse, no readback publication, and that the unsent suffix remains dirty. | | **S2. Publish sparse hashes after the upload signal** | **Port** `41a369ee` on S1. In `sparse.rs`, make scanning plan dirty ranges without publishing sent hashes. Record proposed hashes per staging batch, apply only after the queue signal succeeds, and retain GPU-owned staging when Execute may have happened without a usable marker. The original commit conflicts with main<br>carry the small submission-outcome plumbing this invariant needs. | Verify that a signalled prefix stays published, an unsubmitted suffix stays dirty, and a CPU write during planning is still seen on the next scan. Inject signal failure after Execute. | | **S3. Keep dirty pages until title submission is safe** | **Port** `3cd053e4` on S2. Limit runtime changes to the write-watch retry journal, rollback of a failed title-queue wait reservation, and the shared preparation checks at Execute and Kickoff. Keep the newer synchronous refactor `b628cfb4` out of S1–S3. | Verify a retry uses the same dirty snapshot, a failed wait rolls back only its own reservation, and terminal preparation failure prevents native Execute on both entry points. | ### 2. Deferred CPU write ordering The five commits below applied in source order as a stack. The original ordering fix alone conflicted with main. Divide the stack this way so the behavior change has one reviewable boundary. | PR | Commit order | Review evidence | | --- | --- | --- | | **W1. Track exact list write ranges** | **Pick** `62de4d55`. | Check adjacent and overlapping ranges, Reset, and coverage at the end of a write. | | **W2. Capture immutable list effects for submission** | **Pick** `1b0b589c` on W1. | Preserve wait, signal, sparse-write and deferred-store effects across split submission and list reuse. | | **W3. Name and reuse list split reasons** | **Pick** `4d17a73b` on W2. | Exercise the existing Wait64 and deferred-dispatch paths with their current recording and binding behavior. | | **W4. Classify the producer of each recorded write** | **Pick** `b3d9441e` on W3. | Show that GPU writes, post-segment CPU stores and Write64 cases retain their distinct ordering, with the existing wait policy. | | **W5. Wait for the exact deferred CPU store** | **Pick** `311fc618` on W4. This is the behavior change. Keep `9b847915` as an optional measured follow-up for avoiding repeated scans of earlier segments. | Cover Wait32/64, a matching producer in an earlier segment, an unrelated CPU write, and failed split creation. Test ordinary Execute and Kickoff. | ### 3. Contiguous 2D tiling **T1. Pick `b81ac2eb` alone.** It applied to main as a one-file change in `gpu/tiling.rs` (383 changed lines in the source commit). Retain the tiled and detiled comparisons against the element-by-element path, including base XOR, block formats and mip edges. Report byte parity and a before/after timing on the same texture workload. Keep persistent workers (`6dd9d53f`) out so the measurement isolates the copy strategy. ### Other extraction candidates Each line in the table proposes a separate PR unless an explicit sequence is given. Where a source commit mixes scopes, extract the named hunks and retain its SHA in the new commit message. | Area | Candidate PRs and source commits | | --- | --- | | **Independent compatibility and lifetime fixes** | Ordered DirectStorage event **pick** `3fd55dff` (overlap #2569)<br>command-list Release **pick** `2d8b8295` (#2691)<br>heap Release **port** `fb810988`<br>descriptor publication bounds **pick** `b0deef15` (#2631)<br>sparse placement lifetime **port** `7619ff8c` (#2539). | | **Failed segment handling** | Deferred Close **port** `3364f184` (#2622)<br>reserve a continuation before closing **port** `d5aa0a6a` and only the related split recovery from `617b493d` / `03e4d27d`<br>Kickoff Close **port** `73898793`<br>Kickoff Reset **port** `974e3395`. Share W3 where it is needed. | | **Allocator ownership** | Submit reservation **port** `cf40395a` → `06d03e60` as one change, keeping only their final reservation path<br>hold busy backing across final Release **port** `93693054`<br>make list creation use the active backing **port** `3d0d0558`<br>pin UMA to native backing until retirement **port** `9ec2b4a3` after backing ownership is in place. | | **Cold PSOs and indirect binds** | Correct selected stand-in **port** `4e62e7c8`<br>finish failed worker jobs **port** `0eaef7e6)<br>keep cold compiles off bind threads **port** `aff341e1`<br>record wanted state at deferred record time **port** `11cf89f9`<br>avoid put-off segments for bounded waits **port** `76e87252`. | | **Stream state and compiler fixes** | Compute FLAGS **pick** `2bfc36eb`<br>conservative graphics projection **port** `32ecdb27`<br>extended rasterizer state **port** `e3a52f43` after projection<br>native cache lifecycle **port** `9e82e2aa` → `6457c188` after stream support. From `b271eba5`, extract DXC OOM handling and linker arguments as two PRs<br>serialized DXC admission **pick** `2e45718b` independently. From `ba659963`, extract group-count conversion first and tail-lane masking/deferred replay second. | | **Cache correctness** | Exact stale generation **port** `fba7de2b`<br>static samplers **port** `be772deb`<br>NodeMask runtime and disk identity **port** `e5d2e5ee` → `4cd1b772` → `5afb11ad`<br>graphics cache identity **port** `14524632`<br>graphics CLI/runtime variant parity **pick** `5d91261c`. | | **Small independent performance PRs** | Unsplit cache buffer reuse **port** `355826c5`<br>DXIL container copy **pick** `3cf3451c`<br>loader range filter **pick** `b59e59b6`<br>zero-mip staging **port** `396a4144`<br>effects analysis **pick** `e67817e4` → `911ad65d` together<br>BCPack **pick** `9fdfe6c9`<br>Opus scratch and validation **pick** `5a5b6504), then PCM bulk copy and preallocation **pick** `87c5c52c` → `2a577d7d` after scratch. Split writability checks from allocations in `75c4a245`. | | **GPU texture uploads and copyback** | **Port** `d8ddd5b5` → `e12049fe` together for upload ordering, with staging and queue lifetime prerequisites where needed (`0ea9a959`, `23d7f4e8`). For copyback: owned queue snapshots `d93c63a7`<br>retirement model then activation `c52ad726` followed by `0540a23c` → `9374675e`, with sparse consumers `12b1b786` following separately<br>native slots `89343644` → `e10df30d` and queue ordering `87b55ac8` as distinct prerequisites where needed<br>reverse conversion **pick** `b7af0096`<br>writer metadata **port** `972f66ec` → `24ffb0e7` → `b0442a22`<br>staging plans **port** `e564cbb7` → `fafeee3e`<br>activate fence-visible publication **port** `4cc28d40` → `547f3211`. Split writer metadata into bookkeeping and publication if it exceeds the size target. | | **PSO performance** | Build ownership `6f6b5a27`<br>canonical key `0fef9d5a` → `67629ad4` → `fedfbe4c`<br>coalescing `b946815d`<br>queue foundation `e7c522d8` and activation `2ccea5e1) as separate PRs<br>rank preloads `56cffc2b`<br>journal used keys `7ea65ea9` → `77eb9e7f`. Split indirect CBV ABI `202c9623` → `ffac3219` from activation `2a6a8ba2)<br>command-buffer reuse `aa446c29`<br>observed-use prewarm `c162ffb1` → `6495067f`. Treat these as ports on the minimum landed prerequisites. | | **Shader lowering and diagnostics** | One candidate PR per lowering change and its tests, in the order needed by that module. Keep `0aa15353` (guards) and `e0416843` (wave remap) separate. For tooling, runner **pick** `5bdaa54e` then **port** the runner/fixture parts of `dfcd4bbb` with it<br>comparator **port** `fd237b1b` plus comparator/fixture parts of `dfcd4bbb` after the runner. Defer the later counters until their producers land. Stall report foundation `dab895e5` → `e0635a1c` is separate from hook sets. | The refreshed source head also adds `54039442` and `a4f0399f`. Leave both out of these PRs. They extend the sparse claim ledger and the inert pipeline eviction ledger, respectively. After each extraction, review the diff against its base and retain only the named behavior, its regression, and any required README update. Link the source commits and this issue, preserve original author and co-author credit, and note any adaptation in the PR. Run the Windows/GPU suite and paired smoke checks described above before marking a runtime PR ready. No Windows, GPU or retail runs were performed for this plan. **AI use** — Codex (GPT-6) inspected the diff, commit history and related PRs and drafted this issue.
mokkamokacaffe commented 2026-11-26 14:03:04 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by mokkamokacaffe on 2026-11-26T13:25:00Z.


The unsplit translated-cache buffer reuse listed here is already extracted as #2594, authored by @storrmzz at current head ae921b40. Commit 355826c5 in #2778 explicitly says it was adapted from that PR, so another extraction would duplicate an active, focused and mergeable contribution.

I reviewed #2594 against main b49be183:

  • translated::decode_entry retains ownership of the file Vec and validates the DXIL container before modifying it.
  • In the unsplit branch, rest.is_empty() establishes that the validated payload ends at the end of the file buffer, so b.len() - len is the payload start.
  • copy_within and truncate preserve the allocation; split entries keep the previous per-container copy path and do not retain all piece bytes.
  • The added tests cover allocation ownership, sampler-table offsets, every unsplit truncation, trailing bytes, malformed split fields, split truncations and split round trips.
  • git diff --check origin/main...ae921b40 passed.

No separate PR should be opened for 355826c5; #2594 should remain the source of truth and receive any further testing. Its remaining merge requirement is the exact-head paired retail smoke run described in its body.

AI use

  • OpenAI Codex (GPT-6.2 Astra Ultra) traced the provenance, compared the focused and mega-PR patches, audited the buffer ownership and validation invariants, and drafted this note. No code was changed.
<!-- greyfinch-sync:ivall/xcl:comment:7193321106 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/2787#issuecomment-7193321106). Originally posted by [mokkamokacaffe](https://github.com/mokkamokacaffe) on 2026-11-26T13:25:00Z. --- The unsplit translated-cache buffer reuse listed here is already extracted as #2594, authored by @storrmzz at current head `ae921b40`. Commit `355826c5` in #2778 explicitly says it was adapted from that PR, so another extraction would duplicate an active, focused and mergeable contribution. I reviewed #2594 against `main` `b49be183`: - `translated::decode_entry` retains ownership of the file `Vec` and validates the DXIL container before modifying it. - In the unsplit branch, `rest.is_empty()` establishes that the validated payload ends at the end of the file buffer, so `b.len() - len` is the payload start. - `copy_within` and `truncate` preserve the allocation; split entries keep the previous per-container copy path and do not retain all piece bytes. - The added tests cover allocation ownership, sampler-table offsets, every unsplit truncation, trailing bytes, malformed split fields, split truncations and split round trips. - `git diff --check origin/main...ae921b40` passed. No separate PR should be opened for `355826c5`; #2594 should remain the source of truth and receive any further testing. Its remaining merge requirement is the exact-head paired retail smoke run described in its body. **AI use** - OpenAI Codex (GPT-6.2 Astra Ultra) traced the provenance, compared the focused and mega-PR patches, audited the buffer ownership and validation invariants, and drafted this note. No code was changed.
retrope13 commented 2026-11-26 14:03:04 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by retrope13 on 2026-11-26T13:25:27Z.


Native Windows/MSVC + NVIDIA GPU verification and release benchmark for T1 (b81ac2eb cherry-picked cleanly onto main b49be183) — not claiming the PR (just providing the native Windows/MSVC test + timing data that was unavailable when #2787 was drafted).

Environment

  • CPU / RAM: Intel Core i5-14500HX (14C/20T), 24 GB RAM
  • GPU: NVIDIA GeForce RTX 4060 Laptop GPU (8 GB, driver 32.0.16.2140), XCL_ADAPTER=NVIDIA
  • OS / Toolchain: Windows 11 26H2 (build 26300.9818), rustc 1.100.0 (stable-x86_64-pc-windows-msvc), Windows SDK 10.0.26100.0 DXC 1.9.2602.17

Applicability & Full Windows/MSVC Test Suite

  • git cherry-pick --no-commit b81ac2eb onto main (b49be183): applies cleanly with 0 conflicts (crates/xcl/src/gpu/tiling.rs, +321 / -62) and 0 new compiler warnings.
  • Targeted cargo test --locked -p xcl --lib gpu::tiling::: 17 passed, 0 failed in debug (10.64 s) and 17 passed, 0 failed in --release (0.86 s).
  • Full workspace (cargo build --workspace --locked, then cargo test --workspace --locked --no-fail-fast -- --test-threads=4):
    • Clean main (b49be183): 1435 passed, 0 failed, 47 ignored
    • main + b81ac2eb (T1): 1437 passed, 0 failed, 47 ignored (+2 new tiling tests, 0 regressions)

Isolated --release Timing & Byte Parity (main b49be183 vs. main + b81ac2eb)

9 timed iterations after 1 warmup per workload (median ms reported; FNV-1a 64-bit checksums of both tile and detile outputs matched 100% identically across all 4 cases):

Workload Op main (b49be183) main + b81ac2eb Speedup Output Parity
1920×1080 R8 (mode 5, elem_log2=0) detile 18.75 ms (18.40–19.25) 0.59 ms (0.56–0.66) 31.8× identical (1b3af948a76d4c25)
1920×1080 R8 (mode 5, elem_log2=0) tile 18.90 ms (18.58–19.21) 0.56 ms (0.54–0.58) 33.8× identical (31cf563b857bf425)
2048×2048 RGBA8 (mode 10, elem_log2=2) detile 40.14 ms (38.91–41.11) 5.48 ms (5.41–5.83) 7.3× identical (a4118795b68a2325)
2048×2048 RGBA8 (mode 10, elem_log2=2) tile 41.79 ms (41.76–42.46) 5.34 ms (5.29–5.53) 7.8× identical (56e0fada6c622325)
2048×2048 BC7 (512×512×16B, mode 10) detile 2.84 ms (2.72–3.04) 1.11 ms (0.98–1.31) 2.6× identical (1b59b090d0bc2325)
2048×2048 BC7 (512×512×16B, mode 10) tile 3.19 ms (3.02–3.39) 1.19 ms (0.74–1.31) 2.7× identical (6645f0556de02325)
2048×2048 RGBA8 (mode 25 XOR, pipes=3, pkrs=3, base_xor=0x100) detile 41.58 ms (40.89–41.86) 6.60 ms (6.41–6.88) 6.3× identical (a4118795b68a2325)
2048×2048 RGBA8 (mode 25 XOR, pipes=3, pkrs=3, base_xor=0x100) tile 41.58 ms (41.34–43.06) 7.22 ms (5.75–8.05) 5.8× identical (d3edea4df9ca2325)

Not Tested

  • Live retail title smoke runs, AMD / Intel GPUs, Linux, and the 47 #[ignore] tests.

AI disclosure: Antigravity (Gemini 4 Neon, XHigh) ran the cherry-pick, Windows/MSVC test suites, release benchmark, and drafted this comment.

<!-- greyfinch-sync:ivall/xcl:comment:7193331600 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/2787#issuecomment-7193331600). Originally posted by [retrope13](https://github.com/retrope13) on 2026-11-26T13:25:27Z. --- **Native Windows/MSVC + NVIDIA GPU verification and release benchmark for T1 (`b81ac2eb` cherry-picked cleanly onto `main` `b49be183`)** — not claiming the PR (just providing the native Windows/MSVC test + timing data that was unavailable when #2787 was drafted). ### Environment - **CPU / RAM:** Intel Core i5-14500HX (14C/20T), 24 GB RAM - **GPU:** NVIDIA GeForce RTX 4060 Laptop GPU (8 GB, driver `32.0.16.2140`), `XCL_ADAPTER=NVIDIA` - **OS / Toolchain:** Windows 11 26H2 (build `26300.9818`), `rustc 1.100.0` (`stable-x86_64-pc-windows-msvc`), Windows SDK `10.0.26100.0` DXC `1.9.2602.17` ### Applicability & Full Windows/MSVC Test Suite - `git cherry-pick --no-commit b81ac2eb` onto `main` (`b49be183`): **applies cleanly with 0 conflicts** (`crates/xcl/src/gpu/tiling.rs`, +321 / -62) and **0 new compiler warnings**. - Targeted `cargo test --locked -p xcl --lib gpu::tiling::`: **17 passed, 0 failed** in debug (`10.64 s`) and **17 passed, 0 failed** in `--release` (`0.86 s`). - Full workspace (`cargo build --workspace --locked`, then `cargo test --workspace --locked --no-fail-fast -- --test-threads=4`): - Clean `main` (`b49be183`): **1435 passed, 0 failed, 47 ignored** - `main` + `b81ac2eb` (T1): **1437 passed, 0 failed, 47 ignored** (+2 new tiling tests, 0 regressions) ### Isolated `--release` Timing & Byte Parity (`main` `b49be183` vs. `main` + `b81ac2eb`) 9 timed iterations after 1 warmup per workload (median ms reported; FNV-1a 64-bit checksums of both `tile` and `detile` outputs matched **100% identically** across all 4 cases): | Workload | Op | `main` (`b49be183`) | `main` + `b81ac2eb` | Speedup | Output Parity | |---|---|---:|---:|---:|:---:| | `1920×1080` R8 (`mode 5`, `elem_log2=0`) | detile | 18.75 ms *(18.40–19.25)* | **0.59 ms** *(0.56–0.66)* | **31.8×** | identical (`1b3af948a76d4c25`) | | `1920×1080` R8 (`mode 5`, `elem_log2=0`) | tile | 18.90 ms *(18.58–19.21)* | **0.56 ms** *(0.54–0.58)* | **33.8×** | identical (`31cf563b857bf425`) | | `2048×2048` RGBA8 (`mode 10`, `elem_log2=2`) | detile | 40.14 ms *(38.91–41.11)* | **5.48 ms** *(5.41–5.83)* | **7.3×** | identical (`a4118795b68a2325`) | | `2048×2048` RGBA8 (`mode 10`, `elem_log2=2`) | tile | 41.79 ms *(41.76–42.46)* | **5.34 ms** *(5.29–5.53)* | **7.8×** | identical (`56e0fada6c622325`) | | `2048×2048` BC7 (`512×512×16B`, `mode 10`) | detile | 2.84 ms *(2.72–3.04)* | **1.11 ms** *(0.98–1.31)* | **2.6×** | identical (`1b59b090d0bc2325`) | | `2048×2048` BC7 (`512×512×16B`, `mode 10`) | tile | 3.19 ms *(3.02–3.39)* | **1.19 ms** *(0.74–1.31)* | **2.7×** | identical (`6645f0556de02325`) | | `2048×2048` RGBA8 (`mode 25` XOR, `pipes=3, pkrs=3, base_xor=0x100`) | detile | 41.58 ms *(40.89–41.86)* | **6.60 ms** *(6.41–6.88)* | **6.3×** | identical (`a4118795b68a2325`) | | `2048×2048` RGBA8 (`mode 25` XOR, `pipes=3, pkrs=3, base_xor=0x100`) | tile | 41.58 ms *(41.34–43.06)* | **7.22 ms** *(5.75–8.05)* | **5.8×** | identical (`d3edea4df9ca2325`) | ### Not Tested - Live retail title smoke runs, AMD / Intel GPUs, Linux, and the 47 `#[ignore]` tests. *AI disclosure: Antigravity (Gemini 4 Neon, XHigh) ran the cherry-pick, Windows/MSVC test suites, release benchmark, and drafted this comment.*
KOLESNiii commented 2026-11-26 14:03:09 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-26T13:50:51Z.


#2778 is now at ff6be930f09d, 14 commits past the a4f0399f19e4 snapshot used for this plan. Compare the two heads.

  • Sparse upload recovery (S1–S3). Keep the existing source commits and coordinate S1 with #1277. 99c45c49 ties batch acceptance and publication to exact staging reservations, and 2c5c33d4 models foreground waits against exact fence and queue generations. bd64a1db, 0ab510a2, and 2116d1076 remove the older commit, plan, and claim wrappers after moving coverage to the coordinated model. Leave those five commits on #2778. S1–S3 still target the live synchronous upload path.
  • Pipeline eviction and restoration. d98343d2 adds bounded candidate inspection through the opt-in pressure observer. It observes pressure without evicting pipelines. eac1a941, aedde19c, c9a26c5e, and ff6be930 add restoration receipts, coordination, foreground promotion of an existing attempt, and tests for exact-attempt and generation lifetimes. The restoration coordinator remains unwired. Keep this work on #2778 pending the workload and lifetime evidence described above.
  • Measurement tools. f910a402 adapts #1065 to time the actual native submission chunks under XCL_GPU_TIMING. Keep it as a separate diagnostics candidate and coordinate with #1065, which is still open. For the benchmarks, 10da931f provides the dependency-free harness, then 895b6e3e and f6577375 add synthetic and runtime/shader workloads adapted from open PRs #1148 and #1152. Coordinate with those PRs before extracting the benchmark work. The benchmark harness is separate from the cold/warm runner in the plan.
  • Deferred CPU writes (W1–W5) and tiling (T1). The existing source sequences still apply to both slices.

The allocator failures reported on 2c5c33d4 are still relevant to an allocator extraction. This range leaves alloc_pool.rs untouched. At the time of this update, GitHub showed the PR description check failed and the no-GPU Windows build and test check in progress. Allocator retest · PR checks

AI use — Codex (GPT-6) compared the GitHub revisions and drafted this update. This was a static review. No Windows build, test suite, GPU test, or retail smoke run was performed for this update.

<!-- greyfinch-sync:ivall/xcl:comment:7193919117 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/2787#issuecomment-7193919117). Originally posted by [KOLESNiii](https://github.com/KOLESNiii) on 2026-11-26T13:50:51Z. --- #2778 is now at `ff6be930f09d`, 14 commits past the `a4f0399f19e4` snapshot used for this plan. [Compare the two heads](https://github.com/xcl-dev/xcl/compare/a4f0399f19e4...ff6be930f09d). - **Sparse upload recovery (S1–S3).** Keep the existing source commits and coordinate S1 with #1277. `99c45c49` ties batch acceptance and publication to exact staging reservations, and `2c5c33d4` models foreground waits against exact fence and queue generations. `bd64a1db`, `0ab510a2`, and `2116d1076` remove the older commit, plan, and claim wrappers after moving coverage to the coordinated model. Leave those five commits on #2778. S1–S3 still target the live synchronous upload path. - **Pipeline eviction and restoration.** `d98343d2` adds bounded candidate inspection through the opt-in pressure observer. It observes pressure without evicting pipelines. `eac1a941`, `aedde19c`, `c9a26c5e`, and `ff6be930` add restoration receipts, coordination, foreground promotion of an existing attempt, and tests for exact-attempt and generation lifetimes. The restoration coordinator remains unwired. Keep this work on #2778 pending the workload and lifetime evidence described above. - **Measurement tools.** `f910a402` adapts #1065 to time the actual native submission chunks under `XCL_GPU_TIMING`. Keep it as a separate diagnostics candidate and coordinate with #1065, which is still open. For the benchmarks, `10da931f` provides the dependency-free harness, then `895b6e3e` and `f6577375` add synthetic and runtime/shader workloads adapted from open PRs #1148 and #1152. Coordinate with those PRs before extracting the benchmark work. The benchmark harness is separate from the cold/warm runner in the plan. - **Deferred CPU writes (W1–W5) and tiling (T1).** The existing source sequences still apply to both slices. The allocator failures reported on `2c5c33d4` are still relevant to an allocator extraction. This range leaves `alloc_pool.rs` untouched. At the time of this update, GitHub showed the PR description check failed and the no-GPU Windows build and test check in progress. [Allocator retest](https://github.com/xcl-dev/xcl/pull/2778#issuecomment-7193206270) · [PR checks](https://github.com/xcl-dev/xcl/pull/2778/checks) **AI use** — Codex (GPT-6) compared the GitHub revisions and drafted this update. This was a static review. No Windows build, test suite, GPU test, or retail smoke run was performed for this update.
KOLESNiii commented 2026-11-26 14:03:10 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-26T14:02:30Z.


Three world-load items from this plan already have an open PR, so I am not extracting them again from #2778:

Item in this plan Source commits Already in
GPU-ordered texture uploads (submitting queue + page-mapping wait) d8ddd5b5, e12049fe #2558 (carries #455 forward, adds the page-mapping wait)
Ordered DirectStorage events 3fd55dff #2569
Keep cold pipeline builds off title threads aff341e1 #2615

I checked each by reading the open PR's description against the source commit. I did not diff the patches line by line. Any delta from #2778 that is still missing should go to those PRs as review or a follow-up, not into a new PR.

AI use: Claude Code (Claude Opus 5.5) compared the commits with the open PRs and drafted this comment.

<!-- greyfinch-sync:ivall/xcl:comment:7194193067 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/2787#issuecomment-7194193067). Originally posted by [KOLESNiii](https://github.com/KOLESNiii) on 2026-11-26T14:02:30Z. --- Three world-load items from this plan already have an open PR, so I am not extracting them again from #2778: | Item in this plan | Source commits | Already in | | --- | --- | --- | | GPU-ordered texture uploads (submitting queue + page-mapping wait) | `d8ddd5b5`, `e12049fe` | #2558 (carries #455 forward, adds the page-mapping wait) | | Ordered DirectStorage events | `3fd55dff` | #2569 | | Keep cold pipeline builds off title threads | `aff341e1` | #2615 | I checked each by reading the open PR's description against the source commit. I did not diff the patches line by line. Any delta from #2778 that is still missing should go to those PRs as review or a follow-up, not into a new PR. **AI use**: Claude Code (Claude Opus 5.5) compared the commits with the open PRs and drafted this comment.
KOLESNiii commented 2026-11-26 14:04:30 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-26T14:04:30Z.


I am taking these from this plan, as world-load work under #1833. T1 and S1 are PRs from main b49be183, C1–C3 from main 8b957bec:

PR Source commits How
T1. Contiguous 2D tiling (#2820) b81ac2eb Clean cherry-pick -x, unchanged
S1. Stop timed-out sparse uploads from reusing live staging (#2821) faea307a → 37271a3c Port, stacked on #1277: its commit stays first with its author, then these two on top. The conflicts were resolved by hand: #2778's stall tracing and quarantine-fence helpers are left out, and main's readback ExecuteCommandLists is kept.
C1. Separate pipeline builds from stand-ins (PR to follow) 6f6b5a27 Clean cherry-pick -x. No behaviour change
C2. Canonical compute build identity (PR to follow, stacked on C1) 0fef9d5a → 67629ad4 → fedfbe4c 0fef9d5a is a port: in submit_as, main's send stays as the build's sent, because #2778's priority queue is not on main. The other two are clean picks. The key is stored but not read yet
C3. Coalesce identical compute builds (PR to follow, stacked on C2) b946815d Port without the priority build queue (e7c522d8/2ccea5e1, which would compete with #628). A request that joins a lazy build sends it to main's workers itself. The per-submit sweep of the in-flight registry is dropped: with lazy creation it made every submit linear in the unbuilt pipelines. One extra commit logs how many compute pipelines shared a build. 9722ba83 (its report) is not taken, because it needs #2778's stall module

Not taking: S2/S3 (they wait on S1), the W1–W5 deferred-write stack, the priority queue and preload ranking (e7c522d8, 2ccea5e1, 56cffc2b; see #628), and the used-key journal (7ea65ea9, 77eb9e7f; see #2635).

Dropped after testing: 054270ca (sparse copy-back keeps newer CPU writes). Ported alone onto main (18fb3660), it breaks 3 of the 4 e2e tests (RTX 2070 SUPER, cargo test --workspace -- --test-threads=4):

[FAIL] D3D12.X: console command list memory methods (...): post-Wait32/64 write failed (0x0)

Cause (confirmed by logging the chunks land_page skips: va=…300 chunk=12 bytes=16..20 cpu=00000000 gpu=aa55aa55): in that test the title's CPU thread writes the wait cells at +0x300/+0x308 while the GPU waits on them, and the GPU then writes +0x310. All three addresses are in the same 64-byte chunk. land_page sees that the chunk's CPU hash differs from the last-sent hash and keeps the CPU bytes for the whole chunk, so the GPU's write is lost. Choosing at chunk level which side wins is unsafe when the CPU and GPU write different bytes of one chunk. The commit needs a byte-level merge, or the CPU write uploaded before the copy-back, before it can land on its own.

T1 (#2820) and S1 (#2821) have the full GPU suite and paired smoke runs. C1–C3 have passed the full GPU suite (0 failed on each head) and are waiting for their smoke runs before I open them as drafts. Original authorship and the source SHAs stay in the commits.

AI use: Claude Code (Claude Opus 5.5) chose these from the plan, did the cherry-picks and ports, and drafted this comment.

<!-- greyfinch-sync:ivall/xcl:comment:7194240223 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/2787#issuecomment-7194240223). Originally posted by [KOLESNiii](https://github.com/KOLESNiii) on 2026-11-26T14:04:30Z. --- I am taking these from this plan, as world-load work under #1833. T1 and S1 are PRs from `main` `b49be183`, C1–C3 from `main` `8b957bec`: | PR | Source commits | How | | --- | --- | --- | | **T1. Contiguous 2D tiling** (#2820) | `b81ac2eb` | Clean `cherry-pick -x`, unchanged | | **S1. Stop timed-out sparse uploads from reusing live staging** (#2821) | `faea307a` → `37271a3c` | Port, **stacked on #1277**: its commit stays first with its author, then these two on top. The conflicts were resolved by hand: #2778's `stall` tracing and quarantine-fence helpers are left out, and `main`'s readback `ExecuteCommandLists` is kept. | | **C1. Separate pipeline builds from stand-ins** (PR to follow) | `6f6b5a27` | Clean `cherry-pick -x`. No behaviour change | | **C2. Canonical compute build identity** (PR to follow, stacked on C1) | `0fef9d5a` → `67629ad4` → `fedfbe4c` | `0fef9d5a` is a port: in `submit_as`, `main`'s `send` stays as the build's `sent`, because #2778's priority queue is not on `main`. The other two are clean picks. The key is stored but not read yet | | **C3. Coalesce identical compute builds** (PR to follow, stacked on C2) | `b946815d` | Port **without the priority build queue** (`e7c522d8`/`2ccea5e1`, which would compete with #628). A request that joins a lazy build sends it to `main`'s workers itself. The per-submit sweep of the in-flight registry is dropped: with lazy creation it made every submit linear in the unbuilt pipelines. One extra commit logs how many compute pipelines shared a build. `9722ba83` (its report) is not taken, because it needs #2778's `stall` module | Not taking: S2/S3 (they wait on S1), the W1–W5 deferred-write stack, the priority queue and preload ranking (`e7c522d8`, `2ccea5e1`, `56cffc2b`; see #628), and the used-key journal (`7ea65ea9`, `77eb9e7f`; see #2635). **Dropped after testing: `054270ca` (sparse copy-back keeps newer CPU writes).** Ported alone onto `main` (`18fb3660`), it breaks 3 of the 4 `e2e` tests (RTX 2070 SUPER, `cargo test --workspace -- --test-threads=4`): ``` [FAIL] D3D12.X: console command list memory methods (...): post-Wait32/64 write failed (0x0) ``` Cause (confirmed by logging the chunks `land_page` skips: `va=…300 chunk=12 bytes=16..20 cpu=00000000 gpu=aa55aa55`): in that test the title's CPU thread writes the wait cells at `+0x300`/`+0x308` while the GPU waits on them, and the GPU then writes `+0x310`. All three addresses are in the same 64-byte chunk. `land_page` sees that the chunk's CPU hash differs from the last-sent hash and keeps the CPU bytes for the whole chunk, so the GPU's write is lost. Choosing at chunk level which side wins is unsafe when the CPU and GPU write different bytes of one chunk. The commit needs a byte-level merge, or the CPU write uploaded before the copy-back, before it can land on its own. T1 (#2820) and S1 (#2821) have the full GPU suite and paired smoke runs. C1–C3 have passed the full GPU suite (0 failed on each head) and are waiting for their smoke runs before I open them as drafts. Original authorship and the source SHAs stay in the commits. **AI use**: Claude Code (Claude Opus 5.5) chose these from the plan, did the cherry-picks and ports, and drafted this comment.
CryingLaughing commented 2026-11-26 16:31:36 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by CryingLaughing on 2026-11-26T16:31:36Z.


The active producer’s KickoffX Close failure from 73898793 reproduces on current main 8b957bec6f82495aec940944c6bf47faa02db590 and on its automatic Git merge with #2320 head 62f6d4737b28a5fc7e9808350724c0c1a4a0f168 (tree 870dc210e30b85a44d16078b9993641a180b077b). Both locked debug builds succeeded on Windows 11 25H2 build 26200.9974, Core i5-13600K, Rust 1.100.0 x64 MSVC.

The same test-only CPU fixture calls kickoff_x with a mock native Close returning E_OUTOFMEMORY. Both runs failed the intended assertion (0 passed, 1 failed, 0 ignored). Each removed the pending wait, Write64 signal, and CPU write, and the wrapper still exposed one segment. The fixture stops before any native queue submission. The failure occurs before the successful-submit target selection that #2320 changes.

The extraction needs to preserve these effects until a successful close or an abandoned-recording cleanup, keep the failed recording out of submission and spare reuse, and let the wrapper recover onto a healthy backing. Microsoft documents that a failed native Close leaves that same list unable to Reset. D3D12 Reset contract

Native follow-up

The test-only fixture is available for the implementation in this issue. It injects one E_OUTOFMEMORY result at native Close. Its control stops before submitting the failed recording.

  • Main 8b957bec6f82495aec940944c6bf47faa02db590 with the fixture reproduced the same loss of all three pending effects and one eligible segment. 0 passed, 1 failed, 0 ignored.
  • A local reference implementation with the same fixture retained the three effects and suppressed native Execute. An explicit Reset recovered with the same command-list and canonical COM identities. The new backing was submitted once and returned the exact four synthetic readback words. The failed recording’s CPU write stayed at zero. Reference production tree d7a992ef6a0b58952fbaf5a027a0d6eab6eda52b, combined overlay patch ID 3e0294eefd422810dcf4a2ce1549be0c57e3bce7. 1 passed, 0 failed, 0 ignored.

Both runs used an RTX 4080 with driver 621.01, Windows 11 25H2 build 26200.9974, Core i5-13600K, and Rust 1.100.0 x64 MSVC in the debug test profile. There were zero capability skips. Each run used XCL_ADAPTER=4080, a 30-second watchdog, and the following commands.

cargo test --offline --locked -j 2 -p xcl --lib --no-run --message-format=json
<xcl library test executable> --exact hle::d3d12x::list_x::tests::kickoff_close_refusal_preserves_identity_and_recovers_a_native_recording --test-threads=1 --nocapture
<!-- greyfinch-sync:ivall/xcl:comment:7197760596 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/2787#issuecomment-7197760596). Originally posted by [CryingLaughing](https://github.com/CryingLaughing) on 2026-11-26T16:31:36Z. --- The active producer’s `KickoffX` Close failure from [`73898793`](https://github.com/bmjask/xcl/commit/73898793979b9db93e4f5b06f6c83e7358705003) reproduces on current main `8b957bec6f82495aec940944c6bf47faa02db590` and on its automatic Git merge with #2320 head `62f6d4737b28a5fc7e9808350724c0c1a4a0f168` (tree `870dc210e30b85a44d16078b9993641a180b077b`). Both locked debug builds succeeded on Windows 11 25H2 build 26200.9974, Core i5-13600K, Rust 1.100.0 x64 MSVC. The same test-only CPU fixture calls `kickoff_x` with a mock native `Close` returning `E_OUTOFMEMORY`. Both runs failed the intended assertion (0 passed, 1 failed, 0 ignored). Each removed the pending wait, Write64 signal, and CPU write, and the wrapper still exposed one segment. The fixture stops before any native queue submission. The failure occurs before the successful-submit target selection that #2320 changes. The extraction needs to preserve these effects until a successful close or an abandoned-recording cleanup, keep the failed recording out of submission and spare reuse, and let the wrapper recover onto a healthy backing. Microsoft documents that a failed native Close leaves that same list unable to Reset. [D3D12 Reset contract](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12graphicscommandlist-reset#runtime-validation) ### Native follow-up The [test-only fixture](https://github.com/CryingLaughing/xcl/commit/e934604f6a93ccce6e89a06dd5bca4b3de7a0af8) is available for the implementation in this issue. It injects one `E_OUTOFMEMORY` result at native Close. Its control stops before submitting the failed recording. - Main `8b957bec6f82495aec940944c6bf47faa02db590` with the fixture reproduced the same loss of all three pending effects and one eligible segment. 0 passed, 1 failed, 0 ignored. - A local reference implementation with the same fixture retained the three effects and suppressed native Execute. An explicit Reset recovered with the same command-list and canonical COM identities. The new backing was submitted once and returned the exact four synthetic readback words. The failed recording’s CPU write stayed at zero. Reference production tree `d7a992ef6a0b58952fbaf5a027a0d6eab6eda52b`, combined overlay patch ID `3e0294eefd422810dcf4a2ce1549be0c57e3bce7`. 1 passed, 0 failed, 0 ignored. Both runs used an RTX 4080 with driver 621.01, Windows 11 25H2 build 26200.9974, Core i5-13600K, and Rust 1.100.0 x64 MSVC in the debug test profile. There were zero capability skips. Each run used `XCL_ADAPTER=4080`, a 30-second watchdog, and the following commands. ```text cargo test --offline --locked -j 2 -p xcl --lib --no-run --message-format=json <xcl library test executable> --exact hle::d3d12x::list_x::tests::kickoff_close_refusal_preserves_identity_and_recovers_a_native_recording --test-threads=1 --nocapture ```
KOLESNiii commented 2026-11-26 19:48:48 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-26T19:48:48Z.


I checked the #2778 source commits against main at 8b957bec, the claims in this thread, and related open and closed PRs, including the #1607 triage. These are the remaining changes for which I found no equivalent focused implementation or announced owner. The order reflects likely impact on the #1833 world-load goal, with correctness failures ahead of possible performance gains.

  1. Sparse upload recovery, S2 then S3 (41a369ee → 3cd053e4). Build on S1. Publish sent hashes only after the upload queue signals, and retain staging if Execute may have run without a usable signal. Then preserve the dirty work across preparation failure, roll back the failed title-queue wait, and stop Execute and Kickoff from submitting against stale data. S1 already rescans unsent chunks and retries failed clears, so the follow-ups can focus on signal-gated publication and the title submit gate. Test a signalled prefix, an unsent suffix, and Signal failure after Execute. #2821
  2. Recover when the active KickoffX producer fails Close (73898793). The fixture above loses pending waits, Write64 signals, and CPU writes on both main and main plus #2320. Keep those effects pending through Close, quarantine the failed recording, and recover onto a healthy backing. The #2320 tests cover idle-target selection and Reset failures after submission. Reproduction
  3. Wait for the deferred CPU store that satisfies a list wait, W1–W5 (62de4d55 → 1b0b589c → 4d17a73b → b3d9441e → 311fc618). Keep the producer tracking needed for the behavior change. The distinct case is a general deferred CPU write in an earlier physical segment whose store must finish before a later Wait32/64 can proceed. Use a regression on ordinary non-UMA title memory that exercises Execute and Kickoff and shows unrelated writes stay asynchronous. Coordinate the same-list shortcuts and registered Write64 sync cells with #1256, #2506, #850 and #2439.
  4. Recover when a mid-list split fails (617b493d, 03e4d27d, relevant reservation code from d5aa0a6a). Preflight a continuation, preserve the producer's recording effects on failure, and keep an unclosed list out of execution and spare reuse. Fault-inject producer Close and continuation Reset separately. Share recovery machinery with item 2 where practical. The put-off segment's own Close path is already in #2622.
  5. Pin the exact allocator backing before native Execute (cf40395a → 06d03e60, with the busy-backing ownership needed from 93693054). Close the gap where Reset or final Release can run before post-Execute bookkeeping attaches the fence to the recording. Prove the pre-Execute pin survives concurrent Reset/Release and an unusable fence marker. Use the fixture corrections reported on #2778. Existing allocator PRs cover rotated-list creation, idle retirement, and holds after list release, so scope this to the submission reservation and the backing it needs. #1071 #2707 #1305 Allocator retest
  6. Prewarm the indirect variants a title actually uses (c162ffb1 → 6495067f), then measure per-recording indirect command storage reuse (aa446c29) independently. The first can remove a cold whole-form build at first indirect use. The second can save repeated resource creation within a recording. Measure first-use wait and allocations separately. Build on the existing split execution and root-CBV work, and carry forward the list lifecycle checks. #2404 #2633 #2543
  7. Cache native extended graphics streams (9e82e2aa → 6457c188) once the native stream path is in place. Limit this to pointer-free stream identity and rejected-blob recovery for that path. Verify a real cold-build/warm-hit pair and that rejecting an old blob preserves a newer replacement. #2621 #2614
  8. Repeatable cold/warm runs (5bdaa54e → dfcd4bbb, then the distinct artifact checks from fd237b1b). The useful gap is a paired run with isolated XCL caches, a workload fingerprint, and environment checks before comparison. Keep the driver cache described as uncontrolled and reuse the existing log comparator where it fits. Coarse stall aggregation (dab895e5 → e0635a1c) is a separate candidate once a workload needs it. #943 #1065

The existing work includes T1, S1 and PSO worker admission (#2820, #2821, #2826), plus the C1–C3 claim above. The #2610 author is preparing the DispatchX tail-mask follow-up. GPU-written texture readback is underway in #2663/#2678, and texture upload ordering and failed-wait lifetime are covered by #2558/#1486. Heap address reuse has #2701, graphics descriptor keying has #902, and Kickoff idle-target Reset recovery has #2320. Most of the small optimizations already have focused PRs (#2594, #2664, #2673, #2573, #2656, #2702, #2696, #2692), as do the initial shader-lowering slices (#2565, #2568, #2559, #2641, #2640, #2554). The chunk-level sparse copyback port 054270ca is blocked by the mixed CPU/GPU write regression reported above, and #1847/#1740 already cover related preservation cases.

AI use — OpenAI Codex (GPT-6 family) compared commit diffs, main, PR descriptions and discussion, and drafted this triage. Static review. No new runtime measurements.

<!-- greyfinch-sync:ivall/xcl:comment:7201987602 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/2787#issuecomment-7201987602). Originally posted by [KOLESNiii](https://github.com/KOLESNiii) on 2026-11-26T19:48:48Z. --- I checked the #2778 source commits against `main` at `8b957bec`, the claims in this thread, and related open and closed PRs, including the #1607 triage. These are the remaining changes for which I found no equivalent focused implementation or announced owner. The order reflects likely impact on the #1833 world-load goal, with correctness failures ahead of possible performance gains. 1. **Sparse upload recovery, S2 then S3** (`41a369ee` → `3cd053e4`). Build on S1. Publish sent hashes only after the upload queue signals, and retain staging if Execute may have run without a usable signal. Then preserve the dirty work across preparation failure, roll back the failed title-queue wait, and stop Execute and Kickoff from submitting against stale data. S1 already rescans unsent chunks and retries failed clears, so the follow-ups can focus on signal-gated publication and the title submit gate. Test a signalled prefix, an unsent suffix, and Signal failure after Execute. #2821 2. **Recover when the active KickoffX producer fails Close** (`73898793`). The fixture above loses pending waits, Write64 signals, and CPU writes on both main and main plus #2320. Keep those effects pending through Close, quarantine the failed recording, and recover onto a healthy backing. The #2320 tests cover idle-target selection and Reset failures after submission. [Reproduction](https://github.com/xcl-dev/xcl/issues/2787#issuecomment-7197760596) 3. **Wait for the deferred CPU store that satisfies a list wait, W1–W5** (`62de4d55` → `1b0b589c` → `4d17a73b` → `b3d9441e` → `311fc618`). Keep the producer tracking needed for the behavior change. The distinct case is a general deferred CPU write in an earlier physical segment whose store must finish before a later Wait32/64 can proceed. Use a regression on ordinary non-UMA title memory that exercises Execute and Kickoff and shows unrelated writes stay asynchronous. Coordinate the same-list shortcuts and registered Write64 sync cells with #1256, #2506, #850 and #2439. 4. **Recover when a mid-list split fails** (`617b493d`, `03e4d27d`, relevant reservation code from `d5aa0a6a`). Preflight a continuation, preserve the producer's recording effects on failure, and keep an unclosed list out of execution and spare reuse. Fault-inject producer Close and continuation Reset separately. Share recovery machinery with item 2 where practical. The put-off segment's own Close path is already in #2622. 5. **Pin the exact allocator backing before native Execute** (`cf40395a` → `06d03e60`, with the busy-backing ownership needed from `93693054`). Close the gap where Reset or final Release can run before post-Execute bookkeeping attaches the fence to the recording. Prove the pre-Execute pin survives concurrent Reset/Release and an unusable fence marker. Use the fixture corrections reported on #2778. Existing allocator PRs cover rotated-list creation, idle retirement, and holds after list release, so scope this to the submission reservation and the backing it needs. #1071 #2707 #1305 [Allocator retest](https://github.com/xcl-dev/xcl/pull/2778#issuecomment-7193206270) 6. **Prewarm the indirect variants a title actually uses** (`c162ffb1` → `6495067f`), then measure **per-recording indirect command storage reuse** (`aa446c29`) independently. The first can remove a cold whole-form build at first indirect use. The second can save repeated resource creation within a recording. Measure first-use wait and allocations separately. Build on the existing split execution and root-CBV work, and carry forward the list lifecycle checks. #2404 #2633 #2543 7. **Cache native extended graphics streams** (`9e82e2aa` → `6457c188`) once the native stream path is in place. Limit this to pointer-free stream identity and rejected-blob recovery for that path. Verify a real cold-build/warm-hit pair and that rejecting an old blob preserves a newer replacement. #2621 #2614 8. **Repeatable cold/warm runs** (`5bdaa54e` → `dfcd4bbb`, then the distinct artifact checks from `fd237b1b`). The useful gap is a paired run with isolated XCL caches, a workload fingerprint, and environment checks before comparison. Keep the driver cache described as uncontrolled and reuse the existing log comparator where it fits. Coarse stall aggregation (`dab895e5` → `e0635a1c`) is a separate candidate once a workload needs it. #943 #1065 The existing work includes T1, S1 and PSO worker admission (#2820, #2821, #2826), plus the [C1–C3 claim above](https://github.com/xcl-dev/xcl/issues/2787#issuecomment-7194240223). [The #2610 author is preparing the DispatchX tail-mask follow-up](https://github.com/xcl-dev/xcl/pull/2610#issuecomment-7196666609). GPU-written texture readback is underway in #2663/#2678, and texture upload ordering and failed-wait lifetime are covered by #2558/#1486. Heap address reuse has #2701, graphics descriptor keying has #902, and Kickoff idle-target Reset recovery has #2320. Most of the small optimizations already have focused PRs (#2594, #2664, #2673, #2573, #2656, #2702, #2696, #2692), as do the initial shader-lowering slices (#2565, #2568, #2559, #2641, #2640, #2554). The chunk-level sparse copyback port `054270ca` is blocked by the mixed CPU/GPU write regression reported above, and #1847/#1740 already cover related preservation cases. **AI use** — OpenAI Codex (GPT-6 family) compared commit diffs, main, PR descriptions and discussion, and drafted this triage. Static review. No new runtime measurements.
KOLESNiii commented 2026-11-26 19:52:25 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-26T19:52:25Z.


I’m claiming items 2, 4, 8 and 3 from the ranked list above:

  • 2. KickoffX Close recovery (73898793). I’ll start with the active producer’s Close failure and the existing reproduction. The fix will preserve pending effects, quarantine the failed recording, and recover onto a healthy backing. I’ll coordinate with #2320 where the paths meet.
  • 4. Mid-list split failure recovery (617b493d, 03e4d27d, and the relevant parts of d5aa0a6a). I’ll cover producer Close failure and continuation Reset failure separately, reusing the standby and cleanup code from item 2 where it fits.
  • 8. Repeatable cold/warm runs (5bdaa54e, dfcd4bbb, then the artifact checks from fd237b1b). I’ll start with the paired runner and workload fingerprint, then add the comparison checks that complement #943. I’ll keep any stall-reporting work separate.
  • 3. Deferred CPU write ordering (W1–W5, 62de4d55 through 311fc618). I’ll extract the producer tracking and the change that waits for the exact deferred CPU store across segments, with regression coverage for Execute and Kickoff. I’ll coordinate with #1256, #2506, #850 and #2439 on the overlapping wait paths.

AI use — OpenAI Codex (GPT-6 family) drafted this coordination comment.

<!-- greyfinch-sync:ivall/xcl:comment:7202049473 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/2787#issuecomment-7202049473). Originally posted by [KOLESNiii](https://github.com/KOLESNiii) on 2026-11-26T19:52:25Z. --- I’m claiming items **2, 4, 8 and 3** from the [ranked list above](https://github.com/xcl-dev/xcl/issues/2787#issuecomment-7201987602): - **2. KickoffX Close recovery** (`73898793`). I’ll start with the active producer’s Close failure and the existing reproduction. The fix will preserve pending effects, quarantine the failed recording, and recover onto a healthy backing. I’ll coordinate with #2320 where the paths meet. - **4. Mid-list split failure recovery** (`617b493d`, `03e4d27d`, and the relevant parts of `d5aa0a6a`). I’ll cover producer Close failure and continuation Reset failure separately, reusing the standby and cleanup code from item 2 where it fits. - **8. Repeatable cold/warm runs** (`5bdaa54e`, `dfcd4bbb`, then the artifact checks from `fd237b1b`). I’ll start with the paired runner and workload fingerprint, then add the comparison checks that complement #943. I’ll keep any stall-reporting work separate. - **3. Deferred CPU write ordering** (W1–W5, `62de4d55` through `311fc618`). I’ll extract the producer tracking and the change that waits for the exact deferred CPU store across segments, with regression coverage for Execute and Kickoff. I’ll coordinate with #1256, #2506, #850 and #2439 on the overlapping wait paths. **AI use** — OpenAI Codex (GPT-6 family) drafted this coordination comment.
KOLESNiii commented 2026-11-27 15:48:07 +00:00 (Migrated from github.com)
Author
Contributor

Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-27T15:48:07Z.


Item 3 of the ranked list (deferred CPU write ordering, W1–W5) is now three stacked draft PRs from main 8b957bec:

PR Source commits How
#3033 Exact command-list write intervals 62de4d55 Clean cherry-pick -x. No behaviour change
#3034 Submission snapshot and segmentation seam (stacked on #3033) 1b0b589c → 4d17a73b Clean picks. No behaviour change
#3035 A list wait after a deferred CPU write waits for that store (stacked on #3034) b3d9441e → 311fc618, plus a new e2e test Two fixes: 311fc618 did not compile without #2778's later 187b4116, which is folded in. The fixture of b3d9441e's split_carry_recreates_the_continuation_state now records its write through note_write. That test also fails on the #2778 head.

The new e2e test records a bottom-of-pipe write to ordinary title memory and then Wait32BitValueX on the same cell, submitted by ExecuteCommandLists and by KickoffX. On main it fails: the wait times out before the list holding the write is submitted, and reads 0x0. It passes on #3035.

All three heads passed the full GPU suite (0 failed; RTX 2070 SUPER, 15 SKIPPED for no wave64). Each has a paired smoke run on a retail game with no removals or crashes. In its 60 s the game logs no mid-list split or deferred CPU write, so only the e2e and unit tests reach the new ordering. I have not merged or tested this together with #1256, #2506, #850 or #2439.

Original authorship and the source SHAs stay in the commits.

AI use: Claude Code (Claude Opus 5.5) did the cherry-picks and fixes, wrote the e2e test, ran the tests and smoke runs, and drafted this comment.

<!-- greyfinch-sync:ivall/xcl:comment:7222498510 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/2787#issuecomment-7222498510). Originally posted by [KOLESNiii](https://github.com/KOLESNiii) on 2026-11-27T15:48:07Z. --- Item 3 of the [ranked list](https://github.com/xcl-dev/xcl/issues/2787#issuecomment-7201987602) (deferred CPU write ordering, W1–W5) is now three stacked draft PRs from `main` `8b957bec`: | PR | Source commits | How | | --- | --- | --- | | #3033 Exact command-list write intervals | `62de4d55` | Clean `cherry-pick -x`. No behaviour change | | #3034 Submission snapshot and segmentation seam (stacked on #3033) | `1b0b589c` → `4d17a73b` | Clean picks. No behaviour change | | #3035 A list wait after a deferred CPU write waits for that store (stacked on #3034) | `b3d9441e` → `311fc618`, plus a new e2e test | Two fixes: `311fc618` did not compile without #2778's later `187b4116`, which is folded in. The fixture of `b3d9441e`'s `split_carry_recreates_the_continuation_state` now records its write through `note_write`. That test also fails on the #2778 head. | The new e2e test records a bottom-of-pipe write to ordinary title memory and then `Wait32BitValueX` on the same cell, submitted by `ExecuteCommandLists` and by `KickoffX`. On `main` it fails: the wait times out before the list holding the write is submitted, and reads `0x0`. It passes on #3035. All three heads passed the full GPU suite (0 failed; RTX 2070 SUPER, 15 SKIPPED for no wave64). Each has a paired smoke run on a retail game with no removals or crashes. In its 60 s the game logs no mid-list split or deferred CPU write, so only the e2e and unit tests reach the new ordering. I have not merged or tested this together with #1256, #2506, #850 or #2439. Original authorship and the source SHAs stay in the commits. **AI use**: Claude Code (Claude Opus 5.5) did the cherry-picks and fixes, wrote the e2e test, ran the tests and smoke runs, and drafted this comment.
Sign in to join this conversation.
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#2777
No description provided.