Shaders: offline pipeline builds use the runtime workers' 64 MB stack #2060
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2070"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by thisguyStan on 2026-11-25T02:48:04Z.
xcl shaders --measure-psobuilds its pipeline on the main thread (1 MB stack inxcl.exe's PE header), and--precompile --pipelineson scoped threads with Rust's 2 MB default. The driver compiles on the calling thread, so a measurement of what a build costs can end on a stack limit of XCL's own thread. On RADV under Wine,--measure-psoof the flat compact form of the largest compute programs ended withthread 'main' has overflowed its stack, and those runs were used to compare forms in #1269 (#2018 / #2025 threshold). This runs the offline build paths on the stack of the runtime's pipeline workers (64 MB), so they build as the workers do.xcl run's launch preparation (#2555, and the history preparation that came with thenvidia-devmerge) builds through the same code, so its threads get the same stack. @ClosetPie107 found the--pipelinesside in #1269 (comment, "Stack size of the offline tool"); this follows it. Part of #1269.What is in it
crates/xcl/src/hle/d3d12x/pso_async.rs: the workers' stack asWORKER_STACK(same 64 MB, no change at run time), used byxcl-pso-{k},xcl-pso-h{k},xcl-pso-pre-{k}andxcl-pso-ahead-{k}.crates/xcl/src/shaders.rs:worker_threadmakes a named thread withWORKER_STACK;on_worker_stackruns one closure on one,on_worker_threadsrunsnof them. On them now:--measure-pso(xcl-measure-pso) and a compute milestone,--pso-manifest FILE --through-present N(xcl-milestone), which built on the main thread;--precompilethreads, which also make the--pipelinesbuilds (xcl-precompile-{k}), the threads for a split program's dispatch-chain pieces (xcl-pipeline-piece-{k}, both inmake_chain_piecesand inmake_chain_pieces_required, which builds the pieces a preparation requires), and the threads that build the pipelines collected until translation is done (run_pipeline_jobs,xcl-pipeline-{k});--graphics-records(xcl-graphics-pipeline-{k}).crates/xcl/src/shaders/pso_corpus.rs: the compute builders of a staged corpus (xcl-corpus-pipeline-{k}).crates/xcl/src/hle/d3d12x/present/preparation.rs: the launch preparation thread (xcl-prepare). The history preparation (XCL_PREPARE_HISTORY_PRESENT) builds compute and graphics pipelines on it, and it was a 2 MB default thread.thread '<unknown>'. Five unit tests: the thread's stack reserve is at leastWORKER_STACK;precompileitself runs, and each of its threads has that stack and its name (a test-only probe in its loop; it fails when that call site is put back on a default thread); every buildrun_pipeline_jobsmakes runs on that stack;on_worker_threads, which the graphics and corpus builders use, names its threads and gives them the stack; a panic on the thread reaches the caller. The graphics, corpus, required-piece,xcl-prepareandxcl-milestonecall sites need a device or a title and have no test of their own; they use the tested helpers.Not changed, and worth knowing for the RADV result
Only some runtime builds run on 64 MB stacks: pipelines an earlier run used (prebuilt at low priority), builds after an
XCL_PSO_WAIT_MSbudget ran out, and with this PR the launch preparation. By default (XCL_LAZY_PSOon, noXCL_PSO_WAIT_MS) a compute pipeline is built at its first bind on the title's own thread (pso_async::resolve_wait_for), and XCL does not change the stack size of title threads. The title tested here defaults to 1 MB in its PE header, which answers the open question at the end of that comment. So the RADV overflow above may also happen in a title run under Wine, on a title thread. A bigger stack is not a cure-all either: a PSO worker overflowed its 64 MB on an unbounded recursion in dxil-spirv (comment). This PR does not change that; moving those builds off title threads is runtime work (#2001 goes in that direction).Tested
cargo test --workspace --no-fail-fast -- --test-threads=4on this PR's head86e96d0(onmain1bd9cee): 2753 passed, 0 failed, 49 ignored. Windows Developer Mode on, soshaders::tests::pso_measurement_compiles_an_exact_synthetic_recordruns and passes.SKIPPED(30): 22 "no wave64", 3 per-lane form refusals (V_CVT_F16_F32,V_PK_MUL_F16,V_MUL_F16), 2 "no d3d12SDKLayers.dll", 2 "no heap windows", 1 "no D3D12 debug layer".xcl shaders <pack> --precompile --only cs(XCL_NETWORK=0, an emptyXCL_DXIL_CACHE), release, onmain3f4495a: all 26 503 shaders, compiled 2 689 compute programs, 0 errors, exit 0, 4 455 s. An earlier pass of the same kind on an older base had stopped with exit 1 and no message at about 23 000.xcl shaders <pack> --measure-pso <record> --repeat 3(one 1.1 MB HLSL-path compute program), release,mainagainst this change on3da2abb: identical DXIL (1 121 012 B); driver median 139.1 s against 141.1 s, within run-to-run spread. Again on5ce558f: identical DXIL; 136.0 s (main) against 132.9 s.--precompile --only cs --pipelines --used-only(482 used pipelines,XCL_PIPELINE_MAX_KB=512, an empty cache per run), release,main5ce558fagainst this change: both compiled 322, made 318 pipelines, refused 0, capped 4; 306 s against 275 s.xcl.exe's PE header reserves 1 MB for the main thread (SizeOfStackReserve), which is where--measure-psobuilt before.Regression run
mainb38197a:86e96d0:main's frames, 93 % of its peak commit, no device removal, no crash.main's run is onb38197ae, which adds only #3460'sscripts/smoke.ps1change andREADME.mdto this PR's base1bd9cee. Both runs withoutXCL_PIPELINE_MAX_KB(no cap), on the JIT path: each commit's ownscripts/smoke.ps1setsXCL_PREPARE=0. On this PR's commit the script's other overrides do not reach XCL (fixed since by #3460), soXCL_RUN_SECONDS=60,XCL_NETWORK=0andXCL_ACTIVITY=1were set in the environment that called it; onb38197aethe script sets the same values itself. Each started from its own fresh copy of the same warm shader cache; each took about 80 s.Not tested
xcl run's launch preparation in the smoke runs:scripts/smoke.ps1now runs withXCL_PREPARE=0, so the runs above did not build onxcl-prepareor the precompile workers. The last pair with preparation (main0fe06ebagainst this change as80e866b, the same code before the last rebase) showed 1133 against 1561 frames and 15 707 against 16 913 MB peak commit, no device removal, no crash.XCL_PREPARE_HISTORY_PRESENT) and the compute milestone (--pso-manifest … --through-present).--precompile --only cs --pipelinesoverflowed its pipeline threads onmainand on this PR alike (@JoaoPauluu's run): one of dxil-spirv's endless recursions, which all started inflatten_subgroup_shuffles()before structurizing; dxil-spirv runs that pass after the structurizer since HansKristian-Work/dxil-spirv@694cc674, carried by vkd3d-protonmastersince HansKristian-Work/vkd3d-proton@89439562. On the direct path, @Royalflamejlh's run found that this PR fixes a 2 MB overflow hang under vkd3d-proton (comment).AI use
🤖 Generated with Claude Code
Imported from ivall/xcl. Originally posted by Parakeet-Wheat on 2026-11-25T03:42:30Z.
merge-check
base:
f97120dc19head:
86e96d09famerge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2846 passed, 0 failed, 51 ignored; SKIPPED: 26 (22 no wave64, 2 no heap windows, 1 driver cache needs Developer Mode, 1 no GPU_UPLOAD heaps); failing: none
review: No blocking finding; whole diff read. All five
worker_stack_testspass on the merge. We put one call site at a time back on a default-stack thread, with its name kept, and ran these tests. With theprecompilethreads changed,precompile_threads_are_named_and_get_the_workers_stackfails. With therun_pipeline_jobsthreads changed,deferred_pipeline_jobs_build_on_the_workers_stackfails. With thexcl-preparethread changed, all five tests pass, so no test covers that call site.xcl-preparerunsprepare_for_launchbefore the guest starts (preparation.rs), so this PR also changes thexcl runpath. The graphics, corpus and piece builders have no call-site test; the tests cover the helpers they call.performance: Boot-only smoke pair, 60 s, no input, release,
XCL_NETWORK=0: base 1532 frames, peak commit 16597 MB; merge 1624 frames, peak commit 14981 MB. Both runs show 0 device removals and 0 crashes. Default path: the runtime pipeline workers keep their 64 MB stack, and the launch preparation thread now gets 64 MB too.verdict: safe to merge (the tests catch two of the changed call sites, and the suite and smoke pair show no regression on our RTX 3070)
hardware / tool and model: RTX 3070 8 GB (610.88), AMD Ryzen 5 5600X, Windows 11 Home 26300, Rust 1.95.0, debug (smoke in release) / Claude Code, Claude Opus 5.5 (merge, build, suite, hand mutations, smoke and review)
upstream-sync referenced this pull request2026-11-25 04:08:41 +00:00
Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-25T03:28:09Z.
Full-suite run, since this PR has no test report yet. Tested exact head
0fd51f9(on its base5ce558f).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 1136 passed, 0 failed, 44 ignored. SKIPPED (no wave64):a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu,a_per_lane_2d_or_3d_group_runs_on_the_gpu,coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu,cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu,gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware,the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.offline_builds_run_on_the_runtime_workers_stack,a_panic_on_the_worker_reaches_the_caller.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 1147 passed, 0 failed, 46 ignored. SKIPPED:f16_programs_on_the_gpu(f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),f32_programs_on_the_gpu(f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),f32_programs_on_the_gpu(f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).--skipleaves out tests that fail on maincbc296atoo, not because of this PR. On NVIDIA:heap_window_out_of_memory_falls_back_to_the_switch_form(#1651), the fourgpu::recomp::lower_dxil::tests::*_programs_on_the_gputestsconst_and_null_mask_operands_agree_with_hlsl_on_the_gpuandmask_ff0_and_flbit_agree_with_hlsl_on_the_gpu(follow-up on #1651) fail becauserunner::skip_testturns their skips into failures underXCL_REQUIRE_GPU=mesh, andgpu::dxil::fuzz_testsseeds 70, 545, 1019 and 1507 failCreateComputePipelineStatewithE_OUTOFMEMORYon this card (drivers 616.64 and 621.40). On AMD:fuzz_validate_and_gpu_1fails on seed 540 (res[833]0x7 vs CPU 0x6). The AMD run does not setXCL_REQUIRE_GPU.Not tested
AI use
Imported from ivall/xcl. Originally posted by JoaoPauluu on 2026-11-25T04:37:59Z.
A run of the
--pipelinesside under Wine on Linux with vkd3d-proton as the host D3D12. Here the 64 MB stacks do not change the outcome: on bothmainand this PR, all four pipeline threads overflow within about two minutes and the run stalls.Tested
x86_64-pc-windows-gnu.0fd51f9as it is (based on5ce558f) andmaincbc296a, no uncommitted changes.xcl shaders <retail 1.0.2.1 shaders.rpf> --precompile --only cs --pipelines,XCL_PIPELINE_MAX_KB=0(no cap),VKD3D_SHADER_CACHE_PATH=0and__GL_SHADER_DISK_CACHE=0(no driver-side caches), 2400 s cap,mainfirst:main:pipelines: 75 made, 0 refused, then fourthread '<unknown>' has overflowed its stacklines. The log stopped changing about 1.5 min after start, and the cap killed the process (exit 124).pipelines: 75 made, 0 refused, fourhas overflowed its stacklines (the first between 50 and 75 made). The log stopped changing about 1.5 min after start, and the cap killed the process (exit 124).AppData\Local\xcl\dxilin the Wine prefix) was not cleared between the two runs, so the PR's run could reuse DXIL that themainrun had compiled. The pipeline builds were fresh in both.--measure-psocannot run here. On both commits it stops withcannot disable the driver cache (Windows Developer Mode is required): Not implemented. (0x80004001), since vkd3d-proton does not implement the shader cache control.XCL_DIRECT_DXILwas unset, so both runs used the HLSL → DXC path. #1805 found its overflow with direct DXIL on, in dxil-spirv'sflatten_subgroup_shuffles(). These overflows are on the default path. I have not checked whether they are the same recursion, so I cannot tell from here whether XCL's 1 MB / 2 MB limits play a part.Not tested
AI use
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T05:09:52Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
upstream-sync referenced this pull request2026-11-25 10:09:30 +00:00
upstream-sync referenced this pull request2026-11-25 16:10:51 +00:00
Imported from ivall/xcl. Originally posted by thisguyStan on 2026-11-25T18:01:15Z.
Thank you @futurepro62, @Parakeet-Wheat, @DavidM1911 and @JoaoPauluu for testing across RTX 5070 Ti / an RDNA2 iGPU, RTX 3070, RTX 3060 Ti, and RTX 3060 under Wine with vkd3d-proton!
Rebased onto
origin/main(5ce558f→50a9fde). The one conflict was main's new worker queue inpso_async.rs(Workclosures);WORKER_STACKsits above it and both worker pools still use it. Since your runs:worker_thread, so the precompile threads are covered too (Parakeet-Wheat's note that the tests only reachedon_worker_stack). A new test checks a precompile thread's stack and name.xcl-precompile-{k}. They had no name, so an overflow like the one in JoaoPauluu's run printedthread '<unknown>', the same as a thread of the driver's.flatten_subgroup_shuffles(), which ran before the structurizer; dxil-spirv runs it after since HansKristian-Work/dxil-spirv@694cc674, and vkd3d-protonmastercarries that since HansKristian-Work/vkd3d-proton@89439562. Not rerun yet; it is under Not tested.4772a13: full workspace (1291 passed, 1 failed, 46 ignored; the failure also fails onmain50a9fde),xcl shaders --precompile --only cs(all 26 503 shaders, 2 689 compute programs compiled, 0 errors), and a paired 60 s smoke (1360 → 1457 frames, 0 device removals / crashes).AI use: Claude Code (Claude Opus 5.5) made the changes, ran the tests and wrote this comment.
Imported from ivall/xcl. Originally posted by bmjask on 2026-11-25T21:37:04Z.
Review: COMMENTED
No concrete source defect found. Shared 64 MiB worker stack is applied consistently and result/panic propagation is sound; tests cover reserve/name/unwind. Current official Windows CI is not visible, despite strong reported suite/smoke. The RADV/Wine recursion limitation is appropriately disclosed. A bounded deep-stack/large-build integration case would strengthen tests, but I found no blocker.
Imported from ivall/xcl. Originally posted by oni-swr on 2026-11-25T21:42:04Z.
AMD RDNA3 on native Windows: full suite of
8cb4346merged ontomain6d12f58Test report for head
8cb43460c48bf98beef7c1d679a6db37ef75ce39, which is a rebase onto an oldermainthan today's. I tested the PR head merged ontomain6d12f58a(a local merge commit, one auto-merged file, no conflicts; the diff againstmainis only this PR's two files) and compared it withmainitself.Tested
cargo test --workspace --no-fail-fast -j 4 -- --test-threads=4, both trees in the same target dir, one after the other; the log showsCompiling xclfrom the tested worktree.main6d12f58a: 1422 passed, 1 failed, 46 ignored.main: 1425 passed, 1 failed, 46 ignored. The 3 extra passes are this PR's new tests.shaders::worker_stack_tests::offline_builds_run_on_the_runtime_workers_stackshaders::worker_stack_tests::precompile_threads_are_named_and_get_the_workers_stackshaders::worker_stack_tests::a_panic_on_the_worker_reaches_the_callermainand on the PR:gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1(seed 722). It also fails alone onmain, so it is not caused by this PR.SKIPPED, identical on both trees:gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpuandf32_programs_on_the_gpu(f16 / f32 conversion cases refused as unsupported, 6 lines) andheap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).Not tested
scripts/smoke.ps1regression run on a retail title, so there is noxcl-smokeblock here.xcl shaders --pipelines/--precompilerun on a large pack, so the stack-overflow case this PR is about (reported under Wine / RADV) is not exercised on this card.AI use: this run and report were done by Claude Code (Claude Sonnet 5.5), driven by
oni-swr. The commands and counts are from the run above, not edited by hand.Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T07:13:58Z.
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-11-27T08:06:25Z.
On Linux + NVIDIA under Wine, without this PR an offline
--pipelinespass hung after one worker overflowed its 2 MB stack in vkd3d-proton's DXIL-to-SPIR-V conversion. With it, the same command, run next, built that program and finished in 1,580 s (1 pass each).Setup: RTX 4060 Ti 16 GB, NVIDIA 615.71.09, Wine 11.21 Staging, vkd3d-proton
v3.1-90-g30b0eb9b;mainb49be18+ the PRs of our #505 comment (7209179316) + #25513567b2ef, ± this PR8cb43460;XCL_DIRECT_DXIL=1 xcl shaders --precompile --only cs --pipelines --used-only. Both passes ran on XCL's cache from earlier passes of this tree. The one with it ran second and found blobs for 5,078 of its 5,079 pipelines, none for the one that overflowed, so that program was built from DXIL in both.make_one→d3d12_device_CreateComputePipelineState→dxil_spv_converter_run→ about 2,600 levels of a four-functiondxil_spv::CFGStructurizerrecursion. That thread was gone, with no overflow line in the output, and the main thread was parked inprecompile'sthread::scope.2a2ddc1bbf1c7260, unsplit, 312,688 B of DXIL; with this PR its blob was the one new file in XCL's cache. Built natively, this dxil-spirv (34f0ff8) converts it in 1.7 MB of stack; the MinGW-built DLL's Windows-x64 frames are larger, by an amount not measured.flatten_subgroup_shufflesframe.main83b00818#2555's launch pass builds on the same 2 MB workers (shaders.rs:1694), where this PR now conflicts.Not tested: Windows; this PR's tests; this PR on
main; #2555's launch pass on Linux; JoaoPauluu's case with a newer dxil-spirv.AI use: Claude Code (Claude Opus 5.5) ran the passes, read their output and stacks, and wrote this.
Posted without review by a person: the account owner was away and reads replies later.
Imported from ivall/xcl. Originally posted by Kalmarv on 2026-11-29T00:58:25Z.
merge-check
base:
fa204595a4head:
b6b6ad5d7cmerge: clean (trial merge 7ebbdcbf8436425f3b6c0162e1e47e4041304c8c, local, not pushed;
git diff --checkclean)build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 (XCL_DXC_DIR = DXC 1.9.2609) -> 2613 passed, 0 failed, 49 ignored; SKIPPED: 26 (21 no wave64 on this 32-lane GPU, 3 per-lane f16/f32 forms refused (#1426 semantics), 2 no heap windows); failing: none. All five
shaders::worker_stack_testsran and passed.review: none blocking; whole diff read (preparation.rs, pso_async.rs, shaders.rs, pso_corpus.rs).
WORKER_STACKis the same 64 MB the runtime workers already used, so their stacks don't change. Every offline build thread (--measure-pso, the milestone,--precompileand its--pipelinesbuilds, split-program pieces, deferredrun_pipeline_jobs,--graphics-records, the staged corpus) and thexcl-preparelaunch thread now come from oneworker_threadbuilder. The thread loops are moved as they were; only the spawn changed, plus a name and.expecton spawn failure wherescope.spawnused to panic anyway.on_worker_stackpasses a panic to the caller viaresume_unwind. Rust's std reserves rather than commits the requested stack on Windows (STACK_SIZE_PARAM_IS_A_RESERVATION), so N precompile threads cost N x 64 MB of address space and no commit up front. Nit: none of the tests can fail on the base, because the helpers are new; they pin the stack reserve and the names.performance: no frame-time cost expected; the change is only thread creation. Title run (release build of the merge, scratch/fast-world.py fast profile, minimal preparation, 30 s in world; same cache snapshot and harness as a main
fa204595run): mainfa204595exit 0, 0 crashes, 0 device removals, world entry 90.6 s, peak commit 28,620 MB, 70 WARN lines. This merge: exit 0, 0 crashes, 0 removals, world entry 96.4 s, peak commit 28,850 MB (+0.8 %), 67 WARN lines, no new WARN kinds,failed_pipelines0, no translation errors. The launch preparation thread ran the history preparation ("1 of 1 compute pipelines confirmed through present 1"). Both runs show 0 fps in the world because the cache doesn't match the translator identity, and this run shared the machine with a release build, so timing differences are noise. Thexcl shadersoffline paths (--measure-pso,--precompile --pipelines) weren't run here.verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 5070 Ti 16 GB (driver 610.74, wave32 only), AMD Ryzen 9 9950X, Windows 11 build 26200; rustc 1.99.0, debug test profile, release build for the title run, DXC 1.9.2609 via XCL_DXC_DIR. Claude Code, Claude Opus 5.5: merge, build, suite, title run and full-diff review; this report.
Imported from ivall/xcl. Originally posted by throny on 2026-11-29T07:50:36Z.
merge-check claim
head:
b6b6ad5d7cImported from ivall/xcl. Originally posted by throny on 2026-11-29T08:22:37Z.
merge-check
base:
d8bd9a38head:
b6b6ad5d7cmerge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4, three runs. Run 1 (on main
fa204595): 2611 passed, 2 failed (two tests of hle::d3d12x::pso_async::used_tests), 49 ignored. Run 2 (on maind8bd9a38): 2623 passed, 0 failed, 49 ignored. Run 3 (d8bd9a38): the lib test binary was ended by an abort in an old list_x test this PR does not touch. Because the PR changes pso_async.rs, I then ran that test group alone (181 tests) 25 times on this PR's merge and 25 times on maind8bd9a38: PR 22 clean, 1 failed assert, 2 aborts; main 17 clean, 1 failed assert (the same test), 7 aborts. So the group is unstable on main itself and this PR does not make it worse. (27 SKIPPED lines). Base alone atd8bd9a38: 2618 passed, 0 failed, 49 ignored.review: no finding. Plumbing only: one constant for the 64 MB stack and three helpers, and every offline build thread (precompile, pipeline jobs, pieces, the graphics worker, corpus, milestone, measure-pso, launch preparation) now starts through them. Panics still reach the caller and scoped threads are joined as before; on Windows the stack is reserved, not committed. Test note: the deferred-pipeline-jobs test exercises a changed call path; the precompile and graphics tests only exercise the helpers, so they would also pass if those two call sites were left unchanged.
performance: not measured.
verdict: safe to merge
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
Imported from ivall/xcl. Originally posted by thisguyStan on 2026-11-29T22:10:59Z.
Thanks @Kalmarv and @throny for the merge-checks. Changes since
b6b6ad5:precompile_threads_are_named_and_get_the_workers_stacknow runsprecompileitself (on a missing file: no device, no cache writes), and a test-only probe in its thread loop records each thread's stack reserve and name. With that call site put back on a defaultstd::thread::Builder, the test fails. The graphics and corpus call sites need a device, so their test is renamedworker_threads_are_named_and_get_the_workers_stackand says that it pins their helper.make_chain_pieces_required, new onmainwith the post-present pipeline history (8f075e85), built a split program's required pieces on default 2 MB scoped threads; it now usesworker_thread(xcl-pipeline-piece-{k}) likemake_chain_pieces.main1bd9cee; one conflict inpso_corpus.rs(prepare_compute's new argument).86e96d0:cargo test --workspace -- --test-threads=42753 passed, 0 failed, 49 ignored, 30 SKIPPED; the tests this PR touches take the same time as onmain(within ±3 %). The new smoke pair is in the description.AI use: Claude Code (Claude Opus 5.5) made these changes, ran the tests and wrote this comment.
Imported from ivall/xcl. Originally posted by johnbf8x on 2026-11-30T03:16:19Z.
merge-check claim
head:
86e96d09faImported from ivall/xcl. Originally posted by LocranKing on 2026-11-30T04:02:40Z.
merge-check claim
head:
86e96d09faImported from ivall/xcl. Originally posted by LocranKing on 2026-11-30T04:16:06Z.
merge-check
base:
f97120dc19head:
86e96d09famerge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2846 passed, 0 failed, 51 ignored (28 SKIPPED: 22 no wave64, 2 no d3d12SDKLayers.dll, 2 no heap windows, 1 no D3D12 debug layer, 1 Windows Developer Mode required to disable driver cache); failing: none
review: none. Read the whole diff across all 4 files (preparation.rs, pso_async.rs, shaders.rs, pso_corpus.rs) and checked the merge result against #3442 (
30122062). WORKER_STACK (64 MB) matches the existing runtime worker pools without changing runtime worker behavior, every offline/startup pipeline-building thread (xcl-measure-pso, xcl-milestone, xcl-prepare, xcl-precompile-{k}, xcl-pipeline-{k}, xcl-pipeline-piece-{k} in both make_chain_pieces and make_chain_pieces_required, xcl-graphics-pipeline-{k}, xcl-corpus-pipeline-{k}) uses the named 64 MB builder, scoped joins and panic propagation via resume_unwind are preserved, no duplicates in #1607 or open/merged PRs, and all 5 worker_stack_tests pass (including the live precompile thread probe).performance: reasoned: no frame-time or steady-state memory cost at runtime. pso_async runtime worker pools already used 64 MB stacks; the newly covered threads run only during CLI offline shader passes or pre-guest launch preparation before Present, and on Windows x64 std:🧵:Builder::stack_size reserves virtual address space (STACK_SIZE_PARAM_IS_A_RESERVATION) rather than committing 64 MB upfront, releasing any committed stack pages when each scoped worker exits.
verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 3060 Ti 8 GB (driver 621.40 / 32.0.16.2140, wave32), AMD Ryzen 5 5500, Windows 11 build 26300.9974, rustc 1.100.0 (debug), DXC 1.9.2602.17 via XCL_DXC_DIR; Antigravity (Gemini 4 Carbon (High)) ran the merge, build, test suite, duplicate search, and diff review.