Multiply-Add (Unfused) Arithmetic

Compute (a * b) + c as two separate rounding steps, unlike a fused multiply-add.

Vendor-Neutral Definition

d = round(round(a * b) + c) - the product IS rounded before the addition, unlike fma.
⚠️ Cross-vendor mappings describe semantic relationships and are not guaranteed one-to-one compiler translations.
equivalent with restrictions Both compute (a * b) + c with the product rounded before the addition, unlike a fused multiply-add.
Property NVIDIA PTX AMDGPU
Instruction mad v_mad_f32
ISA Layer Virtual Native
Data Types f32, s16, s32, s64, u16, u32, u64 f32
Version / Target Introduced PTX ISA 1.0 -

Important Differences

  • PTX's mad is ONE family spanning f32/s16/s32/s64/u16/u32/u64; AMDGPU requires selecting a differently-named, differently-widthed instruction per type (e.g. v_mad_i32_i24/v_mad_u32_u24 only cover 24-bit integer inputs exactly, not general 32-bit integer multiply-add - AMDGPU has no single-instruction general 32x32-bit integer mad).

Source Evidence

Verification method: documentation