Repository navigation
Conversation
|
NVIDIA run with the whole suite, since Not tested lists NVIDIA. Tested
Not tested
AI use
|
|
A run under Wine on Linux: the count changes the same way as in the description's AMD run. Tested
Regression run main (first run): this PR: The second Not tested
AI use
|
pvfreis
left a comment
There was a problem hiding this comment.
Review of 39d7617 (merge base 47efa2e; current main is 930e8b4), by reading the code; nothing was built or run here. On the head itself I found no path that leaves a queued build counted after it is built or released, and no underflow.
- CONFIRMED: merged into current
main,pso_async.rsdefinesBUILDINGtwice. The head addsstatic BUILDING: AtomicUsize(pso_async.rs:88). After this PR was opened,maingot 25c6f7e, which adds a module-levelthread_local! { static BUILDING: RefCell<Option<Arc<Pending>>> }to the same file (pso_async.rs:44-46onmain). The two merge without a textual conflict, but the merged file has both items (lines 51 and 159), used asBUILDING.with(..)and asBUILDING.fetch_add/fetch_sub/load. Two items with one name in a module is E0428, so the merged tree should not compile (by reading; not compiled here). Fix: rebase and give the counter its own name (e.g.QUEUED_BUILDS), then rerun the suite and the smoke block on the new head.
Questions for the author
- The test's last check drops the
PENDINGlock before reading the global counter; with--test-threads=4, could another test'ssubmitorreleasedin between make it fail? - The comment says a released in-flight pipeline "drops from the building count immediately", but the test only asserts
counts().2 < 64; would checking the count before and afterreleasedshow that?
Verdict: the counting looks right on its own; it needs a rebase and a rename before it can merge.
Review by Claude Code (written by Claude Opus 5.5, second read by Claude Fable 5.2); each point checked by a person before posting.
39d7617 to
47f672e
Compare
|
Thanks @pvfreis for catching the Rebased onto current
AI use: Antigravity (Gemini 4 Carbon) |
|
Thanks. Checked at Reply by Claude Code (Claude Opus 5.5); checked by a person before posting. |
47f672e to
ad5ff40
Compare
|
Verification on RTX 3060 Ti (Windows 11): merge conflict with current |
|
Test report for exact head Tested
main: PR: Not tested: AMD, the head merged onto current AI use: Claude Code (Claude Opus 5.5) ran this and wrote the report; the diff was read for safety by a Claude Opus 5.5 sub-agent before it was built. |
ad5ff40 to
532ee56
Compare
|
Rebased onto The conflict came from #972's On the RX 9070 XT: |
With XCL_LAZY_PSO=1 on by default, submit_lazy places every translated stand-in pipeline in PENDING while sending only pipelines from used-pipelines.txt (or ones bound later) to the workers. pso_async::counts walked PENDING under its mutex and counted every !done entry, keeping the window title stuck on ~57,500 "pipelines queued" (xcl-dev#894) and reporting dormant lazy stand-ins as still building in report.json. Track a monotonic IDLE -> QUEUED -> DONE state per Pending with an atomic QUEUED_BUILDS counter updated when a pipeline is queued (or built on the binding thread) and cleared on completion or release, making pso_async::counts() lock-free and O(1). Part of xcl-dev#894. Assisted-by: Antigravity (Google DeepMind, Gemini 4 Carbon)
532ee56 to
0840ff5
Compare
|
Main moved again a few minutes after the rebase (#1782 added its |
With
XCL_LAZY_PSO=1enabled by default,submit_lazyinserts every translated stand-in pipeline intoPENDINGwhile sending only pipelines whose shader keys are inused-pipelines.txt(or ones later bound) to the background workers.pso_async::counts()still walkedPENDINGunder its mutex and counted every!doneentry, which kept the window title stuck on"compiling shaders: 0 running, 0 done, 57587 pipelines queued"after all active compiles finished (#894) and recorded dormant stand-ins as still building inreport.json.Part of #894 (fixes the
pipelines queued/background_pipelinesaccounting and removes theO(N)PENDINGlock scan on every window-title update; the title's loading-screen progression on #894's host remains separate).What is in it
crates/xcl/src/hle/d3d12x/pso_async.rs: track a monotonicIDLE -> QUEUED -> DONEatomic state on eachPendingtogether with a globalQUEUED_BUILDScounter incremented once when a pipeline is queued toqueue(), queued topreload(), or built on the binding thread, and decremented once oncomplete(), channel-send error,preload()orphan skip, orreleased().pso_async::counts()is now lock-free andO(1).crates/xcl/src/hle/d3d12x/pso_async.rs(used_tests): addlazy_stand_ins_are_not_counted_as_still_building_until_queued(serialized across allused_testsviaCOUNT_TEST_LOCKand holding thePENDINGguard across the final zero check) covering dormantsubmit_lazyentries, release of unqueued stand-ins,resolve-triggered queueing and completion, and exact immediate-1decrement onreleased()of an in-flight pipeline without double-decrement on worker completion.Tested
32.0.32015.16001),rustc 1.100.0 (0ef1bc386 2026-11-09), debug and release.cargo test --workspace --no-fail-fast -- --test-threads=4on the head, rebased ontomain1a0bbe3(after kernelx: Sleep does not count PC calls that keep the title's threads #1782): 1249 passed, 2 failed –gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1andfuzz_validate_and_gpu_3, which fail the same way on a cleanmain426a5a7on this adapter; 46 ignored.cargo test -p xcl --lib hle::d3d12x::pso_async -- --test-threads=4, 5 consecutive runs: 11 passed, 0 failed on each run (including kernelx: Sleep does not count PC calls that keep the title's threads #1782's twoPcCallstests).lazy_stand_ins_are_not_counted_as_still_building_until_queuedfailed before the fix:counts().2reported 64 for 64 unqueued lazy stand-ins.d3d12.background_pipelinesinreport.jsonwent from[228, 0, 57595]onmainto[228, 0, 0]once the 228 preloaded pipelines were built.Regression run
main:PR head:
Not tested
XCL_SAMPLE_*sample-data tests.AI use
pso_async::counts()in Retail 1.0.2.1 on RTX 4070 SUPER 12 GB + Win10 (KB5029331): 30 fps loading screen, 57 587 async pipelines never compile #894, wrote the fix and unit test, and ran the test suite and smoke check. Antigravity (Claude Opus 5.5) – rebased it ontomain1a0bbe3(merged the newa_released_queued_pipeline_is_not_built_by_normal_workerstest next to this one and put it underCOUNT_TEST_LOCK, since it fills every worker the count test needs), and reran the suite and the smoke pair.