D3D12.X: a worker waiting for a big compile turn leaves the queue to a helper #2628

Open
github-bot wants to merge 1 commit from github-bot/gh-2628 into main AGit
Owner

@⁠KOLESNiii on GitHub · 2026-11-26 03:10 UTC · original
KOLESNiii:d3d12x-gate-frees-worker → main · +186 −18 · 2 files · 1 commits · open

A huge driver compile on an xcl-pso worker waits in big_compile_turn for one of the few slots (one at a time by default, 3 GB of free commit each), and it keeps its worker thread while it waits. When the retail title of #505 starts its world, every worker takes one of the title's huge compute programs and waits there, with only one or two of them compiling, so the rest of the queue has no worker. With this change, a pool worker that has to wait gets a helper thread in its place, up to as many helpers as the pool has workers. The helper serves the queue and leaves once the worker is back. The slots and the commit check are unchanged, so no more driver compiles run at once than before. This is not "more workers" in the sense #2088 warns against.

Part of #1269, #2088 (scheduling).

What is in it

  • crates/xcl/src/hle/d3d12x/pso_async.rs:
    • The queue is one Mutex + Condvar holding the work and the counts of parked workers and helpers, instead of an mpsc channel. Nobody holds the lock while waiting for work.
    • parked() returns a guard. On a pool worker it counts the worker as parked and starts a helper (xcl-pso-h{k}) while the number of helpers is below the number of parked workers. Off the pool, it does nothing.
    • A helper leaves when there are more helpers than parked workers. That check and a worker's parking happen under the same lock, and a worker that comes back wakes the idle helpers.
    • Two tests:
      • workers_parked_for_big_compiles_leave_the_queue_to_helpers: parks every worker and checks that a job queued behind them still runs, and that the counts return to 0 with no new work; twice. Without the change, that job never runs.
      • parked_outside_the_pool_starts_no_helper.
  • crates/xcl/src/hle/d3d12x/real.rs: big_compile_turn takes the guard before its first wait and holds it until it gets its slot.

