2-Way Dot Product (Accumulate) Arithmetic

Compute a 2-element dot product of packed 16-bit values, accumulated into a 32-bit result.

Vendor-Neutral Definition

d = a[0]*b[0] + a[1]*b[1] + c, where a and b are 32-bit registers packing two 16-bit lanes each.
⚠️ Cross-vendor mappings describe semantic relationships and are not guaranteed one-to-one compiler translations.
equivalent with restrictions Both compute a 2-element packed-16-bit dot product accumulated into a 32-bit result in a single instruction.
Property NVIDIA PTX AMDGPU
Instruction dp2a v_dot2_i32_i16, v_dot2_u32_u16
ISA Layer Virtual Native
Data Types - i16, i32, u16, u32
Version / Target Introduced PTX ISA 5.0 -

Important Differences

  • Selecting the signed (v_dot2_i32_i16) vs. unsigned (v_dot2_u32_u16) AMDGPU instruction must match PTX's dp2a signedness modifier(s) on its two packed operands.

Source Evidence

Verification method: documentation