Repository navigation
D3D12.X: reuse offline compute blobs on single-node devices - #3257
moombathepilot wants to merge 1 commit into
Conversation
Translated compute used the title's node mask 1 while offline precompile used 0. Use the single-node descriptor for both so the runtime finds the offline blob. On an RX 7800 XT the target pipeline went from a 408 ms driver build to a disk-cache hit.
|
Confirmed offline-to-runtime reuse on an NVIDIA RTX 5070 12 GB, Ryzen 7 5700X3D, Windows, at b7017ec. GetNodeCount returned 1. Five fresh processes used the same synthetic 2,044-byte compute DXIL and ABI root signature. The test overlay called the production offline builder (Pipelines::make_required, Whole) and runtime compute_container (Whole) with the native CreateComputePipelineState method. Each runtime call returned a valid pipeline.
Both directories contained the same single driver filename, d2b0d1c8253fd47c-7fc-0.pso, 1,358 bytes. Each warm process logged one pipeline made from the driver blob of an earlier run. XCL_PSO_DISK_CACHE=1 and XCL_PSO_DISK_CACHE_MIN_MS=0 allowed this tiny cold runtime control to persist. Coverage is the whole translated compute PSO path on one physical node; linked adapters, guest dispatch and title load times were outside this test. OpenAI Codex wrote the test-only overlay, ran the controls and drafted this report. |
|
Maintainer cross-reference: #3214 independently addresses the same offline mask-0 / runtime mask-1 compute cache miss. The heads diverged from 765b2c5; neither contains the other. Both have working single-node evidence, including AMD here and NVIDIA on both threads. The policy difference matters when selecting one implementation. Here compute_container checks GetNodeCount, and on a single-node device changes the descriptor and its derived RAM, library and disk keys to mask 0. On a linked device it preserves mask 1. In #3214 the descriptor stays exactly as requested, but RAM, library and disk naming alias 1 to 0 on every device. Masks 2 and above remain distinct in both. Combining both patches would therefore reintroduce linked-device key aliasing even with this PR's node-count check. Neither thread has linked-device validation. I would choose one implementation for the shared use case and keep the linked-device policy an explicit decision. AI use: OpenAI Codex compared the two exact diffs, ancestry and published test controls. |
|
Closing as a duplicate of #3214. I confirmed that #3214 reuses the offline compute blob on an RX 7800 XT. The AMD test report is on that PR. Thanks to @andrewDoing for pointing me to #3214 and for independently testing #3257 on NVIDIA. |
Offline precompile saves compute pipeline blobs with D3D12 node mask 0. A title requesting mask 1 on a single-node device looks under a different cache key and rebuilds the pipeline. This change uses mask 0 for translated compute in that case, so runtime can reuse the offline blob. Related to #3182.
What is in it
Tested
cargo test --workspace --offline --locked --no-fail-fast -- --test-threads=4 --nocapture(separate target directories) reported 2,609 passed, 4 failed, 49 ignored, and 12SKIPPEDnotices on the patch. Main (fa204595) reported 2,608 passed, 4 failed, 49 ignored, and 12SKIPPEDnotices. Both runs failed the same DXIL fuzz test, mesh shader-cache test, and two-pass driver-cache integration test (parent and child).Regression run
main:
PR:
Not tested
AI use