Repository navigation
Shaders: --pipelines makes programs of 4 MB DXIL or more last, by name - #1279
bstillbstill wants to merge 1 commit into
Conversation
`xcl shaders <pack> --precompile --pipelines` on a retail title's pack stops advancing right after record 22 600, its memory growing (reported on xcl-dev#505 / xcl-dev#744 from three machines, and on this one). The records there are three screen-probe compute programs of 13 - 29 MB of DXIL (88 863 console instructions for the biggest, unrolled). The NVIDIA driver alone had not built the smallest after 14 minutes; in the pass, the compiles queued behind them held up everything after, and the pass printed no name. Programs of GIANT_DXIL (4 MB) or more are now kept aside and made after all the others, one at a time, smallest first, each named with its size before the driver gets it and timed after. Stopping the pass there keeps everything made before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Test report: Setup: NVIDIA GeForce RTX 4090 (driver 621.01, 32-lane waves), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11 Pro 26300, Rust 1.98.1 MSVC, release, DXC 1.9.2602.17. This PR's head
Three things that may matter for the PR:
Not tested: this PR rebased onto AI use: Claude Code (Claude Opus 5.5) ran the builds and runs on my PC and wrote this report. |
|
A data point and one suggestion for this PR, from a run of a variant of it. This PR keeps the giants aside only at pipeline creation, by DXIL size. DXIL size is known only after translation and DXC, so the giants' translation and DXC ( Setup: RTX 5070 12 GB (driver 621.24), Ryzen 7 9800X3D, 32 GB RAM, Windows 11 Pro 26300, Rust stable MSVC, release, DXC 1.9.2609.
So I cannot give a throughput figure. What the data shows is that ordered this way, the pass got through the rest of the pack before the giants without the memory climb. If you'd rather keep this PR as it is, I can open the ordering as a separate small PR stacked on this one. Say which you prefer. Title run after it (same tree, AI use: Claude Code with Claude Opus 5.5 wrote the variant, ran the passes and the title, and wrote this comment at the request of the person running it. |
xcl shaders <pack> --precompile --pipelinesnow makes the pipelines of compute programs of 4 MB of DXIL or more after all the others, one at a time, smallest first, and names each with its size before the driver gets it. Part of #505; the stall reported on #744 (RTX 4080, RTX 5080) and #505 (RTX 4090).On the newer retail title's pack the pass stopped advancing right after record 22 600, its memory growing (to 27 – 44 GB on an RTX 4080), and printed no name. The records there are three screen-probe programs: #22616
indirect_diffuse_lighting:CS_ScreenProbes_ActivateProbes_9083c094_Wrapped(29 052 KB of DXIL), #22617…ActivateProbesTarget_534f271f…(28 940 KB), #22618…ActivateRays_d60186e6…(13 774 KB). Their console code is unrolled (88 863 instructions for ActivateProbes). The NVIDIA driver alone (one thread) had not built ActivateRays after 14 minutes, at 4.6 GB and growing about 0.2 GB a minute.What is in it
Shaders: --pipelines makes programs of 4 MB DXIL or more last, by name–crates/xcl/src/shaders.rs:GIANT_DXIL(4 MB),Giants(kept aside during the pass, taken smallest first), the pass makes them after the others; testpipelines_of_giant_programs_are_kept_for_the_end_smallest_first.Tested
stable-x86_64-pc-windows-msvc, DXC 1.9.2609.5; debug for the tests, release for the passes.cargo build --workspace && cargo test --workspace -- --test-threads=4ond2eb1b4: 742 passed, 0 failed, 41 ignored. SKIPPED:gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64).xcl rpf <pack> --extract CS_ScreenProbes_ --out <dir>; 5 more have names past the Windows path limit), thenxcl shaders <dir> --precompile --only cs --pipelines: the 26 others were made in 25 s (pipelines: 25 made, 0 refusedthe last progress line), then it printed3 compute programs of 4 MB of DXIL or more, made last …and gave ActivateRays (13 774 KB) to the driver, named. I stopped it there.--precompile --only cs --pipelines --limit 22700: 225 pipelines in 22 minutes, 0 refused, private bytes mostly 2.2 – 3.1 GB (peak 8.9 GB). It had not reached record 22 616 when I stopped it: the 0.3 – 1 MB programs before it went at about 2 a minute (NVIDIA's compiler waits on the process heap lock, as reported on Shaders: save offline compute pipelines to the runtime driver cache #744 and Shaders: xcl pipelines compiles a run's queued pipelines outside the title #759).Regression run
main:This PR:
The title run does not reach this code (it is
xcl shadersonly). No input in either run (intro and menus). Made withsmoke.ps1plus a local fix that reads the log of a run that does not exit by itself (an earlier main run hung inend_titleafter its 60 s); these runs exited by themselves, somain's script gives the same blocks.Not tested
Pipelines::makekeeps): a conflict inshaders.rsis likely.AI use
🤖 Generated with Claude Code