Shaders: xcl shaders --heavy ranks by instruction count #1543
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!1543
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1543"
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?
@speed-y on GitHub · 2026-11-24 17:27 UTC · original
speed-y:shaders/heavy-rank→main· +146 −9 · 3 files · 1 commits · openPart of #1269. Campaign tooling:
--heavy Nranks console programs by RDNA2 instruction count (compile-cost proxy) so measurement and DXC work can start from the heaviest shaders.What is in it
xcl shaders … --heavy Nincrates/xcl/src/shaders.rs(rank + distribution + JSON); help inmain.rs/README.mdheavy_ranks_programs_by_instruction_countTested
.\scripts\test.ps1: 777 passed, 0 failed, 41 ignored; SKIPPED GPU: 2 (no wave64), 1 (no heap windows)xcl shaders …\shaders.rpf --heavy 5(retail pack): 26698 programs, max 88863, top50_all_cs true, ~25.5 sRegression run
main:
this PR:
Not tested
AI use
--heavy, tests, smoke, and this PR@speed-y on GitHub · 2026-11-24 17:27 UTC · original
Part of #1269 — campaign tooling:
xcl shaders --heavy N.@nnonno91 on GitHub · 2026-11-24 17:35 UTC · original
Independent AMD and CLI test of
0284ec598b923028ec8950a1d16e3a30f96bd582.Tested
cargo build --workspace --lockedandcargo test --locked -p xcl --lib heavy_ranks_programs_by_instruction_count -- --test-threads=1passed.cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --show-outputreported 777 passed, 0 failed, 41 ignored, and one GPU skip (heap_window_out_of_memory_falls_back_to_the_switch_form, no heap windows). The bundled title test passed.xcl shaderscommands with the debug binary.--heavy 3 --jsonagreed for a folder and a synthetic RPF9 pack, including the name-order tie, stage labels, 8,001 largest PS, three programs above 8,000, and one above 20,000. The pack’s plain-text top three matched its JSON.--heavy 0 --jsonpreserved the summary with an empty ranking and--heavy 99 --jsonreturned all five programs, including the nested shader.Not tested
Retail packs, retail title runs, and compile or driver cost. The synthetic counts check ranking and output formatting.
AI use
OpenAI Codex (GPT-6 family, exact variant unavailable) generated the synthetic test inputs, ran the checks, and drafted this report.
@DavidM1911 on GitHub · 2026-11-24 19:13 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
@JJAutoCompare on GitHub · 2026-11-25 05:20 UTC · original
Empirical test report (
0284ec59)Verified xcl-dev/xcl PR #1543, “Shaders: xcl shaders --heavy ranks by instruction count,” at commit
0284ec598b923028ec8950a1d16e3a30f96bd582.Hardware / environment
Commands and results
cargo test --workspace --no-run— exit code 0. Cargo compiled the workspace test targets.cargo test -p xcl --lib shaders::tests::heavy_ranks_programs_by_instruction_count -- --exact --nocapture— exit code 0. 1 passed, 0 failed, 0 ignored, 0 skipped. Counts come from the libtest summary and lines beginning with SKIPPED, matched case-sensitively.Observed behavior
The added unit test passed. It builds two synthetic Xbox shader containers and verifies that the ranking returns both programs, with the seven-instruction program ahead of the three-instruction program. The test exercises byte parsing and RDNA2 instruction decoding without opening a D3D12 device, compiling a shader, or loading game data.
Not tested
The full GPU workspace suite and game smoke runs were omitted. The focused test covers the ranking helper. CLI argument handling, text and JSON output, and retail shader packs were outside this run.
AI use
Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against
pr1543-focused.logand published.@luckyteagirl on GitHub · 2026-11-26 09:29 UTC · original · reviewed
On
0284ec5, the descending index for p90 is computed as((n_prog - 1) as f64 * (1.0 - 0.9)) as usize. With 11 distinct programs ranked from 11 down to 1 instructions,10 * (1.0 - 0.9)evaluates to0.9999999999999998, then truncates to index 0. Both text and JSON report p90 = 11 (the maximum), whereas the formula's intended index 1 gives p90 = 10. The same boundary affects p99 with 101 programs.Could the selected percentiles use integer arithmetic for the intended descending rank, such as
(n_prog - 1) * (100 - percentile) / 100, with overflow-safe types? An 11-program fixture asserting p90 = 10 and max = 11 would catch this without changing the chosen percentile convention. I checked exact-head source and reproduced the arithmetic in Python; I did not run the XCL CLI on a synthetic pack.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.