Repository navigation
Conversation
…indows-only halves tests (pragyaangaur#497) On hardware, v_writelane_b32 ignores EXEC, so a write inside a divergent branch still updates the target lane even if that lane is inactive in the branch. Linearizing such a region via SkipGuard, SESE diamond, or lockstep-loop predication causes the merge select(edge_act, ...) to discard the write when the target lane was inactive (pragyaangaur#497). - Refuse predication in match_skip_guard, match_sese_diamond, and match_lockstep_loop when any block in the region contains v_writelane_b32, allowing pragyaangaur#435's whole-wave retry to handle it. - Gate Windows-only GPU execution helpers/tests in halves_tests.rs with #[cfg(windows)] so cargo test -p victory-shader builds and passes natively on macOS. - Add regression test predicated_branch_refuses_writelane_so_whole_wave_retry_can_take_it.
Owner
|
Thank you, and thanks for the test. #506 landed a few minutes earlier with the same fix for #497's writelane case (a lane write in a predicated block is refused so the whole-wave retry takes it), plus the Windows gate of the halves tests, so this one now overlaps it. I am closing it as superseded. If the not-predicating-the-region approach catches a program that the refusal in #506 does not, please send it as a small PR with that program as a test. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
v_writelane_b32data loss under selective predication ([macOS / M3 Max] main 965b3cf draws the world black (cause unknown); its translator also refuses 27 more shaders the game uses and 5 of the BVH builder's #497): On hardware,v_writelane_b32ignoresEXEC, so a write inside a divergent branch still updates the target lane even when that lane is inactive in the branch. Linearizing aSkipGuard, SESE diamond, or lockstep-loop region containingv_writelane_b32causes the mergeselect(edge_act, ...)to discard the write for inactive lanes. Refuse predication when any block in the region containsv_writelane_b32, letting whole-wave retry (feat(shader): retry refused 64-thread wave64 compute with whole-wave control flow #435) handle it instead.halves_tests.rs: Gatedifferences_with_bufferand the 8 GPU execution tests usingdifferences_with/Host/validatorwith#[cfg(windows)]socargo test -p victory-shadercompiles and passes on macOS.predicated_branch_refuses_writelane_so_whole_wave_retry_can_take_it.Testing
cargo test -p victory-shaderon macOS: 270 passed, 0 failed, 2 ignored (+ 3 passed inresource_tracking).cargo clippy -p victory-shader --all-targets --target x86_64-pc-windows-gnullvm -- -D warnings(with and without--all-features): clean.cargo xtask policy: passed (283 files ok).