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. |
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. |
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. |
|
NVIDIA and AMD full-suite run, to go with the reports above by pickles976, upipibi, since none of them covers AMD. Tested exact head Tested
Not tested
AI use
|
|
@futurepro62 thank you for the full suite on c6e5af8, and on the Radeon iGPU too. Both runs are now under Tested by others in the description. One test in your NVIDIA The rest of the list are AI use: Claude Code (Claude Opus 5.5) drafted this reply from your comment and my suite log. |
|
Independent RTX 3080 Ti check of PR head With With
An initial suite invocation before the workspace build failed three e2e tests because the test title binaries were missing. The documented build step and full rerun above passed. Not tested: a retail title or paired smoke run, an actual driver out-of-memory event rather than the test injection, other GPU vendors, or release performance. This confirms the fallback fixture on Ampere driver 621.35; it does not establish the whole-title code-size or compile-time gain. AI use: Codex (GPT-6.2 Sol) checked out the exact head, ran the tests, checked the log for the real GPU and actual fallback, and drafted this report. |
|
@thehollowedone thank you. Your run covers the fallback test that the earlier run left out: AI use: Claude Code (Claude Opus 5.5) drafted this reply from your comment. |
|
By reading only, not run, at
A fix could set the vendor in AI use: Claude Code (Claude Opus 5.5) found this; Claude Fable 5.2 rechecked it; checked by a person before posting. |
|
A detail for the rebase onto #2555, adding to pvfreis's comment above (by reading, c6e5af8 against main 8b957be, not run): main's prepare_for_launch adds only HEAP_WINDOWS (shaders.rs:1646-1647); main has no HEAP_FLAT. At this head with_heap (pso.rs, compute_windows / graphics_windows) adds HEAP_FLAT by default to every stage that takes heap windows, so with XCL_HEAP_WINDOWS=1 VS, PS and mesh keys carry it too. If the conflict keeps main's line, the prepared keys miss with =1 as well, not only with the variable unset. Setting the vendor from progress.adapter first and passing runtime_windows(n)'s two counts, as pvfreis suggests, covers both. A check of precompile_windows_are_the_runtimes through prepare_for_launch (vendor 0x10DE, variable unset, and =1) would catch it. The prepared pipelines are not wrong, only unused: the ABI root signature is the same for both forms (heap directly indexed, pso.rs:1431) and the driver cache is keyed on the DXIL. AI-assisted (Claude Code, Claude Opus 5.5): found this by reading; not run. |
|
Another 8 GB NVIDIA run on the current head
Tests only: no title run, no compile timing (driver cache cannot be disabled here). |
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>
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). - The startup preparation (prepare_for_launch, xcl-dev#2555) keys its programs the same way: it runs before real::init notes the adapter, so it notes the vendor of the title's adapter itself (launch_windows) and takes runtime_windows' two counts. Without that the prepared compute programs miss on NVIDIA with XCL_HEAP_WINDOWS unset (found by pvfreis and upipibi; launch_windows_are_the_titles fails without it). - XCL_UMA_WINDOWS=8|16 still needs XCL_HEAP_WINDOWS=1. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
c6e5af8 to
60287fe
Compare
|
Tested: Clean Not tested: NVIDIA/AMD hardware, driver fallback execution on Arc, full suite and retail smoke. AI use: T3 Code / Codex ( |
|
Corrected exact-head Windows/NVIDIA report. My earlier full-suite failure count came from this test environment's unwritable default DXIL cache. I reran the suite at the same clean #2428 head Windows 11 build 26300, RTX 3080 Ti / NVIDIA 621.35, Ryzen 7 9800X3D, rustc 1.99.1 MSVC, DXC 1.8.2502.11:
The launch-key and injected-OOM fallback paths passed at this exact PR head. I did not run a clean-head paired title smoke, whole-title shader preparation, or AMD/Intel/Wine. The description still needs smoke blocks for AI use: Codex (GPT-6.2 Sol) ran and reran the build and tests, checked counts and skips, and drafted this correction. |
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.main's form (Recompiler: flatten direct DXIL root-UAV loads for compute #2368's select) this form built 22–48 % faster (geomean 7.67 vs 12.72 s, 0.603), with native code 0.877 times the size in that job. Against the switch from before Recompiler: flatten direct DXIL root-UAV loads for compute #2368 it built 1.5–3.6 times as fast. Tables are in Recompiler: direct DXIL reads heap memory windows without a branch #2427. The gain is shown only for those few large programs. Under Wine and vkd3d-proton, @Royalflamejlh's times did not separate from the spread between runs (see Tested by others).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).XCL_REQUIRE_GPU=mesh: 1419 passed, 0 failed, 44 ignored. All 8 new tests ran and passed.heap_window_out_of_memory_falls_back_to_the_switch_formskipped there with "no heap windows", as it should off NVIDIA.--skiplist on NVIDIA includesheap_window_out_of_memory_falls_back_to_the_switch_form, so that run does not cover it (@thehollowedone's run below does). Its other skips aremain's tests, which this PR does not change.heap_window_out_of_memory_falls_back_to_the_switch_formwithXCL_HEAP_WINDOWSunset andXCL_REQUIRE_GPU=mesh: 1 passed, 0 failed, 0 ignored. It ran on the real adapter with the heap views made by default, and the injected out-of-memory gave one switch-form rebuild.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