Repository navigation
Conversation
NVIDIA's driver builds about one compute pipeline at a time in a process, however many threads ask: on an RTX 4090 (driver 621.24) --pipelines with 12 pipeline threads kept 2 threads busy at 28 % CPU. Four processes, each with every fourth record and the shared DXIL and driver-blob caches, made about 3.7x the driver blobs in the same time. --processes N starts N copies of xcl shaders with --shard k/N (records k, k + N, ...), gives each its share of the DXC threads and 2 pipeline threads unless XCL_DXC_THREADS / XCL_PIPELINE_THREADS are set, and returns the first failing process's exit code. Assisted-by: Claude Code (Claude Opus 5.5) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
A9 (nv-linux) — Offline PSO parallelism on the RTX 5070 Ti I tested clean head
All runs made eight pipelines, zero refused. The four-process runs showed four shards and two pipelines made per shard. The cold runs reported zero XCL driver cache hits. The restore runs reported eight hits and retrieved all eight SPIR-V modules from their blobs. With four threads, Vulkan feedback still recorded three recompilations in the first restore and two in the second. I crossed the caches in both directions (serial build → four-thread restore and four-thread build → serial restore). All four crossed runs recorded six Vulkan hits and two recompilations, with eight XCL hits. I ran RTX 5070 Ti 16 GB, NVIDIA Linux driver 620.73.04, Ryzen 7 9700X, CachyOS x86-64 AI use — Codex (GPT-6 family, exact variant unavailable) built the PR, ran the tests, checked the logs and hashes, and drafted this report. |
|
Verification on RTX 3060 Ti (Windows 11): merge conflict with current |
|
A full-pack driver pass with The goal was the AOT recipe for #1269: precompile every compute pipeline of the retail pack, then run the title on those caches. This comment is about one thing #1502 changes: how much memory the precompile takes when it runs as several processes. Setup
¹ A local patch, not for upstream: an env var makes
Code reading (
Not tested
AI use: Claude Code (Claude Opus 5.5) ran the passes, read the code and wrote this comment. I checked each point before posting. |
Requested by Edison · project thread
xcl shaders --precompile --pipelinesbuilds compute pipelines in one process, and NVIDIA's driver builds about one pipeline at a time per process however many threads ask: on an RTX 4090 with 12 pipeline threads, 2 threads were busy and the CPU sat at 28 %.--processes Nruns the precompile in N processes ofxcl shaders, each taking every N-th record (--shard k/N) and sharing the DXIL and driver-blob caches. On the same 343 compute programs from cold caches, 4 processes took 765 s against 2 060 s for one. Part of #1269.What is in it
crates/xcl/src/shaders.rs:--shard k/n(a process takes records k, k + n, …; the others count as done) and--processes N(starts N children with--shard k/N, gives each its share of the DXC threads and 2 pipeline threads unlessXCL_DXC_THREADS/XCL_PIPELINE_THREADSare set, waits, returns the first failing child's exit code). Unit testshards_split_the_records_and_drop_processes.crates/xcl/tests/gpu_compute_e2e.rs:offline_compute_pipelines_split_over_processes: two programs,--processes 2, each child builds one pipeline and the shared cache gets two driver blobs.README.md: the option on the--precompileline.Tested
cargo test --release --workspace -- --test-threads=4at c65e2c8: 722 passed, 1 failed, 21 ignored. The failure islauncher::tests::console_detection(console_importsof the test exe givesNone); it fails the same way onmainb7aa9f3 here. SKIPPED:gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64).cargo test --release -p xcl --test gpu_compute_e2e offline_compute: 2 passed (the new test and Shaders: save offline compute pipelines to the runtime driver cache #744's).shaders.rpf(26 503 records),--precompile --pipelines --only cs --limit 22500, each run into its own emptyXCL_DXIL_CACHE(and--windows 3/--windows 5so the driver's own cache could not carry over between the two): one process 343 programs in 2 060 s;--processes 4the same 343 (86 / 85 / 86 / 86) in 765 s. Driver blobs after 5 / 10 / 20 min: one process 149 / 219 / 231, four 251 / 326 / 336.Regression run
main:
PR:
The title run does not reach the changed code (it is the
xcl shadersCLI); it is the regression check the rules ask for.Not tested
--processes: a few programs make the driver's build run for a very long time and grow past tens of GB (one passed 54 GB here without finishing); with several processes at once that needs RAM to spare. Not handled in this PR.AI use
🤖 Generated with Claude Code