Scripts: run the compile-time benchmark and compare two runs (#1269) #2106
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!2106
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2106"
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?
@BetterJdue on GitHub · 2026-11-25 04:25 UTC · original
BetterJdue:compile-bench-scripts→main· +1115 −0 · 7 files · 6 commits · draftStacked on #2100 (itself stacked on #1763); only the top three commits belong here:
dae9b63,7d3f7f6,61dd6dc.A script to run the compile-time benchmark of #2100 and one to compare two runs, plus a set of only the large programs and a summary ranked by DXC time, so the slow tail shows next to the median. Scripts and tests only: nothing in
crates/xcl/src. 6 files changed, 431 insertions(+), 12 deletions(-), a little over the 400-line target; the large set (7d3f7f6) can go to a PR of its own if that is preferred.Part of #1269
What is in it
scripts/compile_bench.ps1(dae9b63): builds release and runs the benchmark one compile at a time (-Set full|large|small,-Reps,-DxcArgs); writes the JSON, CSV and log totarget\compile_bench\<commit>and warns when the tree has uncommitted changes.scripts/compile_bench_compare.pyand its test (dae9b63,61dd6dc): compares two runs program by program (sizes, median DXC time, head / base ratio, geometric mean), says when the two environments make the times incomparable, and marks any size change and any time change beyond the run-to-run noise (5 % unless--noisesays otherwise).crates/xcl/tests/compile_bench/measure.rs,main.rs(7d3f7f6):XCL_COMPILE_BENCH=large, 18 programs (base, divergent and resource programs at 8 000, 20 000 and 40 000 operations, native wave64 with 1 memory window and split wave64 with 4); every run prints the programs slowest first and a summary (median, nearest-rank p90, maximum, total, the slowest tenth's share), which also goes into the JSON.README.md: a paragraph under the tests.Tested
cargo test --workspace --no-fail-fast -- --test-threads=4on61dd6dc(debug): 764 passed, 3 failed, 41 ignored. The failures are not from this PR:placed_title_textures_share_vram_and_preserve_pixels,transitions_apply_when_their_list_is_submitted,d32s8_targets_take_their_own_size_of_video_memory, the same RDNA2 texture failure and its two lock-poisoning followers as in #2100. SKIPPED: none.compile_benchtests in that run: 16 passed, 0 failed.python -I -m unittest discover -s scripts -p "test_compile_bench_compare.py": 8 tests, OK.1297b3d's copy of these files, which is the same code) and three to the comparison (the noise ignored, the size check dropped,--noisenot passed on) each make a test fail.compile_bench.ps1 -Set large, release, 3 compiles per program, on1297b3d: the same benchmark code asdae9b63and7d3f7f6, but on a newermain(4178e88) whose recompiler emits different HLSL than this PR's base, so these numbers show the shape of the tail, not this head's values: 18 programs, DXC median 24.8 s, p90 155.6 s, maximum 497.5 s (divergent-40000-split-4win: 26.6 MB of HLSL, 33.3 MB of DXIL); the 2 slowest take 47 % of the 1385 s.compile_bench.ps1 -Set small(6 programs of 0.1 to 0.25 s) 5 times on7d3f7f6, the programs' median DXC times moved by at most 1.9 %; within one full-set run (ae43075,3df53eb) the 3 compiles of a program spread by 2.8 and 1.4 % (median), single compiles by up to 17 %. 5 % is a margin chosen above that, not a measured bound.Not tested
scripts/smoke.ps1: none used; scripts and tests only.AI use
@DavidM1911 on GitHub · 2026-11-25 06:02 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
@RavenCurseBurg on GitHub · 2026-11-25 11:43 UTC · original · edited 2026-11-25 11:50 UTC
Tested
61dd6dcfe80e40dda56573876cc71612949b8a2aon Windows 11 24H2 (26100.9711), i7-13700, Python 3.14.3.Tested
python -B -m unittest discover -s scripts -p test_compile_bench_compare.pypassed all 8 tests (0 failures, 0 skips).scripts/compile_bench_compare.py, I compared two synthetic JSON reports for the same program on an identical recorded environment. Changing only the head row'sdxc_argsfrom-O1to-O3produced byte-identical text. Changing its synthetic median from 10 ms to 5 ms then printedDXC time 0.500without a settings note. Changing the profile from release to debug did produce a note. The timing values are fixture inputs.Not tested
DXC compilation, actual shader performance, Rust/GPU workspace tests or retail data.
AI use
OpenAI Codex (GPT-6) ran the tests, wrote the synthetic comparison and follow-up patch, and prepared this report.
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.