Repository navigation
feat(shader): implement v_dot2_f32_f16 - #576
Conversation
VOP3P 0x13 threw "VOP3P opcode is not implemented". It computes src0.lo * src1.lo + src0.hi * src1.hi + src2 like v_dot2c_f32_f16, with the VOP3P op_sel/op_sel_hi and neg_lo/neg_hi modifiers on the packed f16 sources, neg on the f32 accumulator and clamp. op_sel and neg_hi on the accumulator throw. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks. The test shader disassembles (llvm-mc, gfx1030) to the four forms you describe, and the two refusal words are One small change: the accumulator's
A note, not a blocker: the expected values come from a CPU model of the same two fmas, so the test pins the order and rounding rather than checking them against hardware. That's the same assumption main already makes for PPSA21564 doesn't use |
Its meaning for the f32 accumulator is not known, like op_sel and neg_hi, and the integer dots already refuse anything but op_sel_hi set on every source. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks, that's the change I had in mind. I checked the three refused words with llvm-mc (gfx1030, since gfx1013 has no v_dot2_f32_f16): 0xcc13000a is The new push needs workflow approval again before CI runs. Ready to merge from my side once it's green. |
What
v_dot2_f32_f16(VOP3P 0x13) threwVOP3P opcode is not implemented.It computes
src0.lo * src1.lo + src0.hi * src1.hi + src2as two f32 fmas in the same order as the existingv_dot2c_f32_f16. The f16 products are exact in f32, so only the two additions round.op_sel/op_sel_hiselect the halves of the packed sources, andneg_lo/neg_hinegate them.negnegates the f32 accumulator, andclampclamps the result.op_selandneg_hion the accumulator throw in the decoder, since their meaning for the f32 operand is not known.tools/progress.py: VOP3P 29/29.Tested
Windows 11, MinGW GCC 15.2.0 r7, NVIDIA Vulkan,
-DANYPS5_ENABLE_SPIRV_TOOLS=ON.New
agc_driver_float16_dot, 64 lanes. The inputs are 8 edge rows (signed zeros, infinities, inf * 0, NaN, f16 max with a large negative accumulator) plus random normal values. Each lane checks four forms against a CPU fma model:op_selswapping the halves of src0;neg_lo/neg_hiwith a negated accumulator;clamp.The test also checks that the decoder refuses accumulator
op_selandneg_hi.Full
ctest: 213/214 pass.agc_shader_memoryfails without this change too; fix(shader): splat the bindless table hit into a bool vector for SPIR-V 1.3 #574 fixes it.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code