Repository navigation
Conversation
The old -O0 fallback roughly doubled DXIL on the largest programs (xcl-dev#1269), and the driver then stalled on 14-30 MB blobs. -O1 matches -O3 DXIL size and is already used from 1 MB, so the 8 MB band uses it too. Assisted-by: Cursor (Auto / Composer) Co-authored-by: Cursor <cursoragent@cursor.com>
|
Review from the DXC lane: direction fully endorsed — the -O0 "safety net" was measurably self-harm (its ~2× DXIL is exactly what makes the driver stall, so it amplified the failure it existed to prevent, and -O1 matching -O3 output size at lower DXC time makes the >8 MB band's existence indefensible). The override behavior is right too ( |
GonZiin
left a comment
There was a problem hiding this comment.
I independently reproduced the warm-cache issue from the earlier review using the public dxc::compile_cached_in path. Including the effective default optimization level in the disk key would make existing entries for this size range recompile under the new policy.
Tested
- Windows 11 Pro build 26300, Ryzen 7 7800X3D, Radeon RX 9070 XT (driver 32.0.32029.2010), DXC 1.8.2502.11, Rust 1.100.0 MSVC, debug.
- Base
9e3831e1f570d3646e53ab753b19ec07eb8f1485compiled an 8,388,854-byte synthetic compute shader into 3,340 bytes of DXIL in an empty cache. - Head
122017d1ad52ca27a3f5a8d95c7704cff862e80dreported a cache hit and returned the same 3,340 bytes, verified byte for byte. With a separate empty cache, the same head compiled the same source into a different 3,244-byte blob. cargo test -p xcl --lib opt_level_testsat the PR head reported 1 passed, 0 failed, 0 ignored and 0 skips.
Not tested
Retail shaders, driver PSO timing, and the full workspace on this revision.
AI use
Codex (gpt-6.2-sol) wrote and ran the synthetic probe, ran the threshold test, and wrote this report.
|
Independent cache upgrade test on Tested
Explicit I also tested an uncommitted local variant that adds a policy tag to the cache key only above the former 8 MiB cutoff. With a copy of the old cache, it compiled the large fixture once to the same
Not tested Retail shaders, retail title runs, and compile or load times. The padded inputs exercise the cache policy. AI use OpenAI Codex (GPT-6 family, exact variant unavailable) wrote the temporary probe and local variant, ran the tests, and drafted this report. |
|
Test of Tested: RTX 4060 Ti 8 GB (32-lane waves), driver 621.24, Core i5-14400F, 32 GB RAM with a system-managed pagefile (commit limit 69.5 GB at the time), Windows 11 Pro 26300, release build. Not a clean head: Command:
Before this PR, the same three sources went through So on this machine neither Not tested: which of the three takes the memory (run B refused them together; run A had no per-compile log yet), whether DXC or the driver held it in run A, AMD, a clean PR head. AI use: Claude Code (Claude Opus 5.5) ran the builds and runs and wrote this; I checked it before posting. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Ran on the PR's head (122017d): RTX 5070 Laptop (Blackwell, driver 616.87), cargo build --workspace: ok One question above under 25 min: does this cover throny's 155 MB program? With Not tested: the full suite on this branch, and the >8 MB programs themselves |
|
@kais7654 On AI use: Claude Code (Claude Opus 5.5). |
|
Hardware: AMD Radeon RX 7900 XTX (driver 32.0.32029.2010), Ryzen 9 7950X3D, 32 GB, Windows 11 Pro 10.0.26300, rustc 1.100.0; tests in debug. Tested (AMD), updated for head
Earlier head
Not tested
AI use
|
|
Independent Windows release verification on NVIDIA RTX 3060 Ti ( Setup
Workspace tests (
Regression run (
Base ( PR head ( Not tested: offline cold DXC compile on >8 MB HLSL shaders, AMD / wave64 hardware. AI use: Antigravity ( |
The ~147-155 MB retail sources finish at neither -O0 nor -O1 and can hold a worker for tens of minutes at -O1 (xcl-dev#1269). Refuse them instead. Hash the default -O into the DXIL cache key so warm entries from the old -O0 band recompile under -O1. Assisted-by: Cursor (Composer) Co-authored-by: Cursor <cursoragent@cursor.com>
|
@throny @kais7654 @kole07139: pushed
@GonZiin: the DXIL cache key now hashes the default AI use: Cursor (Composer). |
|
Test report for the Setup: RTX 3070 Laptop 8 GB, NVIDIA 621.40, Ryzen 7 5800H, 28 GB RAM, Windows 11 26300, DXC 1.8.2502.11 (Windows SDK 10.0.26100), release. Retail 1.0.2.1 Method: not this PR's head but the same choice, forced by a local env override in DXC alone (
Driver, through the runtime's path:
Not tested: this PR's head commit itself, the largest (145 MB) program, other drivers, desktop CPUs, repeated runs, a title run. AI use: Claude Code (Claude Sonnet 5.5, then Claude Opus 5.5) wrote the local harness, ran the measurements on my machine and drafted this. |
|
Correction to my report above: the AI use: Claude Code (Claude Opus 5.5) found the cause and drafted this. |
|
Test of
Tested: RTX 4080 (driver as in my earlier reports), i9-12900K, 64 GB, Windows 11 26300, DXC 1.9.2602.17, release builds. One run per cell. AI use: Claude Code (Claude Opus 5.5): ran the tests and wrote this. |
# Conflicts: # crates/xcl/src/gpu/recomp/dxc.rs
Part of #1269 (campaign task C4). HLSL sources over 8 MB used to compile at
-O0as a "safety net". Thread measurements show that roughly doubles DXIL (to ~14–30 MB on the giants) and the driver then stalls;-O1matches-O3DXIL size and is already used from 1 MB, so the 8 MB band uses-O1too.Follow-up for risks raised on the PR / #1269: sources over 64 MB are refused (neither
-O0nor-O1finishes the ~147–155 MB ones, and-O1can hold a worker for tens of minutes), and the DXIL cache key includes the default-Oso warm entries from the old-O0band recompile under-O1.What is in it
crates/xcl/src/gpu/recomp/dxc.rs:default_opt_level—-O1for every source over 1 MB through 64 MB (drops the >8 MB-O0branch)-Otoken (warm-cache miss for the old-O0band)Tested
.\scripts\test.ps1at31fb65e: 780 passed, 0 failed, 41 ignored; SKIPPED GPU: 2 (no wave64), 1 (no heap windows)cargo test -p xcl --lib -- opt_level_tests cache_key_tracks_the_default: 4 passedRegression run
Main (
9e3831e):This PR (
31fb65e):Not tested
122017d); wave64 / heap-window GPU paths (skipped here)-O1and below the ~147 MB hang)AI use