shader: lower v_mad_u64_u32 and v_mad_i64_i32 in the direct C++ compute path #3123

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

The direct compute frontend refused the 64-bit multiply-adds. They now
follow gfx2hlsl.py's mad64: D = S0 * S1 + S2 modulo 2^64 with zero- or
sign-extended 32-bit factors and a VGPR- or SGPR-pair S2. The unsigned
form writes the carry-out of the 64-bit add to its VOP3B SDST through
the lane-mask path of the carry adds, and carry_destination names that
SDST for the symbolic state. The signed form is lowered only with the
null SDST, and inline float factors are refused, as in gfx2hlsl.py.

tests/native_mad64_check.py dispatches products just below 2^64 so that
exactly the odd lanes carry, checks the module, three refusals and
three mutated references.

Refs #3000. AI-assisted.

Co-Authored-By: Claude Opus 5.5 [email protected]

Conflicts:

src/gfx1013_direct_compute.inl

The direct compute frontend refused the 64-bit multiply-adds. They now follow gfx2hlsl.py's mad64: D = S0 * S1 + S2 modulo 2^64 with zero- or sign-extended 32-bit factors and a VGPR- or SGPR-pair S2. The unsigned form writes the carry-out of the 64-bit add to its VOP3B SDST through the lane-mask path of the carry adds, and carry_destination names that SDST for the symbolic state. The signed form is lowered only with the null SDST, and inline float factors are refused, as in gfx2hlsl.py. tests/native_mad64_check.py dispatches products just below 2^64 so that exactly the odd lanes carry, checks the module, three refusals and three mutated references. Refs #3000. AI-assisted. Co-Authored-By: Claude Opus 5.5 <[email protected]> # Conflicts: # src/gfx1013_direct_compute.inl
The direct compute frontend refused the 64-bit multiply-adds. They now
follow gfx2hlsl.py's mad64: D = S0 * S1 + S2 modulo 2^64 with zero- or
sign-extended 32-bit factors and a VGPR- or SGPR-pair S2. The unsigned
form writes the carry-out of the 64-bit add to its VOP3B SDST through
the lane-mask path of the carry adds, and carry_destination names that
SDST for the symbolic state. The signed form is lowered only with the
null SDST, and inline float factors are refused, as in gfx2hlsl.py.

tests/native_mad64_check.py dispatches products just below 2^64 so that
exactly the odd lanes carry, checks the module, three refusals and
three mutated references.

Refs #3000. AI-assisted.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

# Conflicts:
#	src/gfx1013_direct_compute.inl
This pull request has changes conflicting with the target branch.
  • src/gfx1013_compute_native.cpp
  • src/gfx1013_direct_compute.inl
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/3123/head:github-bot/gh-3004'
git switch 'github-bot/gh-3004'

Merge

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