Type Conversion Data Movement

Convert a value between integer and/or floating-point types, with a specified rounding and saturation mode.

Vendor-Neutral Definition

d = convert(a, from_type -> to_type), with an explicit rounding mode (e.g. round-to-nearest, truncate) and optional saturation on overflow.
⚠️ Cross-vendor mappings describe semantic relationships and are not guaranteed one-to-one compiler translations.
equivalent with restrictions Both convert a value between integer and floating-point representations.
Property NVIDIA PTX AMDGPU
Instruction cvt v_cvt_f32_i32
ISA Layer Virtual Native
Data Types f16, f32, f64, s16, s32, s64, s8, u16, u32, u64, u8 f32, i32
Version / Target Introduced PTX ISA 1.0 gfx942/gfx1100

Important Differences

  • Supported rounding-mode/saturation modifier combinations are not identical across every PTX cvt pair and its closest AMDGPU v_cvt_* counterpart; verify each specific type pair independently.

Source Evidence

Verification method: documentation