Tested

  • RTX 2070 SUPER 8 GB (Turing, wave32 only), driver 32.0.16.2140; Ryzen 5 3600XT (6 cores / 12 threads); 32 GB RAM; Windows 11 build 26300; rustc 1.100.0; DXC 1.9.2609.5.
  • cargo test --workspace -- --test-threads=4 on 8b15bae: 1431 passed, 0 failed, 47 ignored; 25 SKIPPED checks: 21 "no wave64", 3 f16 per-lane forms refused (#1426), 1 "no heap windows"
  • cargo test -p xcl --lib parked, 30 runs with XCL_DXC_THREADS 1, 2 and 3: 0 failures.
  • Retail title of #505 (1.0.2.1), cold, release build (A/B measured on 3693d9e, before the queue change in review):
    • Setup:

      • a fresh empty XCL_DXIL_CACHE
      • the NVIDIA / D3D12 implicit shader caches off (a local experiment-only ShaderCacheControl call, the same in both trees, not in this PR)
      • XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_PSO_TRACE=1
      • 780 s runs, the game started by hand
    • Results, one run each, the 10 min after the world load, from xcl.log:

      main 08db802 this PR
      driver pipeline builds 372 398 (+7 %)
      … compute 257 283 (+10 %)
      … graphics 115 115
      peak commit 31.0 GB 31.2 GB
      presents 0 0
      exit / device removal / crash 0 / none / none 0 / none / none
    • Frames do not come back within 10 min in either run. Most of what is left on the title's threads is graphics pipelines built at a draw's first bind, which #1798 addresses. With #1798 on top of this PR, the title's threads spent 66 s in builds instead of 319 s (test report on #1798).

Regression run

main:

xcl-smoke v1
commit: 08db8020d323bf478964fcc586152cce54959cfc
gpu: NVIDIA GeForce RTX 2070 SUPER
title: 3c290c16
seconds: 120
exit: 0x0
frames shown: 3249 (PresentX 3249)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 17249 MB

This PR:

xcl-smoke v1
commit: 8b15baee713b9403d2fd64b1d6af04c02e1822b9
gpu: NVIDIA GeForce RTX 2070 SUPER
title: 3c290c16
seconds: 120
exit: 0x0
frames shown: 3242 (PresentX 3243)
presents per 2 s (last 3): 61 60 58
device removals: 0
crashes: 0
peak commit: 17338 MB

Not tested

  • The smoke title does not reach a big compile: no helper was started in its 120 s, so the smoke run covers only the code paths that are unchanged.
  • The retail A/B was not rerun after the queue change in review (3693d9e → 8b15bae).
  • One cold run per tree; warm caches or after an offline precompile; AMD; wave64 GPUs.
  • main has moved by 4 commits since 08db802 (#2371). The PR merges into it without conflicts, but it was not rebased or rerun on it.

AI use

  • Claude Code with Claude Opus 5.5:
    • found the stall in a Tracy trace
    • wrote the change, the tests and this description
    • ran the suite, the smoke runs and the A/B runs
  • I started the game in each A/B run.

🤖 Generated with Claude Code

https://claude.ai/code/session_015csBcd63KUE2T1kW2P15nC

**@⁠KOLESNiii** on GitHub · 2026-11-26 03:10 UTC · [original](https://github.com/xcl-dev/xcl/pull/2628) `KOLESNiii:d3d12x-gate-frees-worker` → `main` · +186 −18 · 2 files · 1 commits · open A huge driver compile on an `xcl-pso` worker waits in `big_compile_turn` for one of the few slots (one at a time by default, 3 GB of free commit each), and it keeps its worker thread while it waits. When the retail title of #505 starts its world, every worker takes one of the title's huge compute programs and waits there, with only one or two of them compiling, so the rest of the queue has no worker. With this change, a pool worker that has to wait gets a helper thread in its place, up to as many helpers as the pool has workers. The helper serves the queue and leaves once the worker is back. The slots and the commit check are unchanged, so no more driver compiles run at once than before. This is not "more workers" in the sense #2088 warns against. Part of #1269, #2088 (scheduling). **What is in it** - `crates/xcl/src/hle/d3d12x/pso_async.rs`: - The queue is one `Mutex` + `Condvar` holding the work and the counts of parked workers and helpers, instead of an `mpsc` channel. Nobody holds the lock while waiting for work. - `parked()` returns a guard. On a pool worker it counts the worker as parked and starts a helper (`xcl-pso-h{k}`) while the number of helpers is below the number of parked workers. Off the pool, it does nothing. - A helper leaves when there are more helpers than parked workers. That check and a worker's parking happen under the same lock, and a worker that comes back wakes the idle helpers. - Two tests: - `workers_parked_for_big_compiles_leave_the_queue_to_helpers`: parks every worker and checks that a job queued behind them still runs, and that the counts return to 0 with no new work; twice. Without the change, that job never runs. - `parked_outside_the_pool_starts_no_helper`. - `crates/xcl/src/hle/d3d12x/real.rs`: `big_compile_turn` takes the guard before its first wait and holds it until it gets its slot. **Tested** - RTX 2070 SUPER 8 GB (Turing, wave32 only), driver 32.0.16.2140; Ryzen 5 3600XT (6 cores / 12 threads); 32 GB RAM; Windows 11 build 26300; rustc 1.100.0; DXC 1.9.2609.5. - `cargo test --workspace -- --test-threads=4` on `8b15bae`: 1431 passed, 0 failed, 47 ignored; 25 `SKIPPED` checks: 21 "no wave64", 3 f16 per-lane forms refused (#1426), 1 "no heap windows" - `cargo test -p xcl --lib parked`, 30 runs with `XCL_DXC_THREADS` 1, 2 and 3: 0 failures. - Retail title of #505 (1.0.2.1), cold, release build (A/B measured on `3693d9e`, before the queue change in review): - Setup: - a fresh empty `XCL_DXIL_CACHE` - the NVIDIA / D3D12 implicit shader caches off (a local experiment-only `ShaderCacheControl` call, the same in both trees, not in this PR) - `XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_PSO_TRACE=1` - 780 s runs, the game started by hand - Results, one run each, the 10 min after the world load, from `xcl.log`: | | `main` `08db802` | this PR | |---|---|---| | driver pipeline builds | 372 | **398** (+7 %) | | … compute | 257 | **283** (+10 %) | | … graphics | 115 | 115 | | peak commit | 31.0 GB | 31.2 GB | | presents | 0 | 0 | | exit / device removal / crash | 0 / none / none | 0 / none / none | - Frames do not come back within 10 min in either run. Most of what is left on the title's threads is graphics pipelines built at a draw's first bind, which #1798 addresses. With #1798 on top of this PR, the title's threads spent 66 s in builds instead of 319 s ([test report on #1798](https://git.gtahub.st/github/xcl-dev--xcl/pulls/1798)). **Regression run** `main`: ``` xcl-smoke v1 commit: 08db8020d323bf478964fcc586152cce54959cfc gpu: NVIDIA GeForce RTX 2070 SUPER title: 3c290c16 seconds: 120 exit: 0x0 frames shown: 3249 (PresentX 3249) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 17249 MB ``` This PR: ``` xcl-smoke v1 commit: 8b15baee713b9403d2fd64b1d6af04c02e1822b9 gpu: NVIDIA GeForce RTX 2070 SUPER title: 3c290c16 seconds: 120 exit: 0x0 frames shown: 3242 (PresentX 3243) presents per 2 s (last 3): 61 60 58 device removals: 0 crashes: 0 peak commit: 17338 MB ``` **Not tested** - The smoke title does not reach a big compile: no helper was started in its 120 s, so the smoke run covers only the code paths that are unchanged. - The retail A/B was not rerun after the queue change in review (`3693d9e` → `8b15bae`). - One cold run per tree; warm caches or after an offline precompile; AMD; wave64 GPUs. - `main` has moved by 4 commits since `08db802` (#2371). The PR merges into it without conflicts, but it was not rebased or rerun on it. **AI use** - Claude Code with Claude Opus 5.5: - found the stall in a Tracy trace - wrote the change, the tests and this description - ran the suite, the smoke runs and the A/B runs - I started the game in each A/B run. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_015csBcd63KUE2T1kW2P15nC
A huge driver compile on an xcl-pso worker waits in big_compile_turn for
one of the few slots (one at a time by default, 3 GB of free commit each)
and keeps its worker thread while it waits. When the retail title of #505
starts its world, every worker takes one of its huge compute programs and
waits there with one or two of them compiling, so the rest of the queue
has no worker. A worker of the queue that has to wait now gets a helper
thread in its place (up to as many as the pool has), and the helper
leaves once the worker is back. The slots and the commit check are
unchanged, so no more driver compiles run at once than before.

Measured on an RTX 2070 SUPER from cold caches (empty XCL_DXIL_CACHE,
NVIDIA / D3D12 implicit caches off), one run each, 10 min after the world
load: 398 pipelines built instead of 372 (+7 %), 283 compute instead of
257 (+10 %); peak commit 31.2 GB instead of 31.0 GB.

Test: workers_parked_for_big_compiles_leave_the_queue_to_helpers fails
without the change (the job queued behind the parked workers never runs).

Part of #1269, #2088.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015csBcd63KUE2T1kW2P15nC
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:35:13 +00:00
Author
Owner

@⁠GodlyBDS on GitHub · 2026-11-26 03:25 UTC · original

Independent Ampere trace relevant to the worker-gate change. RTX 3090 Ti, driver 621.40, Windows 10, 32 GiB RAM. This was e877812e from #2624 with the local Windows startup compatibility fixes, four named PSO workers, XCL_HUGE_PSO_CONCURRENCY=1, and on-demand compilation. I have not applied #2628 to this run.

For 31 gated compute compiles completing from 225 to 380 s, the median recorded gate wait was 10.441 s and the median time in the driver was 4.941 s. The longest recorded gate wait was 47.588 s, followed by 5.006 s of native compilation. Correlating the driver starts with their measured gate durations shows three of the four PSO workers waiting at the gate concurrently. The 435.403 s summed across workers is overlapping time, not wall time.

The title stopped presenting for this interval while compiles continued to finish. The trace establishes substantial worker occupancy at the gate on Ampere under the conservative compile limit. It does not establish how much of the Present gap a helper would remove. The experiment was left running while the queue progressed.

AI use: OpenAI Codex (GPT-6) correlated the log events and drafted this report.

**@⁠GodlyBDS** on GitHub · 2026-11-26 03:25 UTC · [original](https://github.com/xcl-dev/xcl/pull/2628#issuecomment-7181713792) Independent Ampere trace relevant to the worker-gate change. RTX 3090 Ti, driver 621.40, Windows 10, 32 GiB RAM. This was `e877812e` from #2624 with the local Windows startup compatibility fixes, four named PSO workers, `XCL_HUGE_PSO_CONCURRENCY=1`, and on-demand compilation. **I have not applied #2628 to this run.** For 31 gated compute compiles completing from 225 to 380 s, the median recorded gate wait was **10.441 s** and the median time in the driver was **4.941 s**. The longest recorded gate wait was **47.588 s**, followed by **5.006 s** of native compilation. Correlating the driver starts with their measured gate durations shows **three of the four** PSO workers waiting at the gate concurrently. The 435.403 s summed across workers is overlapping time, not wall time. The title stopped presenting for this interval while compiles continued to finish. The trace establishes substantial worker occupancy at the gate on Ampere under the conservative compile limit. It does not establish how much of the Present gap a helper would remove. The experiment was left running while the queue progressed. AI use: OpenAI Codex (GPT-6) correlated the log events and drafted this report.
Author
Owner

@⁠pickles976 on GitHub · 2026-11-26 03:26 UTC · original

Wine 11.0, XCL_DXC_THREADS=2, exact head 3693d9efe41c7f69b4f4d9a04b98c66ab6a94b7d, Windows-target cargo test --locked --target x86_64-pc-windows-msvc -p xcl --lib parked -- --nocapture --test-threads=1: 3 pass, 1 fail. workers_parked_for_big_compiles_leave_the_queue_to_helpers starts two helpers and executes the queued job, but pso_async.rs:1175 observes PARKED=2 immediately after releasing the workers, before they finish, and asserts PARKED==0. The test waits only while HELPERS > PARKED (:1172), which is false when both equal 2. This is a test synchronization race, not evidence that the queue helper failed.

Test-only diagnostic: replace the wait condition with (PARKED.load(Acquire) != 0 || HELPERS.load(Acquire) != 0) under the existing 10 s deadline, then assert both zero. The focused test passed 1/1 in 0.26 s after this change; the temporary edit was restored. Please make that bounded wait in the PR test so a slower scheduler is not a false negative. Local logs: .compat-xcl/logs/verify-pr2628-wine-two-worker-helper{,-wait-fix}.log (not attached). No actual large driver compile or retail title was exercised; your reported ~1.1 GB higher smoke peak commit makes this unsuitable as a 16 GiB RAM reduction without a guarded A/B.

**@⁠pickles976** on GitHub · 2026-11-26 03:26 UTC · [original](https://github.com/xcl-dev/xcl/pull/2628#issuecomment-7181723939) Wine 11.0, `XCL_DXC_THREADS=2`, exact head `3693d9efe41c7f69b4f4d9a04b98c66ab6a94b7d`, Windows-target `cargo test --locked --target x86_64-pc-windows-msvc -p xcl --lib parked -- --nocapture --test-threads=1`: **3 pass, 1 fail**. `workers_parked_for_big_compiles_leave_the_queue_to_helpers` starts two helpers and executes the queued job, but `pso_async.rs:1175` observes `PARKED=2` immediately after releasing the workers, before they finish, and asserts `PARKED==0`. The test waits only while `HELPERS > PARKED` (`:1172`), which is false when both equal 2. This is a test synchronization race, not evidence that the queue helper failed. Test-only diagnostic: replace the wait condition with `(PARKED.load(Acquire) != 0 || HELPERS.load(Acquire) != 0)` under the existing 10 s deadline, then assert both zero. The focused test passed **1/1 in 0.26 s** after this change; the temporary edit was restored. Please make that bounded wait in the PR test so a slower scheduler is not a false negative. Local logs: `.compat-xcl/logs/verify-pr2628-wine-two-worker-helper{,-wait-fix}.log` (not attached). No actual large driver compile or retail title was exercised; your reported ~1.1 GB higher smoke peak commit makes this unsuitable as a 16 GiB RAM reduction without a guarded A/B.
Author
Owner

@⁠KDenKC on GitHub · 2026-11-26 06:06 UTC · original

Source review of head 3693d9ef, no run. One small thing about helper retirement in serve (pso_async.rs):

A base worker waits with rx.lock().unwrap().recv(), so an idle one keeps the INBOX mutex for as long as the queue is empty. A helper that wants to time out and reach retire_helper() first needs that mutex for its recv_timeout(250 ms). While a worker that came back from its turn is idle in recv(), the helpers block on lock() instead, and they only retire once new work wakes that worker. Building is unaffected; the helpers' threads (64 MiB stack reservations) just linger through idle periods. Taking work with try_recv / recv_timeout on the base workers too, or a Condvar queue instead of Mutex<Receiver>, would let them leave on time.

Not tested: no build or run of this head on our side.

AI use: Gemini (Antigravity) flagged it in a first-pass review; Claude Code (Claude Opus 5.5) checked it against the source at 3693d9ef and wrote this.

**@⁠KDenKC** on GitHub · 2026-11-26 06:06 UTC · [original](https://github.com/xcl-dev/xcl/pull/2628#issuecomment-7184104546) Source review of head `3693d9ef`, no run. One small thing about helper retirement in `serve` (`pso_async.rs`): A base worker waits with `rx.lock().unwrap().recv()`, so an idle one keeps the `INBOX` mutex for as long as the queue is empty. A helper that wants to time out and reach `retire_helper()` first needs that mutex for its `recv_timeout(250 ms)`. While a worker that came back from its turn is idle in `recv()`, the helpers block on `lock()` instead, and they only retire once new work wakes that worker. Building is unaffected; the helpers' threads (64 MiB stack reservations) just linger through idle periods. Taking work with `try_recv` / `recv_timeout` on the base workers too, or a `Condvar` queue instead of `Mutex<Receiver>`, would let them leave on time. Not tested: no build or run of this head on our side. AI use: Gemini (Antigravity) flagged it in a first-pass review; Claude Code (Claude Opus 5.5) checked it against the source at `3693d9ef` and wrote this.
Author
Owner

@⁠luckyteagirl on GitHub · 2026-11-26 05:52 UTC · original · reviewed

Could helper retirement and park admission use one synchronized state? A retiring helper can read HELPERS=1 and PARKED=0, then pause before its CAS. The worker can park again, increment PARKED to 1, see HELPERS=1, and start no replacement. The helper's CAS from 1 to 0 then succeeds and it exits. With XCL_DXC_THREADS=1, the final state is one parked worker and no helper, so a queued small build is unserved until the big-compile wait ends. This is a sequentially consistent interleaving; stronger atomic ordering alone would not close it. A controlled retirement/new-park overlap should assert a helper remains available for a later job. Exact-head source review at 3693d9efe41c7f69b4f4d9a04b98c66ab6a94b7d; no live stall reproduction. AI-assisted review with Codex.

**@⁠luckyteagirl** on GitHub · 2026-11-26 05:52 UTC · [original](https://github.com/xcl-dev/xcl/pull/2628#pullrequestreview-6069174443) · **reviewed** Could helper retirement and park admission use one synchronized state? A retiring helper can read `HELPERS=1` and `PARKED=0`, then pause before its CAS. The worker can park again, increment `PARKED` to 1, see `HELPERS=1`, and start no replacement. The helper's CAS from 1 to 0 then succeeds and it exits. With `XCL_DXC_THREADS=1`, the final state is one parked worker and no helper, so a queued small build is unserved until the big-compile wait ends. This is a sequentially consistent interleaving; stronger atomic ordering alone would not close it. A controlled retirement/new-park overlap should assert a helper remains available for a later job. Exact-head source review at `3693d9efe41c7f69b4f4d9a04b98c66ab6a94b7d`; no live stall reproduction. AI-assisted review with Codex.
github-bot force-pushed github-bot/gh-2628 from 3693d9efe4 to 8b15baee71 2026-11-26 12:14:37 +00:00 Compare
Author
Owner

@⁠KOLESNiii on GitHub · 2026-11-26 12:09 UTC · original

@⁠GodlyBDS Thanks for the Ampere trace. Three of four workers waiting at the gate at the same time, with a median gate wait of 10.4 s against 4.9 s in the driver, is the case this PR is for. As you say, it doesn't show how much of the Present gap a helper would close; on Turing most of what is left is the graphics pipelines built at first bind (#1798).

AI use: Claude Code (Claude Opus 5.5) drafted this reply.

**@⁠KOLESNiii** on GitHub · 2026-11-26 12:09 UTC · [original](https://github.com/xcl-dev/xcl/pull/2628#issuecomment-7191644397) @⁠GodlyBDS Thanks for the Ampere trace. Three of four workers waiting at the gate at the same time, with a median gate wait of 10.4 s against 4.9 s in the driver, is the case this PR is for. As you say, it doesn't show how much of the Present gap a helper would close; on Turing most of what is left is the graphics pipelines built at first bind (#1798). AI use: Claude Code (Claude Opus 5.5) drafted this reply.
Author
Owner

@⁠KOLESNiii on GitHub · 2026-11-26 12:09 UTC · original

@⁠pickles976 Thanks, confirmed and fixed in 8b15bae. The test now waits until both counts are 0 (same 10 s limit) and then checks both. I also ran cargo test -p xcl --lib parked 30 times with XCL_DXC_THREADS 1, 2 and 3: 0 failures (RTX 2070 SUPER, Windows 11 26300). About peak commit: the smoke run on the new head peaked at 17338 MB, against 17249 MB on main (one run each). The smoke title doesn't reach a big compile, though, so this says nothing about commit while helpers are running.

AI use: Claude Code (Claude Opus 5.5) wrote the fix and this reply.

**@⁠KOLESNiii** on GitHub · 2026-11-26 12:09 UTC · [original](https://github.com/xcl-dev/xcl/pull/2628#issuecomment-7191644857) @⁠pickles976 Thanks, confirmed and fixed in `8b15bae`. The test now waits until both counts are 0 (same 10 s limit) and then checks both. I also ran `cargo test -p xcl --lib parked` 30 times with `XCL_DXC_THREADS` 1, 2 and 3: 0 failures (RTX 2070 SUPER, Windows 11 26300). About peak commit: the smoke run on the new head peaked at 17338 MB, against 17249 MB on `main` (one run each). The smoke title doesn't reach a big compile, though, so this says nothing about commit while helpers are running. AI use: Claude Code (Claude Opus 5.5) wrote the fix and this reply.
Author
Owner

@⁠KOLESNiii on GitHub · 2026-11-26 12:09 UTC · original

@⁠KDenKC Right, an idle base worker in recv() kept the lock, so the helpers couldn't get to their timeout. Fixed in 8b15bae: the queue is now one Mutex + Condvar instead of Mutex<Receiver>, so nobody holds the lock while waiting, and a worker that comes back from its turn wakes the idle helpers, which then leave. The test now also checks that the helpers leave with no new work queued.

AI use: Claude Code (Claude Opus 5.5) wrote the fix and this reply.

**@⁠KOLESNiii** on GitHub · 2026-11-26 12:09 UTC · [original](https://github.com/xcl-dev/xcl/pull/2628#issuecomment-7191645445) @⁠KDenKC Right, an idle base worker in `recv()` kept the lock, so the helpers couldn't get to their timeout. Fixed in `8b15bae`: the queue is now one `Mutex` + `Condvar` instead of `Mutex<Receiver>`, so nobody holds the lock while waiting, and a worker that comes back from its turn wakes the idle helpers, which then leave. The test now also checks that the helpers leave with no new work queued. AI use: Claude Code (Claude Opus 5.5) wrote the fix and this reply.
Author
Owner

@⁠KOLESNiii on GitHub · 2026-11-26 12:09 UTC · original

@⁠luckyteagirl Agreed, that interleaving was real. Fixed in 8b15bae: the work, the parked count and the helper count are now under the queue's one lock, so a helper deciding to leave and a worker parking can't overlap. The interleaving can't be forced in a test now that both steps are under the same lock. Instead, the test parks every worker twice, and the second time checks that helpers are started again and that a job queued behind the parked workers still runs.

AI use: Claude Code (Claude Opus 5.5) wrote the fix and this reply.

**@⁠KOLESNiii** on GitHub · 2026-11-26 12:09 UTC · [original](https://github.com/xcl-dev/xcl/pull/2628#issuecomment-7191646067) @⁠luckyteagirl Agreed, that interleaving was real. Fixed in `8b15bae`: the work, the parked count and the helper count are now under the queue's one lock, so a helper deciding to leave and a worker parking can't overlap. The interleaving can't be forced in a test now that both steps are under the same lock. Instead, the test parks every worker twice, and the second time checks that helpers are started again and that a job queued behind the parked workers still runs. AI use: Claude Code (Claude Opus 5.5) wrote the fix and this reply.
Author
Owner

@⁠thehollowedone on GitHub · 2026-11-26 13:55 UTC · original

Independent Windows/NVIDIA check of PR head 8b15bae against main b49be18. Windows 11 build 26300, RTX 3080 Ti (621.35), Ryzen 7 9800X3D, rustc 1.99.1 MSVC.

  • cargo build --offline --locked --workspace: passed.
  • cargo test --offline --locked -p xcl --lib parked -- --test-threads=1: 4 passed, 0 failed, 0 ignored with XCL_DXC_THREADS=1. I then repeated that command in 30 fresh processes, 10 each with XCL_DXC_THREADS=1, 2, and 3: all 30 passed. The filter includes the two PSO helper tests and two sparse tests.
  • cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4: 1,431 passed, 0 failed, 47 ignored across 37 test targets. The passed count includes 25 explicit GPU skip notices: 21 no wave64, 3 refused per-lane cases, 1 no heap windows.

The focused test exercised queue handoff and helper retirement under synthetic waits. I did not measure a cold title run, NVIDIA driver compilation time, peak commit with helpers active, or AMD/wave64 behavior. The PR's title A/B predates this queue revision, and its smoke title did not start a helper, so the runtime benefit still needs an exact-head run that reaches the big-compile wait.

AI use: Codex (GPT-6.2 Sol) checked the changed queue and gate paths, ran the tests, and drafted this report.

**@⁠thehollowedone** on GitHub · 2026-11-26 13:55 UTC · [original](https://github.com/xcl-dev/xcl/pull/2628#issuecomment-7194037156) Independent Windows/NVIDIA check of [PR head `8b15bae`](https://github.com/xcl-dev/xcl/commit/8b15baee713b9403d2fd64b1d6af04c02e1822b9) against [`main` `b49be18`](https://github.com/xcl-dev/xcl/commit/b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7). Windows 11 build 26300, RTX 3080 Ti (621.35), Ryzen 7 9800X3D, rustc 1.99.1 MSVC. - `cargo build --offline --locked --workspace`: passed. - `cargo test --offline --locked -p xcl --lib parked -- --test-threads=1`: 4 passed, 0 failed, 0 ignored with `XCL_DXC_THREADS=1`. I then repeated that command in 30 fresh processes, 10 each with `XCL_DXC_THREADS=1`, `2`, and `3`: all 30 passed. The filter includes the two PSO helper tests and two sparse tests. - `cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4`: 1,431 passed, 0 failed, 47 ignored across 37 test targets. The passed count includes 25 explicit GPU skip notices: 21 no wave64, 3 refused per-lane cases, 1 no heap windows. The focused test exercised queue handoff and helper retirement under synthetic waits. I did not measure a cold title run, NVIDIA driver compilation time, peak commit with helpers active, or AMD/wave64 behavior. The PR's title A/B predates this queue revision, and its smoke title did not start a helper, so the runtime benefit still needs an exact-head run that reaches the big-compile wait. AI use: Codex (GPT-6.2 Sol) checked the changed queue and gate paths, ran the tests, and drafted this report.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2628/head:github-bot/gh-2628'
git switch 'github-bot/gh-2628'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2628'
git switch 'github-bot/gh-2628'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2628'
git switch 'github-bot/gh-2628'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2628'
git switch 'main'
git merge --squash 'github-bot/gh-2628'
git switch 'main'
git merge --ff-only 'github-bot/gh-2628'
git switch 'main'
git merge 'github-bot/gh-2628'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.