xcl run: xcl replay variants (--sub, --profile, --split, --loops) #2435
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!2435
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2435"
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?
@madaraXor on GitHub · 2026-11-25 18:38 UTC · original
madaraXor:replay-variants→main· +3267 −1 · 16 files · 7 commits · openWhat makes a replay an experiment rather than a reproduction: change the translated HLSL, the profile or the split flag without a build, and count loop passes. With the README. Part of #675.
Stacked on #2434; only the top commit belongs here.
What is in it
replay.rs:--sub FROM=>TO||...substitutes text in the HLSL of every stage it occurs in (asXCL_DEBUG_PS_SUBdoes in a run; one that matches nothing is reported);--profilecompiles the stage of that kind with another profile;--split 0|1;--loops(count_loops): a counter in every[loop]of the pixel shader.replay/gpu.rs: the counters' buffer and image, and their report: lanes, passes and the most in a lane, the same for each of the first 16 loops, the most per pixel as an image, and eight debug words (xcl_d0..xcl_d7) a substitution may set, as their most, their OR and the lanes they are not 0 in.main.rs: the help.README.md: capturing and replaying one draw.--profile ps_6_7); options.--splittakes exactly 0 or 1;--subwith nothing before=>is refused; a--profilethat matches no stage prints a warning. Tests inoptions_parse. Each loop's sum has a high word with the carry, as the overall sum has (a 4096×4096 target at 256 passes a pixel is 2^32), the buffer is read byLoopCounts::read. Test:loop_counts_read_with_their_high_words.Tested
--sub,--loopsgave 782 passes a lane on average on a local branch with the same code (783.6 with this stack) and showed which of the shader's loops ran away (the march after the light list, not the list); debug words then showed that only helper lanes were left in its mask, their state reading as 0 from the second pass on. That is the finding behind #2305. With #2305's two changes in the translator (local branch), the same replay with the full budget: 7.2 passes a lane, 13.8 ms of GPU time.cargo test --workspace --no-fail-fast -- --test-threads=4onedcc0b7: 1439 passed, 6 failed, 46 ignored. The failures:gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1(seed 540),hle::kernelx::tests::xmem_virtual_query_marks_cpu_readable_memory(#650) and the e2e teststest_title_runs_and_game_folder_is_untouched,test_title_draws_with_a_root_signature_under_the_debug_layerandtest_title_runs_under_the_debug_layer_with_dred, which fail onmaine1d84b7on this machine too (its whole suite: 1416 passed, 7 failed, 46 ignored);hle::d3d12x::vram::tests::d32s8_targets_take_their_own_size_of_video_memoryfailed in this whole-suite run; it fails in the whole-suite run ofmaine1d84b7on this machine too. SKIPPED: the six per-lane cases off16_programs_on_the_gpu/f32_programs_on_the_gpu(refused),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows)Regression run
scripts/smoke.ps1, 60 s, release builds, the same title on the same day.main:
PR:
Not tested
--loopson compute shaders (pixel shaders only; the output says so).--spliton a wave64 pixel program.AI use
🤖 Generated with Claude Code
@SlopTart on GitHub · 2026-11-25 19:46 UTC · original
gpu_suite (cold cache): 160 passed / 4 failed, no crashes. Three are the known baseline trio on this lane; the fourth isgpu_promoted_uav_clear_values_pass_create_committed_resource, newly red on main since #2280 (report), unrelated to this PR.Targeted run of
a_capture_made_here_replaysanda_replay_counts_loop_passes_and_substitutes: 2 passed.@DavidM1911 on GitHub · 2026-11-25 19:54 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!
@madaraXor on GitHub · 2026-11-25 23:44 UTC · original
Thanks, fixed in the force-pushed commit:
--splitaccepts exactly0or1;2,yes, an empty value or01are usage errors.--subwith nothing before=>(e.g.=>x, also insidea=>b||=>x) is an error. Replacing with nothing (a=>) is still allowed.--profilethat matches no stage of the capture now prints aREPLAY WARNINGnaming the capture's stages.options_parse.@madaraXor on GitHub · 2026-11-25 23:58 UTC · original
About the red
Build and teston this push: no test failed. The--libtest process ended with0xc0000005partway through the run, in tests this PR does not touch, afterreplay::tests::a_capture_with_a_gs_is_refusedhad passed.Here, with
XCL_ADAPTER=warp(no GPU, like the CI),cargo test -p xcl --lib -- replay capture --test-threads=4passes twice in a row: 17 passed, and the two GPU replay tests printSKIPPED … no GPU. The whole suite on a GPU is in the description.Could someone with rights re-run the failed job? Pushing an unchanged commit again would not start a new run.
Claude Code (Claude Opus 5.5).
@DavidM1911 on GitHub · 2026-11-26 02:12 UTC · original
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
@bmjask on GitHub · 2026-11-25 20:49 UTC · original · reviewed
P2: --split parses as value == "1", so invalid values such as --split 2, yes, or typos silently become false despite usage promising 0|1. Validate exactly 0/1 and add parser tests. Also reject an empty --sub FROM: --sub "=>x" calls replace("", to) and inserts at every boundary, potentially creating huge/invalid output. --profile with no matching captured stage should likely warn. Current Windows Build/test fails, so investigate/rerun before merge.
@luckyteagirl on GitHub · 2026-11-26 07:47 UTC · original · reviewed
replay.rs:218–223gives the overall loop-pass sum a high word on 32-bit wrap, but each per-loop sum is oneuint(InterlockedAddat16 + 8*k).replay/gpu.rs:629–633then prints that wrapped word as#k: ... passes. A 4096×4096 fullscreen replay with 256 passes per pixel in one loop has exactly2^32passes: the overall line reports 4,294,967,296 while#0reports 0 passes, most 256. This is within the stated 65,536-per-lane loop budget and can make the per-loop diagnosis misleading on high-coverage captures.Could per-loop totals use the same split-word carry as the overall sum, with the decoder and buffer offsets updated, and a synthetic decode test for low=0/high=1? This is exact-head source/arithmetic review at
9e602989cec27ede32dca6d5a0794568ecc9c947; I have not run a 4K GPU replay. AI-assisted review with Codex.9e602989cetoedcc0b7e29@madaraXor on GitHub · 2026-11-26 10:26 UTC · original
Thanks, fixed (force-pushed): each loop's sum now carries into a high word, as the overall sum does.
LOOP_WORDS).LoopCounts::read. Test:loop_counts_read_with_their_high_words, with low 0 / high 1 = 2^32 for both the overall and a loop's sum, and loops or debug words that never ran left out.loops_are_counted_before_the_returnchecks the new offsets and that the last debug counter lies inside the buffer.a_replay_counts_loop_passes_and_substitutespasses on the RX 6700 XT.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.