Repository navigation
Conversation
6a760ae to
661f7fd
Compare
Melow-code
left a comment
There was a problem hiding this comment.
No clear bug in the dominance proof or the WREXEC exit. Four points:
dominatesassumes block 0 is the entry — the loop stops onb == 0. If the entry has another index, the loop does not end. Testself.idom[b] == binstead.- Irreducible cycles:
bodyholds natural loops only. A write in a cycle without a single header is in nobody, so the check passes vacuously. Is an irreducible CFG refused before this point? - The mixed-mask SCC op list has ANDN1 but not ORN1. If
opcan come fromS_ORN1_SAVEEXEC_B32, that form keeps the old uniform SCC. - The 111 new programs need a per-lane DXIL vs HLSL comparison with random inputs before merge. The GPU tests cover synthetic programs only.
Hardware test report — commit
|
|
Independent check of 661f7fd on an RTX 3080 Ti (621.35), Windows 11 build 26300, Rust 1.99.1 MSVC debug, DXC 1.8.2502.11. I ran the loop fixtures through the production console shader translator with With the loop analysis from the stacked parent, the latch case refused per-lane translation. AI-assisted. Codex (GPT-6 family, exact variant unavailable) extended and ran the check and drafted this report. |
|
@ruipedro-pinheiro thanks for the careful read. On the four points:
We'll reply here with the new heads. AI use: Claude Code (Claude Opus 5.5) wrote this. |
661f7fd to
177785a
Compare
|
@ruipedro-pinheiro the review fixes are pushed. This PR is now
AI use: OpenAI Codex (GPT-6.2) wrote the fixes and the tests and ran them; Claude Code (Claude Opus 5.5) wrote this. |
177785a to
5d0c1f0
Compare
|
Correction to the head above: #1866 was merged at AI use: Claude Code (Claude Opus 5.5) wrote this. |
|
On #1912 at The first differing word in each of the six runs was a texture W component. HLSL stored In The HLSL path gives DXC an ordinary @eizispark, could you run the 67 native-wave64 rows on your RX 9070 XT with the default seeds and post the summary from AI use: Claude Code (Claude Opus 5.5) and Codex helpers built the replay harness, ran the readbacks and the DXC check on our machine, and wrote this comment. |
|
Verification on RTX 3060 Ti (Windows 11): merge conflict with current |
Arc A770 verification for PR #1912PR #1912 was open at Tested
$testExe = 'L:/XclTooling/pr1778-2e2ee55-20261125-020159/target/debug/build/xcl/77aca8ccb20e299f/out/xcl-77aca8ccb20e299f.exe'
& $testExe --exact gpu::recomp::lane_masks::tests::dominance_ends_at_the_entry_even_when_it_is_not_block_zero --nocapture --test-threads=1
& 'L:/XclTooling/Invoke-ArcTest.ps1' -Test {
& $testExe --exact gpu::recomp::lower_dxil::tests::shrinking_loops_agree_with_the_hlsl_path_on_the_gpu --nocapture --test-threads=1
}
Not tested
AI use
|
ANDN1 and ORN1 only occur in EXEC forms, which record lane SCC before the plain bitwise path. Remove the unreachable ANDN1 plain case and exercise both real encodings across an EXEC restore.
A lane can use a dominating definition while it remains in every loop containing the write. A native wave32 loop header can also read its sole latch's definition on the back edge if no enclosing loop can carry an earlier value to the entry. Preserve the final zero SCC and mask on the sole empty-EXEC exit of a WREXEC self-loop. Check the reads in nested arms, lanes leaving a loop at different iterations and a read of the counter after exit. Compare both shrinking-loop kernels with HLSL on the GPU.
Use the same root and unreachable checks when constructing loop bodies and proving stale reads. Test a nonzero entry. The existing two-entry cycle test exercises the irreducibility refusal before a summary reaches the lowering.
5d0c1f0 to
c4f00e5
Compare
Part of #1269. Builds on #1866 (merged). Four commits, rebased onto
main6987e49: a test for SCC from the complemented SAVEEXEC forms (review point 3; it was meant for #1866, which merged first), this change, the dominance-walk fix from review point 1, and a fix for an interaction with #1888.What is in it
A per-lane read can use a dominating write when the reader stays inside every loop containing that write. For a native wave32 loop header, the first iteration sees the entry value and every returning lane has passed its sole latch. The proof excludes enclosing loops that could carry an earlier write back to the entry. On the sole empty-EXEC exit of a WREXEC self-loop, the final SCC and saved mask are both zero for the entire wave.
crates/xcl/src/gpu/recomp/lower.rs,lane_masks.rs: the dominance proof for reads inside loops and the WREXEC exit case.crates/xcl/src/gpu/recomp/lower_dxil.rs: GPU and CPU tests.README.md: one line on the new per-lane loop case.c4f00e5, after Per-lane: unsound whole-wave predicate checks (uniform_over ignores inactive lanes, S_CBRANCH_VCCZ/NZ ANDs with EXEC, SRC_SCC 253 unchecked) #1888 merged: its SCC check rejected the shrinking wave32 loop, because the analysis lost the fact that EXEC is empty on the loop's exit. The analysis and the lowering now share one check for aWREXEC_B32self-loop ending inS_CBRANCH_EXECNZ. On its sole fallthrough exit the copied mask is zero and SCC is uniformly false, so a later scalar read is safe.ANDN1arm in the mixed-mask list is removed, with a CPU test ofS_ANDN1_SAVEEXEC_B32andS_ORN1_SAVEEXEC_B32SCC.Tested
33b1b33e,6a760ae4raises native per-lane translation from 316 to 427 of 2,689 compute programs using four switch-selected memory windows. All 111 new admissions were previously refused for a stale value. Stale-first refusals fell from 154 to 43. The 316 previously accepted programs retained their DXIL byte counts. The 19 slowest remain refused by the whole-wave branch check, so none has per-lane DXIL to time.c4f00e5: the releasexcllibrary tests (four threads, nothing filtered) give 1104 passed, 0 failed, 26 ignored; 23 subcases in 13 tests skipped (20 need native wave64, 3 are forms the per-lane path refuses). The shrinking-loop GPU test also passes on its own, with no skip.5d0c1f0:cargo test --release --workspace -- --test-threads=4reported 963 passed, 0 failed and 43 ignored. Twelve tests printed 22 runtime skip messages for unsupported hardware or unimplemented paths. The new GPU fixtures ran with DXC 1.9 and no skip.Regression run
scripts/smoke.ps1, the same retail title for 60 s each, one after the other on the machine under Tested, release builds from clean trees.main6987e49(this PR's base):this PR,
c4f00e5:PR vs
main: 1298 / 1269 frames (102 %), peak commit 28392 / 27203 MB (104 %); device removals 0 and crashes 0 on the PR run, 0 and 0 onmain.Both runs use default settings, nothing else running; the PR was rebased onto
6987e49to resolve a conflict, and its four commits apply unchanged.Not tested
5d0c1f0).AI use
OpenAI Codex (GPT-6.2) wrote the change and the tests and ran the suite and the pack count. Claude Code (Claude Opus 5.5) edited this description and opened the PR.
🤖 Generated with Claude Code