Repository navigation
Conversation
luckyteagirl
left a comment
There was a problem hiding this comment.
At exact head 859da94 on current main b49be18, the new per-device ABI signature cache is not used by the command-list fallback for a second device. This is a source-derived review; I did not run a two-device title replay.
abi_rs_raw(this) now correctly stores a signature for each device, but abi_rs_cached() chooses using the process-wide device_raw() instead of the device that owns the list. console_list::close already has the actual PC list, yet obtains its fallback signature from that global lookup; bind.rs uses the same fallback. If device A is global and a translated PSO/list belongs to device B, a B signature can exist in ABI_RS_BY_DEV while the list receives A's signature, or close can report no XCL ABI root signature when A has none. The added abi_rs_raw_isolates_distinct_devices test checks cache creation and a B PSO, but never binds the fallback on B's command list.
Could the fallback lookup accept the owning device (for example from the list's GetDevice) and use that in both replay/bind paths? A two-device test with global A and a B list using a translated PSO with no own/static-sampler signature would exercise the new behavior end to end.
AI assistance: GPT-6.2 Sol found the missing device context; GPT-6.2 Astra independently checked the exact-head call sites and wording.
|
Independent focused Windows check of exact PR head Tested
Limitations
AI use
|
|
Tested on \859da94ed2ba8300719bf9ec9027f2f7eba4d6a6\ (\859da94e, clean PR head):
|
859da94 to
cfbaaac
Compare
|
Independent Windows check of exact PR head Tested
Source review Both production fallback callers now use the list’s owning device when AI use OpenAI Codex (GPT-6.2 Sol) checked the live refs and source, ran both commands, and drafted this report. |
cfbaaac to
033df82
Compare
|
Updated PR head to
|
…ABI/cache keys (xcl-dev#2688) Part of xcl-dev#2688 (Workstream 7); relates to xcl-dev#2088. - Cache dispatch_chain ID3D12RootSignature handles per (canonical device identity, static samplers) with GetDevice ownership validation and documented intentional process-lifetime retention, enabling COMPUTE_BLOBS hits across split programs sharing >= 16 KB pieces or rebuilt PSOs. - Normalize COM device identity via canonical_device_key (IUnknown cast with readable/non-null vtable guards), isolate ABI_RS and ABI_RS_SAMPLERS per device, and resolve command-list ABI fallbacks via abi_rs_cached_for_list(&ID3D12GraphicsCommandList) in bind::bind_abi and console_list::close. - Key non-zero NodeMask in persistent compute driver_cache paths while keeping NodeMask == 0 filenames unchanged, verify compute_blob_key process-locality, make split GPU fixture cleanup panic-safe via RAII Drop guard, and add unit/GPU/two-device command-list fallback tests.
|
Ran the dispatch-chain and bind tests at Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves 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
What this adds: the author ran the batch on an RTX 4060 Laptop GPU and the two-device test on headless WARP, where the UMA replay steps are skipped. Here the child process reaches the real RTX 5070 Ti and a GPU UMA window, and the module run fails. I did not check the same batch on unmodified Not tested: the unmodified- 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. |
|
Updated PR head to
Running the full |
033df82 to
2d14195
Compare
|
Independent amd-win test report for exact PR head Result: on the RX 7800 XT, Tested
Head
Earlier head
Control
Not tested
AI use
|
|
Re-ran the dispatch-chain and bind tests at Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves 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. This resolves the datapoint from my earlier report at Not tested: an unmodified- 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. |
|
Under Wine + vkd3d-proton on an RTX 4070, this pull request's tests passed at head Setup:
Not tested: title runs (in our 120 s title runs on this card no compute program was split); Windows; the 4 tests above. AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this comment. Posted without review by a person: the account owner was away and reads replies later. |
Prime1997
left a comment
There was a problem hiding this comment.
Read-through and GPU run of 2d14195. An AI tool (Claude Code) helped with the reading and ran the tests; each point below was checked against the code at this head.
Test results (RTX 3060 Ti 8 GB, NVIDIA 617.14 / 32.0.16.1714, i5-10400, Windows 11 26200.9974, rustc 1.100.0, DXC 1.9.2609.5, debug, isolated cache and data roots):
dispatch_chain: 5 passed, 0 failed.compute_blob_tests: 5 passed, 0 failed.gpu_compute_e2e: 8 passed, 0 failed.heap_window_out_of_memory_falls_back_to_the_switch_formreported SKIPPED (no heap windows on this setup).- The two-device test: 1 passed, 0 failed.
- The earlier head 859da94 also passed here (4 + 3 + 7).
Two things I saw while reading the earlier head 859da94 are fixed in this one: the sampler ABI cache is now keyed by (usize, Vec<u32>) rather than the sampler list alone, and name_for_node puts the node mask in the disk name.
Points for the author
- In
split_programs_sharing_large_piece_hit_compute_blobs_and_reuse_root_signaturethe spy records only whetherCachedPSO.pCachedBlobis non-null (line 497), andcompute_containerfalls back to the disk blob when the in-memory lookup misses. So the two assertions that say the shared piece came fromCOMPUTE_BLOBS(lines 537 and 550) also pass on a disk hit. The root-signature equality and key-count assertions next to them do pin the sharing itself. Running the fixture withXCL_PSO_DISK_CACHE=0, or recording which cache answered, would make those two lines prove what they say. - The chain file name still has no sampler key. Same question as on #2711: what happens when a blob built under one static sampler set is offered to a pipeline with another?
- A root-signature failure calls
note_translation_erroreven though the whole-program fallback then succeeds. That will show up as an error in logs for a case that worked. - The benefit is narrower than the description suggests. Main already gets a disk hit for the second program when the first build took 250 ms or more, so the gain is for the faster builds and for runs with the disk cache off. A sentence saying so would set expectations.
No defect found at this head. Point 1 is about test precision, not a blocker.
Generated by Claude Code
A fresh dispatch-chain root signature made the in-memory compute blob key unique for every split program, preventing programs with common pieces from sharing their driver-compiled blobs. Cache signatures by device and exact static-sampler layout. PR xcl-dev#2723 measured shared-piece reuse on Windows; the integrated stage passed the Windows GNU cross-target cargo check, but native GPU execution was unavailable here. Assisted-by: Codex (GPT-5.6-sol)
|
Paired native D3D12 check on RTX 4080 driver 621.01. For this fixture,
Each run built two successful native chains with distinct tails and a shared 26,816-byte DXIL piece. Both chains stayed live while measured. There were exactly two native creates per chain and no retries. Each confirmed run was 1 passed, 0 failed, 0 ignored, 0 capability skips. The first control run failed my expectation that the second base build would be cold. A repeat confirmed the warm result. Tested with the DXGI-verified RTX 4080, Core i5-13600K, Windows 11 25H2 build 26200.9974, Rust 1.100.0 x64 MSVC and DXC/DXIL 1.8.2502.11. I ran Not tested were dispatch output, compile-time savings, retail behavior, and other drivers. This comparison found no additional cache hit from the PR in this case. |
|
@CryingLaughing Thanks for the paired control. The per-device isolation and NodeMask identity fixes should be evaluated separately from incremental cache performance. Your fixture provides useful evidence for narrowing the performance claims. |
A fresh dispatch-chain root signature made the in-memory compute blob key unique for every split program, preventing programs with common pieces from sharing their driver-compiled blobs. Cache signatures by device and exact static-sampler layout. PR xcl-dev#2723 measured shared-piece reuse on Windows; the integrated stage passed the Windows GNU cross-target cargo check, but native GPU execution was unavailable here. Assisted-by: Codex (GPT-5.6-sol)
Caches
dispatch_chainD3D12 root signatures per(device, static_samplers)instead of allocating a fresh root signature per split compute program, normalizes/isolates per-device ABI root signatures (including command-list fallbacks and static-sampler variants), and keysCOMPUTE_BLOBSplus persistent non-zeroNodeMaskdisk cache entries.Part of #2688 (Workstream 7) and relates to #2088. Based on
main(b49be183), updated at2d14195e83eb5b1505c8c06793d9425c15337f0b. Diff size (817 insertions, 40 deletionsacross 5 files) is predominantly the new review-requested unit, GPU, and two-device command-list tests alongside the focused runtime change, which keeps one cohesive per-device root-signature and cache-identity fix.What is in it
crates/xcl/src/hle/d3d12x/real/dispatch_chain.rs:ID3D12RootSignaturehandles inSIGNATURESkeyed by(canonical_device_key, sampler_words)so split compute programs on the same device share one COM root signature (outside the lock duringCreateRootSignature, distinct across multiple D3D12 devices, and validated on hit viaGetDevice).ID3D12RootSignatureper distinct(device, static_sampler_set)) and verify D3D12 device-child lifetime insignature_retention_and_device_child_lifetime.>= 16 KBcs_6_0piece (or rebuilding released split PSOs) to reuse compiled driver blobs fromCOMPUTE_BLOBSviaCachedPSO, with panic-safe RAII fixture cleanup (FixtureCleanupDropguard retaining per-runnonceDXIL cache isolation).crates/xcl/src/hle/d3d12x/real.rs:canonical_device_keycasting toIUnknownwith readable / non-null vtable guards for synthetic unit mocks) and isolateABI_RS_DEV/ABI_RS_BY_DEVandABI_RS_SAMPLERSper canonical device.abi_rs_cached_for_list(&ID3D12GraphicsCommandList)resolving the list's owning device viaGetDevice(only falling back toabi_rs_cached()on synthetic mocks lacking vtable slot 7), so secondary devices never inherit the global device's ABI root signature.compute_blob_key_for(process-local in-memoryCOMPUTE_BLOBSonly) anddriver_cache::name_for_node/path_for_nodeon non-zeroNodeMask(-n{node_mask:x}suffix;NodeMask == 0retains the existing{fnv64:016x}-{len:x}-{flags:x}.{ext}filenames).abi_rs_raw,abi_rs_forwith static samplers,abi_root_signature()including zero-device fallback, anddriver_cache::tests.crates/xcl/src/hle/d3d12x/bind.rs&crates/xcl/src/hle/d3d12x/console_list.rs:bind::bind_abiandconsole_list::closefallback root-signature lookups from globalabi_rs_cached()toabi_rs_cached_for_list.two_device_command_list_fallback_isolates_bind_abi_and_console_listpassing owned.clone().into_raw()references toconsole_list::wrap_psoandconsole_list::create_with_allocator, verifyingabi_rs_cached_for_listacross distinct devices, null-slot-7 mock fallback, and both refusal (no XCL ABI root signature, never binding Device A's RS) and Device B RS binding acrossbind_abiandconsole_list::closewhen a GPU UMA window is available (skipping only UMA replay viarunner::skip_test("no GPU UMA window")whenuma_window_vas()has VA0on headless WARP runners).crates/xcl/tests/gpu_compute_e2e.rs:abi_root_signature_tracks_registered_backend_deviceverifyingabi_root_signature()/abi_rs_cached()ownership againstdevice_raw().Tested
32.0.31033.3) + Microsoft Basic Render Driver (WARP),rustc, DXC1.8.2502.11.cargo build --offline --locked --release -p xcl -j 2: passed (0errors;1pre-existing dead-code warning in untouchedvram.rs).cargo test --locked --workspace -j 2 -- --test-threads=4 --nocaptureon2d14195e(RTX 4060):1443 passed, 0 failed, 47 ignored(xcllib1316 passed; 27 ignored+127 passed; 20 ignoredacross 23 integration test targets, includinggpu_compute_e2eande2e).SKIPPEDGPU/host checks on RTX 4060 (wave32-only, Windows Developer Mode disabled, no heap windows):gpu::dxil::kernel::dispatch_chain_native_wave64_builds_whole(no wave64),gpu::recomp::lower::testswave64 checks,gpu::recomp::lower_dxil::testswave64 and wave32 per-lane gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 checks (V_MUL_F16,V_PK_MUL_F16,V_CVT_F16_F32),gpu::recomp::testswave64 checks,shaders::tests::pso_measurement_compiles_an_exact_synthetic_record(0x887A002D), andgpu_compute_e2e::heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).hle::d3d12x::bind::testson2d14195e(RTX 4060):9 passed; 0 failed; 0 ignored(1.47s).AMD Radeon 780M Graphics(XCL_ADAPTER=780M,2d14195esource):two_device_command_list_fallback_isolates_bind_abi_and_console_list:1 passed; 0 failed(0.52s, resolving0xc0000005double-Releasecrash).hle::d3d12x::bind::tests:9 passed; 0 failed; 0 ignored(1.05s).hle::d3d12x:::261 passed; 0 failed; 2 ignored(13.58s).gpu_compute_e2e:8 passed; 0 failed; 0 ignored(4.77s;SKIPPED heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows).XCL_ADAPTER=warp):two_device_command_list_fallback_isolates_bind_abi_and_console_list(1 passed; 0 failed,SKIPPED ...: no GPU UMA window),dispatch_chain::tests(5 passed; 0 failed),compute_blob_tests(5 passed; 0 failed),gpu_compute_e2e(8 passed; 0 failed).Regression run
Paired 60-second
scripts/smoke.ps1runs (same title9bb0e164on RTX 4060 Laptop GPU, releasetarget\release\xcl.exe,XCL_NETWORK=0):main:1265vs1478frames shown (85.6%, min80%),0device removals,0crashes,14060 MBvs14210 MBpeak commit (98.9%, max125%).Not tested
9bb0e164,compute splitstayed at0 programs split, 0 pieces built, 0 chained dispatches issued(split-compute RS reuse andCOMPUTE_BLOBShits are tested directly bydispatch_chain::testsandgpu_compute_e2e).AI use
Gemini); assisted with root-cause analysis, COM/D3D12 device-isolation and wrapper-ownership fixes, targeted NVIDIA/AMD/WARP tests, smoke validation, and PR preparation under author direction.