4-Way Dot Product (Accumulate) Arithmetic

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

Vendor-Neutral Definition

d = sum(a[i]*b[i] for i in 0..3) + c, where a and b are 32-bit registers packing four 8-bit lanes each.
⚠️ Cross-vendor mappings describe semantic relationships and are not guaranteed one-to-one compiler translations.
equivalent with restrictions Both compute a 4-element packed-8-bit dot product accumulated into a 32-bit result in a single instruction.
Property NVIDIA PTX AMDGPU
Instruction dp4a v_dot4_i32_i8, v_dot4_u32_u8
ISA Layer Virtual Native
Data Types - i32, i8, u32, u8
Version / Target Introduced PTX ISA 5.0 gfx1100, gfx1100

Important Differences

  • Selecting the signed (v_dot4_i32_i8) vs. unsigned (v_dot4_u32_u8) AMDGPU instruction must match PTX's dp4a signedness modifier(s) on its two packed operands.

Source Evidence

Verification method: documentation