Repository navigation
Conversation
b31376e to
dbf54bf
Compare
|
Update, head NVIDIA test report for
Added 21:32Z: re-run at the current head AI-assisted (Claude Code, Claude Opus 5.5). Synthetic tests only; no title run. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
— Devin |
dbf54bf to
ab2855f
Compare
bmjask
left a comment
There was a problem hiding this comment.
P2: driver_pso uses compute_mem_windows() for every PSO. On NVIDIA defaults compute is heap-windowed but graphics remains switch-form; nevertheless translated_graphics_pso runs under with_switch_fallback, so any unrelated graphics E_OUTOFMEMORY is misclassified as heap-window failure and retries the identical graphics pipeline. Restrict heap-OOM fallback to the actual translated stage/form and add graphics-E_OOM/no-retry coverage. This draft also lacks regression pair, reruns of prior NVIDIA failure scenarios, and 8 GB-card validation.
|
Test report for Tested
Not tested: what the 60 programs compute, a title, build time, split chains, GS, mesh, graphics, other GPUs. AI use: Claude Code. Claude Opus 5.5 wrote the test, ran it and wrote this; Claude Fable 5.2 rechecked it. |
|
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
Thanks! — Devin |
ab2855f to
af82530
Compare
|
Linux (Wine + vkd3d-proton) + NVIDIA, Setup:
Not tested: AI use: Claude Code (Claude Opus 5.5) ran the title and wrote this comment. Posted without review by a person: the account owner was away and reads replies later. |
|
@Royalflamejlh thank you for the runs and the careful write-up. Under Wine and vkd3d-proton, the compile-time gain doesn't separate from the spread between runs except in the two largest programs, and the six programs with unchanged DXIL show how large that spread is. I've scoped the description's compile-time claim to what it was measured on: native Windows, an RTX 5070 Ti on 610.74, and five large compute programs, timed against the switch from before #2368. Those five are all the native compile-time evidence there is, so the description now says the gain is shown only for a few large programs, and not natively against #2368's form. Your result is under Tested by others, with your caveat that the times are vkd3d-proton's whole creation path rather than native AI use: Claude Code (Claude Opus 5.5) wrote this reply. |
|
@bmjask thank you, the P2 was right. Fallback scope.
Regression pair (in the body), on c6e5af8 against Earlier NVIDIA failures and 8 GB.
AI use: Claude Code (Claude Opus 5.5) made the fix and the tests and wrote this reply. |
With heap windows (XCL_HEAP_WINDOWS=1), every read of the direct DXIL translator was a branch on `w < windows` (and the lane guard) around the heap lookup, and a phi per value at the join. On NVIDIA the driver's compile time follows the block count, and the reads of a large compute program make thousands of blocks. XCL_HEAP_FLAT=1 (with heap windows; new flag HEAP_FLAT in the windows count, so the caches keep the forms apart) reads in one path: the lane loads from window `w`, or window 0 when `w` is outside the windows or the lane is not active, and those lanes take 0, as the guarded form and root UAVs give. All with_mem_i32s callers only load (raw, SMEM, unaligned, format and BVH node reads). Stores and atomics keep their branch. Compute programs only (kernel and CS entries, kernel::reads_heap_flat): mesh, GS, vertex and pixel programs keep the guarded form. The HLSL path ignores the flag. The one-path form is the idea xcl-dev#1695 brings to the HLSL heap form. xcl shaders (--precompile, --export-hlsl, --measure-pso) takes its windows from pso::windows_for, as pso::mem_windows does, instead of its own copy of the rule, which had no HEAP_FLAT: with XCL_HEAP_FLAT=1 the precompile made the guarded form's entries, not the ones the runtime looks up (found by bielfreedom). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
af82530 to
970823e
Compare
|
By reading only, not run, at
A fix could give AI use: Claude Code (Claude Opus 5.5) found this; Claude Fable 5.2 rechecked it; checked by a person before posting. |
On NVIDIA, the compute programs the direct DXIL translator makes now read their memory windows through the shared descriptor heap in the flat form (HEAP_FLAT) by default, instead of through root UAVs. Other stages and other GPUs are unchanged. - pso::heap_windows: XCL_HEAP_WINDOWS=1 every stage (as before), =0 none, unset: on when the title's adapter is NVIDIA (set_adapter_vendor, from the device's DXGI adapter). XCL_HEAP_FLAT=0 turns the flat form off. - compute_mem_windows: the windows of a compute program, with the heap by default; mem_windows (graphics, mesh, GS) takes the heap only with XCL_HEAP_WINDOWS=1. The HLSL path keeps root UAVs unless XCL_HEAP_WINDOWS=1 (hlsl_windows): its heap form is not measured. - A pipeline the driver refuses with heap windows is still built with root UAVs (with_switch_fallback), but only when the stage it builds took heap windows (with_switch_fallback's `heap`): an E_OUTOFMEMORY of a graphics or mesh pipeline built with root UAVs is not retried. - xcl shaders --precompile / --export-hlsl / --measure-pso: the keys of the runtime, from the bench's adapter: compute programs take pso::compute_windows (compute_mem_windows), VS, PS and mesh programs pso::graphics_windows (mem_windows), so by default on NVIDIA only the compute programs are precompiled with heap windows (found by pvfreis). - XCL_UMA_WINDOWS=8|16 still needs XCL_HEAP_WINDOWS=1. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
970823e to
c6e5af8
Compare
|
@pvfreis thank you, that was right, and it would have cost exactly what this PR is for: VS, PS and mesh programs compiling in play after a precompile. Checked against the code at 970823e: Fixed in c6e5af8, as you suggested:
Offline count, the first 4,000 records of the title's shader pack, release: a fresh DXIL cache,
I did not count PS. The first 6,000 records hold none, and a full-pack count takes close to an hour. PS and mesh take the same count as VS in AI use: Claude Code (Claude Opus 5.5) made the fix, the test and the count and wrote this reply. |
|
The GPU leg now runs and passes on a relaxed diagnostic stack — and the fallback genuinely fires. Head On stock vkd3d-proton 3.2.0 this integration test aborted before its body: On the relaxed diagnostic build of the same provenance commit our stock DLL reports ( Scope: relaxed stack = identity checks compiled out, so this verifies the fixture's assertions, not XCL's vtable patching against a stock runtime; no title run. Log: |
|
@pickles976 thank you, especially for showing that the fallback really fired on the adapter and wasn't skipped. Your run is under Tested by others in the description, with your caveats: the relaxed diagnostic build with the identity checks compiled out, and no title run. It was on af82530. The head is now c6e5af8, which changes only the precompile's windows, not the fallback path. AI use: Claude Code (Claude Opus 5.5) wrote this reply. |
Part of #2088. Stacked on #2427; only the top commit belongs here.
On NVIDIA, this PR turns #2427's flat heap windows on by default, for compute programs only. Graphics stages, mesh, GS, other vendors and the HLSL path keep the switch over root UAVs, as they do today.
What it changes for compute programs on NVIDIA, compared with
main's form (#2368's select over root UAVs):GetCachedBlob) was 41.11 MB with this form and 51.17 MB with root UAVs, a ratio of 0.803 (0.465–0.922 per record). NVIDIA removes the device when a title's compiled shader code reaches about 448 MB in total (NVIDIA: the device is removed when the pipelines in use need more than 512 MB of shader code (0x887a0005) #2403). I have not measured how much this moves that point for a whole title.How it decides:
XCL_HEAP_WINDOWSset:1gives heap windows to every stage, as before;0turns them off.0x10DE), and only for the compute programs the direct translator makes (compute_mem_windows).XCL_HEAP_FLAT=0brings back the guarded form.with_switch_fallback). Only builds that had heap windows are rebuilt that way. A graphics or mesh build without them is not built twice (@bmjask's review).XCL_HEAP_WINDOWS=1did. This applies to every list, graphics included, although graphics shaders still take the switch.Why only compute, and not the HLSL path:
XCL_HEAP_WINDOWSwas opt-in because two NVIDIA setups failed with it in #187's review:What is in it
gpu/recomp/pso.rs:heap_windowswith the vendor default,set_adapter_vendor,heap_windows_everywhere,compute_mem_windows/compute_windowsandhlsl_windows.console_to_dxil_fortakes the compute windows for a compute program.XCL_HEAP_FLATis on by default.hle/d3d12x/real.rs:with_switch_fallbacktakes whether the build has heap windows: the compute windows for a compute build, the graphics windows for graphics and mesh.driver_psoretries E_OUTOFMEMORY in the switch form only for such a build.switch_fallback_tests: an E_OUTOFMEMORY without heap windows is not retried, one with heap windows is built again once, and a driver call outside a translated build is not a heap-window build.shaders.rs,gpu/adapter.rs: the--precompile/--export-hlsl/--measure-psowindows are the runtime's, per stage, for the bench's adapter. Compute programs takepso::compute_windows, ascompute_mem_windowsdoes. VS, PS and mesh programs takepso::graphics_windows, asmem_windowsdoes. So by default on NVIDIA only the compute programs are precompiled with heap windows. Before, every stage got the compute count, so precompiled VS, PS and mesh entries missed at run time (found by @pvfreis, comment 7181439405).gpu/uma.rs:XCL_UMA_WINDOWS=8|16still needsXCL_HEAP_WINDOWS=1, since graphics need the heap for more than 4 windows.tests/gpu_compute_e2e.rs: the switch-form fallback test checks the compute windows.Tested
cargo test --workspace --no-fail-fast -- --test-threads=4on this head, c6e5af8 (on Recompiler: direct DXIL reads heap memory windows without a branch #2427's c8c2b7a andmain6d12f58): 1431 passed, 0 failed, 46 ignored.V_MUL_F16,V_PK_MUL_F16,V_CVT_F16_F32).heap_window_out_of_memory_falls_back_to_the_switch_formruns, because heap windows are on by default on this NVIDIA card, and passes: a refused heap-window pipeline is rebuilt in the switch form and runs correctly.switch_fallback_testspass, and so do Recompiler: direct DXIL reads heap memory windows without a branch #2427'sgpu_heap_flat_reads_match_the_switch_form,only_compute_programs_read_heap_windows_flatandprecompile_windows_are_the_runtimes. The last checks the precompile's windows per stage against the runtime's: withXCL_HEAP_WINDOWS=1, and with it unset on an NVIDIA and an AMD vendor, each in a new process. With the old single count it fails on NVIDIA's default: VS, PS and mesh got 772 where the runtime uses 4.xcl shaders --precompile --only vswith default settings; then the same withXCL_HEAP_WINDOWS=0, whose VS keys are the runtime's default ones. The second run's already-cached count is what the runtime finds.precompile, PS and mesh programs take the same count as VS.Tested by others
cargo test --workspace --no-fail-fast -- --test-threads=4 --skip hle::xaudio2: 1422 passed, 0 failed, 46 ignored. The 16 heap-window tests ran, none skipped, with no device removal. 25 SKIPPED lines (no wave64 and the like).shaders.rs, andpso::graphics_windowswith the same rule as before); the fallback path is the same.heap_window_out_of_memory_falls_back_to_the_switch_formpasses 1/1, and the forced out-of-memory fires on the real adapter: the pipeline is built again in the switch form.mainreaches on Windows; the obstacle is replaced vtables — proposal: proxies #175 identity assertion. No title run.maine1d84b7.presentstest, also fails on thatmain(1422 passed, 1 failed, 46 ignored).XCL_DIRECT_DXIL=1.XCL_HEAP_WINDOWS=0.Create*PipelineStatetime.=0run lost its device at 77.9 s in vkd3d-proton and is left out.CreateComputePipelineStatetime over 26 large programs.Regression run
scripts/smoke.ps1through our run script, 120 s, release builds,XCL_DIRECT_DXIL=1, in one queue job:mainb49be18, then this head. Both sides use the same data root and XCL cache, warmed by earlier runs, and start from the same learned coherent-window state.main's frames (2227 against 1593) and 50 % of its peak commit (14319 against 28787 MB). Its last 6 s still presented 60 frames per 2 s, wheremain's presented none. One run each; I have not looked into why the two differ this much.mainb49be18:This PR (c6e5af8):
Not tested
AI use
🤖 Generated with Claude Code