victory-shader: decode f16 inline float constants in v_add_f16 wave reductions #16
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/16"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T05:31:28Z.
## Summary
Ports upstream
VIctorycommitf3578e3(#2493) intocrates/victory-shader/src/emit/wave.rs:240..=248:0.5,-0.5,1.0,-1.0,2.0,-2.0,4.0,-4.0,1/(2*pi)) when simulating operands ofv_add_f16in whole-wave reduction detection instead of decoding their f32 bit patterns whose low 15 bits are zero (which previously misclassified non-zero f16 inline constants as an additive zero identity).wave::tests::v_add_f16_inline_float_constants_are_not_zero_identity(using MiniVI'sShape::Active(Op::AddH, ...)).Rig Specs Tested On
Run Settings & Profile
ed78e8f(and verified viawindows-latestCI)Measurements & Verification
cargo +1.98.1-x86_64-pc-windows-gnu xtask policy(294 files ok)cargo +1.98.1-x86_64-pc-windows-gnu test -p xtask(6 passed)cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets -- -D warnings(0 warnings)cargo +1.98.1-x86_64-pc-windows-gnu clippy --workspace --all-targets --features diagnostics -- -D warnings(0 warnings)cargo +1.98.1-x86_64-pc-windows-gnu test -p victory-shader emit::wave -- --test-threads=1(22 passed; 0 failed, includingv_add_f16_inline_float_constants_are_not_zero_identity; fullvictory-shaderrun hit 3 pre-existing Windows 11 Build 26300 localdxil.dllvalidation mismatches inrect::tests&barycentric_testsout of 290 tests, verified onwindows-latestCI)Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-11-28T06:03:02Z.
Automated triage for the maintainers (not an approval).
Verdict:
merge-candidate· CI (check):passingTriage Review
VIctorycommitf3578e3incrates/victory-shader/src/emit/wave.rs. Insimulate(),Operand::Const(c @ 240..=248)is now decoded to the GFX10 IEEE-754f16bit patterns (0x3800,0xB800,0x3C00,0xBC00,0x4000,0xC000,0x4400,0xC400,0x3118for±0.5,±1.0,±2.0,±4.0,1/(2*pi)) whenname == "v_add_f16", preventing theirf32encodings (whose low 16 bits are0x0000for240..=247) from being misclassified as theOp::AddHzero identity.v_add_f16is the only 16-bit float reduction op modelled inOp/simulate().Operand::Const(128)(0) still falls through tocrate::resource::inline(128)(0), preserving valid+0.0identity detection.usize::from(c - 240)is bounded byc @ 240..=248against the 9-element array.v_add_f16_inline_float_constants_are_not_zero_identityexhaustively verifies128yieldsSome(Shape::Active(Op::AddH, v0_in, saved, 0))while240..=248all yieldNone.Automated triage review — not formal maintainer approval.
Generated with Antigravity CLI (
agy).