AMDGPU / GFX Instructions GPU Native ISA AMD
2,442 instructions - showing 100 per page, page 4 of 25 - AMDGPU/GFX is AMD's native, low-level
GPU instruction set family, assembled directly with no virtual intermediate layer. Supported
instructions and their exact encodings vary by GFX compatibility target (e.g.
gfx942, gfx1100). Scalar instructions execute once per wavefront on
the Scalar ALU; vector instructions execute per-lane on the Vector ALU, gated by the EXEC mask.
| Mnemonic | Syntax | Format | GFX Targets | Unit | Summary |
|---|---|---|---|---|---|
| ds_mskor_rtn_b32 | ds_mskor_rtn_b32 | DS | gfx1100 | Calculate masked bitwise OR on an unsigned 32-bit integer location in a data share, given mask value and bits to OR in the data registers. | |
| ds_mskor_rtn_b64 | ds_mskor_rtn_b64 | DS | gfx1100 | Calculate masked bitwise OR on an unsigned 64-bit integer location in a data share, given mask value and bits to OR in the data registers. | |
| ds_nop | ds_nop | DS | gfx1100 | Do nothing. | |
| ds_or_b32 | ds_or_b32 | DS | gfx1100 | Calculate bitwise OR given two unsigned 32-bit integer values stored in the data register and a location in a data share. | |
| ds_or_b64 | ds_or_b64 | DS | gfx1100 | Calculate bitwise OR given two unsigned 64-bit integer values stored in the data register and a location in a data share. | |
| ds_or_rtn_b32 | ds_or_rtn_b32 | DS | gfx1100 | Calculate bitwise OR given two unsigned 32-bit integer values stored in the data register and a location in a data share. Store the original value from data share into a vector register. | |
| ds_or_rtn_b64 | ds_or_rtn_b64 | DS | gfx1100 | Calculate bitwise OR given two unsigned 64-bit integer values stored in the data register and a location in a data share. Store the original value from data share into a vector register. | |
| ds_or_src2_b32 | ds_or_src2_b32 | DS | AMDGPU DS vector instruction operating on b32 data. (Format and name extracted from LLVM's AMDGPU backend source - semantics not yet curated.) | ||
| ds_or_src2_b64 | ds_or_src2_b64 | DS | AMDGPU DS vector instruction operating on b64 data. (Format and name extracted from LLVM's AMDGPU backend source - semantics not yet curated.) | ||
| ds_ordered_count | ds_ordered_count | DS | gfx1100 | GDS-only. Add (count_bits(exec_mask)) to one of 4 dedicated ordered-count counters (aka 'packers'). Additional bits of instr.offset field are overloaded to hold packer-id, 'last'. | |
| ds_param_load | ds_param_load | DSDIR | Transfer parameter data from LDS to VGPRs and expand data in LDS using the NewPrimMask (provided in M0) to place per-quad data into lanes 0-3 of each quad… | ||
| ds_permute_b32 | ds_permute_b32 VDST, ADDR, DATA | DS | gfx942, gfx1100 | LDS Unit | Forward-permute: each lane sends its value to a lane index computed by another lane, via the LDS crossbar (no LDS storage consumed). |
| ds_pk_add_bf16 | ds_pk_add_bf16 | DS | Add a packed 2-component BF16 float value in the data register to a location in a data share. | ||
| ds_pk_add_f16 | ds_pk_add_f16 | DS | Add a packed 2-component half-precision float value in the data register to a location in a data share. | ||
| ds_pk_add_rtn_bf16 | ds_pk_add_rtn_bf16 | DS | Add a packed 2-component BF16 float value in the data register to a location in a data share. Store the original value from data share into a vector register. | ||
| ds_pk_add_rtn_f16 | ds_pk_add_rtn_f16 | DS | Add a packed 2-component half-precision float value in the data register to a location in a data share. Store the original value from data share into a vector register. | ||
| ds_read2_b32 | ds_read2_b32 | DS | gfx1100 | Load 32 bits of data from one location in a data share and then 32 bits of data from a second location in a data share and store the results into a 64-bit vector register. | |
| ds_read2_b64 | ds_read2_b64 | DS | gfx1100 | Load 64 bits of data from one location in a data share and then 64 bits of data from a second location in a data share and store the results into a 128-bit vector register. | |
| ds_read2st64_b32 | ds_read2st64_b32 | DS | gfx1100 | Load 32 bits of data from one location in a data share and then 32 bits of data from a second location in a data share and store the results into a 64-bit vector register. Treat each offset as an index and multiply by a stride of 64 elements (256 bytes) to generate an offset for each DS address. | |
| ds_read2st64_b64 | ds_read2st64_b64 | DS | gfx1100 | Load 64 bits of data from one location in a data share and then 64 bits of data from a second location in a data share and store the results into a 128-bit vector register. Treat each offset as an index and multiply by a stride of 64 elements (256 bytes) to generate an offset for each DS address. | |
| ds_read_addtid_b32 | ds_read_addtid_b32 | DS | gfx1100 | Load 32 bits of data from a data share into a vector register. The memory base address is provided as an immediate value and the lane ID is used as an offset. | |
| ds_read_b128 | ds_read_b128 | DS | gfx1100 | Load 128 bits of data from a data share into a vector register. | |
| ds_read_b32 | ds_read_b32 VDST, ADDR, offset | DS | gfx942, gfx1100 | LDS Unit | Read one 32-bit value per lane from the Local Data Share (LDS). |
| ds_read_b64 | ds_read_b64 | DS | gfx1100 | Load 64 bits of data from a data share into a vector register. | |
| ds_read_b64_tr_b16 | ds_read_b64_tr_b16 | DS | Read 64 bits of data per lane from data share. Interpret the data as a matrix with 16 bit elements and transpose the matrix. Store the result into vector registers. | ||
| ds_read_b64_tr_b4 | ds_read_b64_tr_b4 | DS | Read 64 bits of data per lane from data share. Interpret the data as a matrix with 4 bit elements and transpose the matrix. Store the result into vector registers. | ||
| ds_read_b64_tr_b8 | ds_read_b64_tr_b8 | DS | Read 64 bits of data per lane from data share. Interpret the data as a matrix with 8 bit elements and transpose the matrix. Store the result into vector registers. | ||
| ds_read_b96 | ds_read_b96 | DS | gfx1100 | Load 96 bits of data from a data share into a vector register. | |
| ds_read_b96_tr_b6 | ds_read_b96_tr_b6 | DS | Read 96 bits of data per lane from data share. Interpret the data as a matrix with 6 bit elements and transpose the matrix. Store the result into vector registers. | ||
| ds_read_i16 | ds_read_i16 | DS | gfx1100 | Load 16 bits of signed data from a data share, sign extend to 32 bits and store the result into a vector register. | |
| ds_read_i8 | ds_read_i8 | DS | gfx1100 | Load 8 bits of signed data from a data share, sign extend to 32 bits and store the result into a vector register. | |
| ds_read_i8_d16 | ds_read_i8_d16 | DS | gfx1100 | Load 8 bits of signed data from a data share, sign extend to 16 bits and store the result into the low 16 bits of a vector register. | |
| ds_read_i8_d16_hi | ds_read_i8_d16_hi | DS | gfx1100 | Load 8 bits of signed data from a data share, sign extend to 16 bits and store the result into the high 16 bits of a vector register. | |
| ds_read_u16 | ds_read_u16 | DS | gfx1100 | Load 16 bits of unsigned data from a data share, zero extend to 32 bits and store the result into a vector register. | |
| ds_read_u16_d16 | ds_read_u16_d16 | DS | gfx1100 | Load 16 bits of unsigned data from a data share and store the result into the low 16 bits of a vector register. | |
| ds_read_u16_d16_hi | ds_read_u16_d16_hi | DS | gfx1100 | Load 16 bits of unsigned data from a data share and store the result into the high 16 bits of a vector register. | |
| ds_read_u8 | ds_read_u8 | DS | gfx1100 | Load 8 bits of unsigned data from a data share, zero extend to 32 bits and store the result into a vector register. | |
| ds_read_u8_d16 | ds_read_u8_d16 | DS | gfx1100 | Load 8 bits of unsigned data from a data share, zero extend to 16 bits and store the result into the low 16 bits of a vector register. | |
| ds_read_u8_d16_hi | ds_read_u8_d16_hi | DS | gfx1100 | Load 8 bits of unsigned data from a data share, zero extend to 16 bits and store the result into the high 16 bits of a vector register. | |
| ds_rsub_rtn_u32 | ds_rsub_rtn_u32 | DS | gfx1100 | Subtract an unsigned 32-bit integer value stored in a location in a data share from a value stored in the data register. Store the original value from data share into a vector register. | |
| ds_rsub_rtn_u64 | ds_rsub_rtn_u64 | DS | gfx1100 | Subtract an unsigned 64-bit integer value stored in a location in a data share from a value stored in the data register. Store the original value from data share into a vector register. | |
| ds_rsub_src2_u32 | ds_rsub_src2_u32 | DS | AMDGPU DS vector instruction operating on u32 data. (Format and name extracted from LLVM's AMDGPU backend source - semantics not yet curated.) | ||
| ds_rsub_src2_u64 | ds_rsub_src2_u64 | DS | AMDGPU DS vector instruction operating on u64 data. (Format and name extracted from LLVM's AMDGPU backend source - semantics not yet curated.) | ||
| ds_rsub_u32 | ds_rsub_u32 | DS | gfx1100 | Subtract an unsigned 32-bit integer value stored in a location in a data share from a value stored in the data register. | |
| ds_rsub_u64 | ds_rsub_u64 | DS | gfx1100 | Subtract an unsigned 64-bit integer value stored in a location in a data share from a value stored in the data register. | |
| ds_store_2addr_b32 | ds_store_2addr_b32 | DS | gfx1100 | Store 32 bits of data from one vector input register and then 32 bits of data from a second vector input register into a data share. | |
| ds_store_2addr_b64 | ds_store_2addr_b64 | DS | gfx1100 | Store 64 bits of data from one vector input register and then 64 bits of data from a second vector input register into a data share. | |
| ds_store_2addr_stride64_b32 | ds_store_2addr_stride64_b32 | DS | gfx1100 | Store 32 bits of data from one vector input register and then 32 bits of data from a second vector input register into a data share. Treat each offset as an index and multiply by a stride of 64 elements (256 bytes) to generate an offset for each DS address. | |
| ds_store_2addr_stride64_b64 | ds_store_2addr_stride64_b64 | DS | gfx1100 | Store 64 bits of data from one vector input register and then 64 bits of data from a second vector input register into a data share. Treat each offset as an index and multiply by a stride of 64 elements (256 bytes) to generate an offset for each DS address. | |
| ds_store_addtid_b32 | ds_store_addtid_b32 | DS | gfx1100 | Store 32 bits of data from a vector input register into a data share. The memory base address is provided as an immediate value and the lane ID is used as an offset. | |
| ds_store_b128 | ds_store_b128 | DS | gfx1100 | Store 128 bits of data from a vector input register into a data share. | |
| ds_store_b16 | ds_store_b16 | DS | gfx1100 | Store 16 bits of data from a vector register into a data share. | |
| ds_store_b16_d16_hi | ds_store_b16_d16_hi | DS | gfx1100 | Store 16 bits of data from the high bits of a vector register into a data share. | |
| ds_store_b32 | ds_store_b32 | DS | gfx1100 | Store 32 bits of data from a vector input register into a data share. | |
| ds_store_b64 | ds_store_b64 | DS | gfx1100 | Store 64 bits of data from a vector input register into a data share. | |
| ds_store_b8 | ds_store_b8 | DS | gfx1100 | Store 8 bits of data from a vector register into a data share. | |
| ds_store_b8_d16_hi | ds_store_b8_d16_hi | DS | gfx1100 | Store 8 bits of data from the high bits of a vector register into a data share. | |
| ds_store_b96 | ds_store_b96 | DS | gfx1100 | Store 96 bits of data from a vector input register into a data share. | |
| ds_storexchg_2addr_rtn_b32 | ds_storexchg_2addr_rtn_b32 | DS | gfx1100 | Swap two unsigned 32-bit integer values in the data registers with two locations in a data share. | |
| ds_storexchg_2addr_rtn_b64 | ds_storexchg_2addr_rtn_b64 | DS | gfx1100 | Swap two unsigned 64-bit integer values in the data registers with two locations in a data share. | |
| ds_storexchg_2addr_stride64_rtn_b32 | ds_storexchg_2addr_stride64_rtn_b32 | DS | gfx1100 | Swap two unsigned 32-bit integer values in the data registers with two locations in a data share. Treat each offset as an index and multiply by a stride of 64 elements (256 bytes) to generate an offset for each DS address. | |
| ds_storexchg_2addr_stride64_rtn_b64 | ds_storexchg_2addr_stride64_rtn_b64 | DS | gfx1100 | Swap two unsigned 64-bit integer values in the data registers with two locations in a data share. Treat each offset as an index and multiply by a stride of 64 elements (256 bytes) to generate an offset for each DS address. | |
| ds_storexchg_rtn_b32 | ds_storexchg_rtn_b32 | DS | gfx1100 | Swap an unsigned 32-bit integer value in the data register with a location in a data share. | |
| ds_storexchg_rtn_b64 | ds_storexchg_rtn_b64 | DS | gfx1100 | Swap an unsigned 64-bit integer value in the data register with a location in a data share. | |
| ds_sub_clamp_rtn_u32 | ds_sub_clamp_rtn_u32 | DS | Subtract an unsigned 32-bit integer location in a data share from a value in the data register and clamp the result to zero. Store the original value from data share into a vector register. | ||
| ds_sub_clamp_u32 | ds_sub_clamp_u32 | DS | Subtract an unsigned 32-bit integer location in a data share from a value in the data register and clamp the result to zero. | ||
| ds_sub_gs_reg_rtn | ds_sub_gs_reg_rtn | DS | gfx1100 | Perform an atomic subtraction from data in specific registers embedded in GDS rather than operating on GDS memory directly. This instruction returns the pre-op value. This instruction is only used by the GS stage and is used to facilitate streamout. | |
| ds_sub_rtn_u32 | ds_sub_rtn_u32 | DS | gfx1100 | Subtract an unsigned 32-bit integer value stored in the data register from a value stored in a location in a data share. Store the original value from data share into a vector register. | |
| ds_sub_rtn_u64 | ds_sub_rtn_u64 | DS | gfx1100 | Subtract an unsigned 64-bit integer value stored in the data register from a value stored in a location in a data share. Store the original value from data share into a vector register. | |
| ds_sub_src2_u32 | ds_sub_src2_u32 | DS | AMDGPU DS vector instruction operating on u32 data. (Format and name extracted from LLVM's AMDGPU backend source - semantics not yet curated.) | ||
| ds_sub_src2_u64 | ds_sub_src2_u64 | DS | AMDGPU DS vector instruction operating on u64 data. (Format and name extracted from LLVM's AMDGPU backend source - semantics not yet curated.) | ||
| ds_sub_u32 | ds_sub_u32 | DS | gfx1100 | Subtract an unsigned 32-bit integer value stored in the data register from a value stored in a location in a data share. | |
| ds_sub_u64 | ds_sub_u64 | DS | gfx1100 | Subtract an unsigned 64-bit integer value stored in the data register from a value stored in a location in a data share. | |
| ds_swizzle_b32 | ds_swizzle_b32 | DS | gfx1100 | Dword swizzle, no data is written to LDS memory. Swizzles input thread data based on offset mask and returns; note does not read or write the DS memory banks. Note that reading from an invalid thread results in 0x0. | |
| ds_wrap_rtn_b32 | ds_wrap_rtn_b32 | DS | gfx1100 | Given a minuend from a location in data share and a subtrahend from a vector register, subtract the two values iff the result is nonnegative; otherwise add a value from a second vector register to the memory location. This calculation provides flexible wraparound semantics for subtraction. | |
| ds_write2_b32 | ds_write2_b32 | DS | gfx1100 | Store 32 bits of data from one vector input register and then 32 bits of data from a second vector input register into a data share. | |
| ds_write2_b64 | ds_write2_b64 | DS | gfx1100 | Store 64 bits of data from one vector input register and then 64 bits of data from a second vector input register into a data share. | |
| ds_write2st64_b32 | ds_write2st64_b32 | DS | gfx1100 | Store 32 bits of data from one vector input register and then 32 bits of data from a second vector input register into a data share. Treat each offset as an index and multiply by a stride of 64 elements (256 bytes) to generate an offset for each DS address. | |
| ds_write2st64_b64 | ds_write2st64_b64 | DS | gfx1100 | Store 64 bits of data from one vector input register and then 64 bits of data from a second vector input register into a data share. Treat each offset as an index and multiply by a stride of 64 elements (256 bytes) to generate an offset for each DS address. | |
| ds_write_addtid_b32 | ds_write_addtid_b32 | DS | gfx1100 | Store 32 bits of data from a vector input register into a data share. The memory base address is provided as an immediate value and the lane ID is used as an offset. | |
| ds_write_b128 | ds_write_b128 | DS | gfx1100 | Store 128 bits of data from a vector input register into a data share. | |
| ds_write_b16 | ds_write_b16 | DS | gfx1100 | Store 16 bits of data from a vector register into a data share. | |
| ds_write_b16_d16_hi | ds_write_b16_d16_hi | DS | gfx1100 | Store 16 bits of data from the high bits of a vector register into a data share. | |
| ds_write_b32 | ds_write_b32 ADDR, DATA, offset | DS | gfx942, gfx1100 | LDS Unit | Write one 32-bit value per lane to the Local Data Share (LDS). |
| ds_write_b64 | ds_write_b64 | DS | gfx1100 | Store 64 bits of data from a vector input register into a data share. | |
| ds_write_b8 | ds_write_b8 | DS | gfx1100 | Store 8 bits of data from a vector register into a data share. | |
| ds_write_b8_d16_hi | ds_write_b8_d16_hi | DS | gfx1100 | Store 8 bits of data from the high bits of a vector register into a data share. | |
| ds_write_b96 | ds_write_b96 | DS | gfx1100 | Store 96 bits of data from a vector input register into a data share. | |
| ds_write_src2_b32 | ds_write_src2_b32 | DS | AMDGPU DS vector instruction operating on b32 data. (Format and name extracted from LLVM's AMDGPU backend source - semantics not yet curated.) | ||
| ds_write_src2_b64 | ds_write_src2_b64 | DS | AMDGPU DS vector instruction operating on b64 data. (Format and name extracted from LLVM's AMDGPU backend source - semantics not yet curated.) | ||
| ds_wrxchg2_rtn_b32 | ds_wrxchg2_rtn_b32 | DS | gfx1100 | Swap two unsigned 32-bit integer values in the data registers with two locations in a data share. | |
| ds_wrxchg2_rtn_b64 | ds_wrxchg2_rtn_b64 | DS | gfx1100 | Swap two unsigned 64-bit integer values in the data registers with two locations in a data share. | |
| ds_wrxchg2st64_rtn_b32 | ds_wrxchg2st64_rtn_b32 | DS | gfx1100 | Swap two unsigned 32-bit integer values in the data registers with two locations in a data share. Treat each offset as an index and multiply by a stride of 64 elements (256 bytes) to generate an offset for each DS address. | |
| ds_wrxchg2st64_rtn_b64 | ds_wrxchg2st64_rtn_b64 | DS | gfx1100 | Swap two unsigned 64-bit integer values in the data registers with two locations in a data share. Treat each offset as an index and multiply by a stride of 64 elements (256 bytes) to generate an offset for each DS address. | |
| ds_wrxchg_rtn_b32 | ds_wrxchg_rtn_b32 | DS | gfx1100 | Swap an unsigned 32-bit integer value in the data register with a location in a data share. | |
| ds_wrxchg_rtn_b64 | ds_wrxchg_rtn_b64 | DS | gfx1100 | Swap an unsigned 64-bit integer value in the data register with a location in a data share. | |
| ds_xor_b32 | ds_xor_b32 | DS | gfx1100 | Calculate bitwise XOR given two unsigned 32-bit integer values stored in the data register and a location in a data share. | |
| ds_xor_b64 | ds_xor_b64 | DS | gfx1100 | Calculate bitwise XOR given two unsigned 64-bit integer values stored in the data register and a location in a data share. | |
| ds_xor_rtn_b32 | ds_xor_rtn_b32 | DS | gfx1100 | Calculate bitwise XOR given two unsigned 32-bit integer values stored in the data register and a location in a data share. Store the original value from data share into a vector register. | |
| ds_xor_rtn_b64 | ds_xor_rtn_b64 | DS | gfx1100 | Calculate bitwise XOR given two unsigned 64-bit integer values stored in the data register and a location in a data share. Store the original value from data share into a vector register. |
Source
Instruction names, formats and GFX targets come from LLVM's AMDGPU backend. Operands, bit layouts and the instructions that backend's TableGen does not reach come from AMD's machine-readable ISA specification; descriptions and semantics from AMD's own manuals and that specification; examples from LLVM's assembler tests. Each instruction page cites the sources it uses; AMD's ROCm documentation hub is the architecture-level reference. AMD machine-readable ISA specification ↗ · AMD Instinct MI300 ISA manual ↗ · LLVM AMDGPU backend ↗ · ROCm documentation ↗