shaders: benchmark direct DXIL PSO compilation #1802
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1802
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1802"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@mokkamokacaffe on GitHub · 2026-11-24 20:55 UTC · original
mokkamokacaffe:codex/direct-pso-benchmark→main· +91 −27 · 4 files · 1 commits · openPart of #1269.
Extends the exact-record PSO benchmark to compare the HLSL/DXC and Direct-DXIL routes. D3D12 cache disabling is requested for every measured call, but the output explicitly does not claim that a driver performed a cold compile.
What is in it
--measure-pso ... --backend hlsl|directfor one exact console compute record.cache_disable_requested: trueandcold_compile_verified: false; document that D3D12 cache control is a driver hint and a fast repeat is not proof of a cold compile.Tested
7d14d49:cargo build --release -p xclpassed;cargo test --workspace -- --test-threads=4reported 891 passed, 0 failed, 42 ignored. Exact-record Direct-DXIL translation and validation translated one CS with zero unsupported programs, validator failures, panics or timeouts.1404420b38db8597(CS_PedStandardSkinning_3). Direct produced 264,408-byte DXIL; HLSL produced 395,152-byte DXIL. Without vendor cache control, repeat times collapsed to milliseconds despite D3D12 accepting the cache-disable request.main:cargo test -p xcl --libpassed with 0 failures and approximately 23 ignored tests.4edddca: workspace build and--no-runpassed; argument validation passed. Cache control returned0x887A002D, so successful benchmark JSON/timing was not covered. Its broader GPU suite had failures without a matchedmainrun, so no regression attribution was made.git diff --check: passed on current head3eaf978.Regression run
Exact-head paired retail smoke from
scripts/smoke.ps1; same title and 60-second duration. These runs check startup/menu stability, not the benchmarked shader or world rendering.main:
PR:
The PR produced 100.4% of main frames and 100.5% of main peak commit, with no crash or device removal.
Not tested
AI use
@Anon64 on GitHub · 2026-11-24 21:30 UTC · original
Regression run for this PR: head
7d14d49, based onmain4178e88. RTX 3060 12 GB (581.80, wave32), Windows 11 26200, release,XCL_NETWORK=0, A pressed every 4 s from 20 s,scripts/smoke.ps1on a retail title for 60 s, back to back with themainrun.main
4178e88:this PR:
No device removals or crashes; 101 % of main's frames, 99 % of its peak commit.
Not tested: the whole suite; the new
xcl shadersbenchmark itself (the title run does not use it).Written with Claude Code (Claude Opus 5.5) from runs on this machine.
@Daydream3r on GitHub · 2026-11-24 21:21 UTC · original · edited 2026-11-24 21:43 UTC
Independent Windows/NVIDIA validation of exact head
7d14d49b664b8053d36f3b7abeef40bb48e2e368, part of #1269. Build and tests pass here, but the apparent cache reuse below prevents me from treating the reported median as a cold driver compilation time on this machine.Setup and checks
cargo build --release -p xcl: passed.cargo test --workspace -- --test-threads=4: 891 passed, 0 failed, 42 ignored (debug). Three explicit SKIPPED checks, included in the passed count:gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware(no wave64),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).XCL_SAMPLE_*unset, so optional external-data fixtures are not coverage of the retail pack.git diff --check: passed; checkout clean, no local code patches.xcl shaders <pack> --direct --hash 1404420b38db8597 --windows 4 --split 1 --validate --dump <local-dir> --json: 1 CS translated, 0 unsupported, validator failures, panics or timeouts. Dumps stay local.Measured cache behaviour
Retail 1.0.2.1 record
1404420b38db8597,CS_PedStandardSkinning_3, release build. Commands:XCL_HEAP_WINDOWSandXCL_DIRECT_DXILunset. Both commands succeed, includingShaderCacheControl; no HLSL fallback for the direct command.Three further fresh processes, direct backend, identical command except
--repeat 1, give driver times 0.0015910, 0.0016459, 0.0016424 s. New processes alone therefore do not restore the initial multi-second cost here. This is consistent with cache reuse even though cache disable was accepted. I have not isolated which cache is responsible, and do not claim that the initial slow samples are proven cold or that the medians measure compiler speed. No NVIDIA profile settings or shared shader caches were changed/cleared.Microsoft documents
IMPLICIT_DRIVER_MANAGEDoperations as hints: https://learn.microsoft.com/en-us/windows/win32/api/d3d12/ne-d3d12-d3d12_shader_cache_kind_flags . The measurement tool needs a verified coldness procedure or an explicit limitation before these medians can support cold-compile comparisons on this setup. The repeated-PSO loop/cache-control mechanism already exists on main; the direct backend extension makes the same issue observable for direct DXIL too.Regression run
Same retail title, 60 s, isolated title-data and DXIL-cache copies, no input beyond the account picker. The main block is reused unchanged from the earlier same-session run of this PR's base; the head block is a new run at the exact head above. This checks startup/menu stability, not the selected skinning shader's runtime output or world rendering.
main:
PR:
Not tested
AMD/Intel, native wave64, Linux/Wine, a genuinely verified cold driver-cache configuration, full-pack precompile, GPU output parity of this retail shader, or world rendering. This is a measurement/test report, not an approval review.
AI use
Codex desktop, GPT-6 (exact variant not exposed): source inspection, commands, actual local measurements/tests and this report.
Follow-up: a per-application NVIDIA cache-off control works here
Same head, adapter, driver, DXC, record, four windows and split wave64. An experimental call to
NvAPI_D3D1x_DisableShaderDiskCachereturned success but did not remove the fast repeat behaviour. A temporary application profile withPS_SHADERDISKCACHE_ID=OFF, associated with a unique sibling copy of the exe before launching it, did. No shader salt or shader code changes.A local
scripts/measure-nvidia-pso.ps1wrapper now creates that profile, invokes this PR's measurement command, and deletes the profile and copied exe infinally. Interleaved fresh processes,--repeat 3each:The copied exe without the temporary profile, same record and
--repeat 3, gave 2.5808741, 0.0016611, 0.0016399 s. Thus the application-profile control eliminates the observed collapse to millisecond repeat times on this setup. This is evidence for the controlled procedure on one record, not a guarantee for all drivers or a GPU execution benchmark. Direct/HLSL DXIL sizes remain 264408/395152 B.The wrapper and docs are a separate uncommitted local patch on this head, 186 added lines, not changes to your branch. Four profile-lifetime checks passed under both Windows PowerShell 5.1 and PowerShell 7. The real missing-record failure also removed its profile and exe; an independent NVAPI query confirmed all six wrapper-created profiles were absent afterwards. Windows PowerShell 5.1 also completed a real HLSL measurement successfully. Full workspace suite rerun on the local tree: 891 passed, 0 failed, 42 ignored, same three explicit skips listed above. No runtime Rust source changes, shared cache deletion, or changes to other application/global profiles. The wrapper is not committed or published as a PR yet.
@futurepro62 on GitHub · 2026-11-24 22:22 UTC · original
Adding an AMD GPU (RDNA2, native wave64) to the report above, which has none, with an NVIDIA run alongside. Tested exact head
7d14d49(on its base4178e88).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip pso_measurement_compiles_an_exact_synthetic_record: 889 passed, 0 failed, 42 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.#[test]functions in the diff.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4: 891 passed, 0 failed, 42 ignored. SKIPPED:heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows),pso_measurement_compiles_an_exact_synthetic_record(cannot disable the driver cache (Windows Developer Mode is required): The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D)).--skipon NVIDIA. Both fail on main7f7e768too, not because of this PR: underXCL_REQUIRE_GPU=mesh,runner::skip_testturns their skips into failures.heap_window_out_of_memory_falls_back_to_the_switch_formskips whenXCL_HEAP_WINDOWSis unset (#1651), andshaders::tests::pso_measurement_compiles_an_exact_synthetic_recordskipped because Developer Mode was off. The AMD run does not setXCL_REQUIRE_GPU, so there both just print SKIPPED.Not tested
AI use
@DavidM1911 on GitHub · 2026-11-25 00:05 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored.Thanks!
@JJAutoCompare on GitHub · 2026-11-25 04:38 UTC · original
XCL PR #1802 — Windows / Arc A770 verification
Clean detached head
4edddca04e9be3735b4082293f376a88add07e01on STOR-WINLAB. Windows 11 Enterprise Evaluation x64 (10.0.26200.9974), AMD Ryzen 7 3800X, Intel Arc A770 (driver 32.0.101.9175). DXC 1.9.2609.5, rustc 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc), debug profiles without debug info.Tested
cargo build --workspaceandcargo test --workspace --no-runexited 0 outside the A770 lock. Compiled 19 test executables.cargo test -p xcl --lib shaders::tests::a_flag_without_its_value_is_an_error -- --exact --nocapturewithXCL_ADAPTER=NONE_CPU_ONLY: 1 passed, 0 failed, 0 ignored, 0 skips. Rejected a missing backend value andauto.cargo test -p xcl --lib shaders::tests::pso_measurement_compiles_an_exact_synthetic_record -- --exact --nocaptureunder the A770 lock: harness reported 1 passed, 0 failed, 0 ignored, with 1 explicit skip. Cache control returned0x887A002D(missing or mismatched SDK component) before HLSL PSO creation.xcl.exe shaders pr1802-compute.bin --measure-pso 2ef201b72e3e2756 --backend hlsl --repeat 3 --jsonand the same command with--backend directboth exited 2 at cache control and emitted zero JSON bytes.cargo test --workspace --no-fail-fast -- --test-threads=4under the A770 lock withRUST_TEST_NOCAPTURE=1exited 101. Summed 20 result lines (19 binaries and doc tests): 950 passed, 25 failed, 45 ignored.Workspace failures and skips
Of 24 GPU library failures, 20 returned
0x80070057atCreateComputePipelineStateand four failed value assertions. The test-title e2e failed dynamic depth bias check #94 (blue pixel where green was expected). The log contains 25 lines starting withSKIPPED, separate from harness counts, including 17 for wave64 and one for PSO cache control. Skips provide no coverage.Not tested
Successful benchmark JSON, PSO timing, cold compilation, a matched
mainrun, retail-title smoke, or other adapters. No regression attribution was established.AI use
T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against
pr1802-suite.logand published.@Toons29 on GitHub · 2026-11-25 13:46 UTC · original
Regression run of
3eaf9780on the retail title, for this PR's Regression run section. Both blocks are fromscripts/smoke.ps1as printed, not edited:mainon1a0bbe3a, this PR on its head commit with no uncommitted changes, same title and time.Against the limits in CONTRIBUTING.md: 100 % of
main's frames, 100 % of its peak commit, no crash, no device removal.AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0,
cargo build --release -p xcl, 60 s,XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.AI use: Claude Code (Claude Opus 5.5) built both trees and ran
scripts/smoke.ps1; a script posted this right after the run, with both blocks exactly as printed.@DavidM1911 on GitHub · 2026-11-26 06:19 UTC · original
Re-verification on RTX 3060 Ti (Windows 11): still a merge conflict with current
mainon the new head — needs another rebase before it can be tested.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.