Sum of Absolute Differences Arithmetic
Add the absolute difference of two operands to a third accumulator operand.
Vendor-Neutral Definition
d = |a - b| + c.
⚠️ Cross-vendor mappings describe semantic relationships and are not guaranteed one-to-one compiler
translations.
equivalent with restrictions
Both compute |a - b| + c for unsigned integer operands.
| Property | NVIDIA PTX | AMDGPU |
|---|---|---|
| Instruction | sad | v_sad_u32 |
| ISA Layer | Virtual | Native |
| Data Types | - | u32 |
| Version / Target Introduced | PTX ISA 1.0 | gfx1100 |
Important Differences
- PTX's sad also has s16/s32/s64/u16/u64 forms; AMDGPU also has narrower-width variants (v_sad_u8) for byte-wise SAD used in motion estimation, a different instruction from the general 32-bit v_sad_u32.
Source Evidence
- Parallel Thread Execution ISA ↗ - NVIDIA Corporation
- User Guide for AMDGPU Backend ↗ - LLVM Project
Verification method: documentation