Repository navigation
Test inline FP16 multiplicands in VOP3P dot products - #1
Open
MichaelSmithAI wants to merge 14 commits into
Open
MichaelSmithAI wants to merge 14 commits into
MichaelSmithAI wants to merge 14 commits into
Conversation
The two products of f16 halves, exact in f32, summed with the f32 addend (v_dot2c: the destination). VOP3P op_sel/op_sel_hi pick each half, neg_lo/neg_hi negate them and clamp saturates; modifiers not modelled are refused. Tests run each case on the host GPU and WARP.
Marvisak#157 adds a vop3p helper without modifiers to the same file; a distinct name and a place before the file's last test let the two changes merge.
The two products of f16 halves, exact in f32, summed with the f32 addend (v_dot2c: the destination). VOP3P op_sel/op_sel_hi pick each half, neg_lo/neg_hi negate them and clamp saturates; modifiers not modelled are refused. Tests run each case on the host GPU and WARP.
RDNA2 rounds the exact sum of the two f16 products and the f32 addend once (measured on gfx1036 in Marvisak#465), where summing the products first rounds twice: (1, 2^-12) . (1, 2^-12) - 1 gives 2^-24 on the hardware and 0 that way. The sum is now Boldo and Melquiond's correctly rounded sum of three: two TwoSums, their errors added with rounding to odd, then one final rounded add. A zero tail keeps the sign of an all-negative-zero sum, and an infinite or NaN term gives the plain sum.
Baconzido
force-pushed
the
shaders/v-dot2-f32-f16
branch
from
November 24, 2026 12:40
1d20123 to
2b0d00b
Compare
The two products of f16 halves, exact in f32, summed with the f32 addend (v_dot2c: the destination). VOP3P op_sel/op_sel_hi pick each half, neg_lo/neg_hi negate them and clamp saturates; modifiers not modelled are refused. Tests run each case on the host GPU and WARP.
RDNA2 rounds the exact sum of the two f16 products and the f32 addend once (measured on gfx1036 in Marvisak#465), where summing the products first rounds twice: (1, 2^-12) . (1, 2^-12) - 1 gives 2^-24 on the hardware and 0 that way. The sum is now Boldo and Melquiond's correctly rounded sum of three: two TwoSums, their errors added with rounding to odd, then one final rounded add. A zero tail keeps the sign of an all-negative-zero sum, and an infinite or NaN term gives the plain sum.
Baconzido
force-pushed
the
shaders/v-dot2-f32-f16
branch
from
November 24, 2026 22:16
2b0d00b to
bdced0f
Compare
Baconzido
force-pushed
the
shaders/v-dot2-f32-f16
branch
from
November 25, 2026 22:31
bdced0f to
693468a
Compare
Baconzido
pushed a commit
that referenced
this pull request
Nov 25, 2026
Exercise the descriptor cursor regression on the actual heap capacity
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.
Add regression coverage for the inline FP16 multiplicands of the VOP3P
v_dot2_f32_f16instruction. The portable test compares emitted DXIL for inline and packed-register operands with normal and swapped half selection. The GPU test checks that an inline 0.5 with packed (2, −4) and accumulator 1 returns 2 with the normal selectors and −1 with the swapped selectors.The target branch's
7e969e5keeps inline operands of the accumulating VOP2 formv_dot2c_f32_f16refused until RDNA2 hardware measurements establish how they fill the two halves. The resolved branch preserves that safeguard and the single clamp. This diff adds tests only.All nine focused Win64 dot-product tests passed on RTX 4090 under Wine, including the target's accumulating-form refusal, and repository policy passed. Synthetic shaders only. AI assistance was used.