fix(shader): lower single-lane and SALU-combined wave64 section reductions #345

Open
github-bot wants to merge 1 commit from github-bot/gh-262 into main AGit
Owner

Record per-lane uniform shapes (Section::lane_shapes) for whole-wave section VGPRs whose lanes do not all agree (for example wave64 reductions combining the two 32-lane halves into lane 63 only) and evaluate constant-lane v_readlane_b32 reads of those lanes (Lower::section_lanes) at the section site while keeping reads of incomplete or non-constant lanes refused (NO_SHAPE). Follow associative SALU combinations of disjoint reduction terms, constant-lane v_writelane_b32, and v_sub_co_u32 / v_subrev_* exclusive prefix differences in emit::wave, recording unshaped carry-out masks in Lower::lane_fail.

Refs #258

Record per-lane uniform shapes (Section::lane_shapes) for whole-wave section VGPRs whose lanes do not all agree (for example wave64 reductions combining the two 32-lane halves into lane 63 only) and evaluate constant-lane v_readlane_b32 reads of those lanes (Lower::section_lanes) at the section site while keeping reads of incomplete or non-constant lanes refused (NO_SHAPE). Follow associative SALU combinations of disjoint reduction terms, constant-lane v_writelane_b32, and v_sub_co_u32 / v_subrev_* exclusive prefix differences in emit::wave, recording unshaped carry-out masks in Lower::lane_fail. Refs #258
Record per-lane uniform shapes (Section::lane_shapes) for whole-wave section VGPRs whose lanes do not all agree (for example wave64 reductions combining the two 32-lane halves into lane 63 only) and evaluate constant-lane v_readlane_b32 reads of those lanes (Lower::section_lanes) at the section site while keeping reads of incomplete or non-constant lanes refused (NO_SHAPE). Follow associative SALU combinations of disjoint reduction terms, constant-lane v_writelane_b32, and v_sub_co_u32 / v_subrev_* exclusive prefix differences in emit::wave, recording unshaped carry-out masks in Lower::lane_fail.

Refs #258
github-bot referenced this pull request from a commit 2026-11-27 15:59:39 +00:00
This pull request has changes conflicting with the target branch.
  • crates/victory-gpu/src/native/split_wave_tests.rs
  • crates/victory-shader/src/emit/lower.rs
  • crates/victory-shader/src/emit/wave.rs
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.
git fetch -u origin '+refs/pull/345/head:github-bot/gh-262'
git switch 'github-bot/gh-262'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-262'
git switch 'github-bot/gh-262'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-262'
git switch 'github-bot/gh-262'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-262'
git switch 'main'
git merge --squash 'github-bot/gh-262'
git switch 'main'
git merge --ff-only 'github-bot/gh-262'
git switch 'main'
git merge 'github-bot/gh-262'
git push origin 'main'
Sign in to join this conversation.
No description provided.