Repository navigation
Conversation
|
Ran the async-pipeline lifetime tests at Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build. Results
The new lifetime tests ( What this adds: the author ran these filters on an Ampere RTX 3060; this is a Blackwell wave32 part. No test report from another machine exists in the thread yet. Not tested: the whole AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used. |
8142aa1 to
75726f7
Compare
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
The lowered program is missing an expected group barrier (or emits one where none is expected). Needs a fix before merge. — Devin |
|
Independent AMD RDNA4 (native wave64) test report on exact head Tested
Regression run (60 s retail-title smoke, (Matched Not tested
AI use
|
75726f7 to
1029a82
Compare
bmjask
left a comment
There was a problem hiding this comment.
P1: pso_release can misclassify a normal 2->1 release as final and double-release a retained pending stand-in. With late release enabled, real.rs:1721-1734 treats f(this)==1 as final, removes async state, and queues a deferred raw Release. But this PR intentionally AddRefs a bound pending stand-in via Resolved/retained_psos, so title Release commonly changes title+list retention from 2 to 1. The branch then reports zero/forgets state and schedules release of the list-owned ref; when the list resets and drops its retained ID3D12PipelineState, it releases that same ref again. Please retain a separate deferred ref only after proving the caller released the actual last ref, and add a bind/retain -> title Release -> list reset regression.
1029a82 to
5333a9b
Compare
|
Thanks for catching this! Removed the |
|
Two points from reading the diff against
I checked AI use:
The points were checked by the account owner as well (edited to complete this AI use line). |
|
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
Thanks! — Devin |
luckyteagirl
left a comment
There was a problem hiding this comment.
At head 5333a9b91290a0163e2368bc27e89907c5e4207a, the mid-list split now calls resolve_cached_for_bind(bound_pso, &bound_resolved) (list_x.rs:2855). For a still-tracked compute PSO, that calls resolve_for_bind_retained, which waits for the build (or runs an unclaimed job on the recording thread); the default XCL_PSO_WAIT_MS budget is unbounded. A normal SetPipelineState records the pending PSO in both bind and list_x, and bind::dispatch calls defer specifically so the build is waited for at submit. The split therefore blocks inside Dispatch before defer can return, losing the record-now/wait-at-submit behavior. Could the split use a retained nonwaiting lookup for the continuation's initial PSO, and extend a_dispatch_with_a_pipeline_still_building_waits_at_the_submit through the normal SetPipelineState path? That test currently initializes list_x::bound_pso to zero, so it misses this branch.
This is a source-derived timing review of the exact head; I did not run a native timing reproduction. AI use: OpenAI Codex (GPT-6.2 Sol) reviewed the source and drafted this point; I checked the call chain and existing test before posting.
5333a9b to
1a51cb9
Compare
|
@luckyteagirl Good catch, thanks! Changed |
|
Nothing has happened on this PR for 3 days, so it is marked |
|
No open PR makes the same change. #2422 also changes AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
Upstream generation pins and `late_release::hold_pipeline` now retain completed async builds across recording/submission and defer released backing/two-pass pipelines until GPU queues pass their fences. Close the remaining lifetime gaps on top of them: - Pin one-shot async builds unconditionally in `resolve_and_pin_if_enabled*` (not only when recipe rebuilds are enabled), align wait budgets with `resolve_wait_budgets`, and commit `PreparedNativePipeline` in `cl_reset` so stale `PipelineResolution` pins are released on PC list resets. - Track COM references (`retained_fallbacks`) in `ListState` whenever `InitialFallback` binds an unbuilt stand-in (`select_native_choice`), propagating through `ExecuteBundle`, mid-list splits, and `KickoffX` and releasing through `late_release::hold_pipeline` or `pso_release`. - Route `set_depth_bias_x` and `prepare_draw` through `bind::resolve_bound_native_pipeline` instead of re-probing `PENDING` by raw stand-in address after release. - Guard final release in `real::pso_release` with `res_release`-style probing so `forget_ready_compute`, `forget_pso`, and `pso_async::released` always run before final driver `Release` (even with `XCL_LATE_RELEASE=0`), and defer final adopted-PSO release via `late_release::hold_adopted_pipeline` using `orig_fn`. - Add `late_release` and `real::async_pso_lifetime_tests` regression tests and extend `a_dispatch_with_a_pipeline_still_building_waits_at_the_submit` for real adopted stand-in binds across mid-list splits. Part of xcl-dev#916 Part of xcl-dev#1488 Assisted-by: Antigravity (Gemini 4 Hydrogen)
1a51cb9 to
6908ee6
Compare
Close the remaining async PSO fallback, command-list reset, and
pso_releaselifetime gaps on top ofmain's pipeline generation pins (dcfbb49,665ce02,3f91865) andlate_release::hold_pipeline(eb49926b) (XCL-BT-008). Part of #916. Part of #1488.What
mainalready covers vs. what this rebased PR keeps:main'sPipelineResolution,NativeGenerationrecording/submission pins, andlate_release::hold_pipelinealready retain completed async builds through recording/GPU retirement and defer released backing/two-pass pipelines. RedundantResolved/Pending::statetracking from the pre-rebase PR has been dropped.main: (1)real::pso_releasecalledf(this)beforeforget_ready_compute/forget_pso/pso_async::released(address-reuse race even whenXCL_LATE_RELEASE=0) and did not defer the adopted stand-in/PSO itself throughlate_release; (2)InitialFallbackbinds (unbuilt stand-ins withgeneration = None) and PCcl_reset(PreparedNativePipeline::record_generationleaving stalebind::State.resolutionacross resets, plusset_depth_bias_x/prepare_drawre-probingPENDING) left fallback/bound lifetime gaps; and (3)resolve_and_pin_if_enabled*gated one-shot pinning behindrebuild_recipes_enabled(). Rebased ontoupstream/main(6bfb5c51), the diff is 5 files (+817/-102, mostly tests).What is in it
pso_async::resolve_and_pin_if_enabled*regardless ofXCL_REBUILD_RECIPES, alignresolve_and_pin_mode/resolve_and_pin_pendingwithresolve_wait_budgets, and exposeis_trackedandretain_com(crates/xcl/src/hle/d3d12x/pso_async.rs)ListState::retained_fallbacks) inlist_xwheneverbind::select_native_choiceselects an unbuilt stand-in (InitialFallback), propagate them acrossExecuteBundle, mid-list splits, andKickoffX, release them vialate_release::hold_pipeline(unadopted) or normalDrop(adopted) on reset/release, routeset_depth_bias_xandprepare_drawthroughbind::resolve_bound_native_pipeline, and extenda_dispatch_with_a_pipeline_still_building_waits_at_the_submitto bind an adopted stand-in across mid-list splits (crates/xcl/src/hle/d3d12x/bind.rs,crates/xcl/src/hle/d3d12x/list_x.rs)PreparedNativePipelineinreal::cl_resetsobind::State.resolutionpins do not outlive PC list resets, probe final refs inreal::pso_release(add(this)/f(this) == 1) soforget_ready_compute,forget_pso, andpso_async::releasedalways run before final driver release (even withXCL_LATE_RELEASE=0), and defer adopted PSO release vialate_release::hold_adopted_pipeline(orig_fn, avoiding re-enteringpso_release) with unit tests inlate_releaseandreal::async_pso_lifetime_tests(crates/xcl/src/hle/d3d12x/late_release.rs,crates/xcl/src/hle/d3d12x/real.rs)Tested
32.0.16.2140), AMD Ryzen 5 7500F 6-Core Processor, Windows 11 x64 (10.0.26200.0),rustc 1.100.0 (0ef1bc386 2026-11-09)(stable-x86_64-pc-windows-msvc), plusXCL_ADAPTER=warp; debug and release (6908ee6d6208b86e573187209c2ba719bd6ed751onupstream/main6bfb5c5153ccc23517daf30aa1071ddb0fadb53c)cargo build -j 4 --workspace,cargo test -j 4 --workspace --no-run, andcargo build -j 4 --release -p xcl: exited0, 0 new compiler warnings (36 pre-existing inxcllib vs. 39 onupstream/main; 17 pre-existing inxcllib tests)--test-threads=1):cargo test -j 4 -p xcl --lib late_release -- --test-threads=1:9 passed, 0 failed, 0 ignored(0SKIPPED)cargo test -j 4 -p xcl --lib pso_async -- --test-threads=1:193 passed, 0 failed, 0 ignored(0SKIPPED)cargo test -j 4 -p xcl --lib hle::d3d12x::bind -- --test-threads=1:116 passed, 0 failed, 0 ignored(1 SKIPPED:two_pass_binds_set_the_shared_view_heap, opt-inXCL_HEAP_WINDOWS=1)cargo test -j 4 -p xcl --lib hle::d3d12x::list_x -- --test-threads=1:114 passed, 0 failed, 0 ignored(0SKIPPED)cargo test -j 4 -p xcl --lib hle::d3d12x::console_list -- --test-threads=1:11 passed, 0 failed, 0 ignored(0SKIPPED)cargo test -j 4 -p xcl --lib hle::d3d12x::device_x -- --test-threads=1:23 passed, 0 failed, 0 ignored(0SKIPPED)cargo test -j 4 -p xcl --lib hle::d3d12x::real -- --test-threads=1:178 passed, 0 failed, 0 ignored(0SKIPPED)XCL_ADAPTER=warp(--test-threads=1):late_release:9 passed, 0 failed, 0 ignored;pso_async:193 passed, 0 failed, 0 ignored;hle::d3d12x::bind:116 passed, 0 failed, 0 ignored(1 SKIPPED:no heap windows);hle::d3d12x::list_x:114 passed, 0 failed, 0 ignored;hle::d3d12x::console_list:11 passed, 0 failed, 0 ignored;hle::d3d12x::device_x:23 passed, 0 failed, 0 ignored;hle::d3d12x::real:178 passed, 0 failed, 0 ignored(1 SKIPPED:gpu_image_load_of_a_stencil_view_gives_the_stencil,no wave64)Regression run
main (
6bfb5c5153ccc23517daf30aa1071ddb0fadb53c):PR (
6908ee6d6208b86e573187209c2ba719bd6ed751):Not tested
cargo test --workspaceexecution (only--no-runand the 7 targetedhle::d3d12xtest modules above ran on RTX 3060 and WARP)VKD3D_CONFIG=retain_psos, non-Windows targets (not built / not tested)XCL_SAMPLE_*external shader packs (unset)AI use
upstream/maingeneration pins (dcfbb49,665ce02,3f91865) andlate_release::hold_pipeline, rebasedfix/pso-async-lifetime-retentionontoupstream/main6bfb5c51by dropping superseded retention logic and rebuilding the remainingInitialFallback/cl_reset/pso_release/ one-shot-pin fixes, updatedlate_releaseandreal::async_pso_lifetime_testsregression tests, and ran the builds, targeted RTX 3060 + WARP tests, and paired 60 s smoke runs.