[Mlir-commits] [mlir] [MLIR][AMDGPU] Add amdgpu.global_transpose_load op for gfx1200+ global memory transpose loads (PR #195287)

Jakub Kuderski llvmlistbot at llvm.org
Sat May 2 07:47:22 PDT 2026


================
@@ -1449,6 +1449,53 @@ def AMDGPU_TransposeLoadOp :
   let hasVerifier = 1;
 }
 
+def AMDGPU_GlobalTransposeLoadOp :
+    AMDGPU_Op<"global_transpose_load", [SameVariadicOperandSize]>,
+    Arguments<(ins Arg<AnyMemRef, "buffer to transpose load from", [MemRead]>:$src,
+                      Variadic<Index>:$srcIndices)>,
+    Results<(outs AnyTypeOf<[
+      FixedVectorOfLengthAndType<[8], [I8, F16, BF16, I16]>,
+      FixedVectorOfLengthAndType<[16], [I<4>, I<6>]>
+    ]>:$result)> {
+  let summary = "MLIR wrapper for RDNA4 global memory transpose load instructions";
+  let description = [{
+    The `amdgpu.global_transpose_load` op is a wrapper around the
+    `global_load_tr` family of instructions introduced in RDNA4 (gfx1200+).
+
+    Each thread reads a column of a matrix stored in global memory and receives
+    the corresponding row of the transposed matrix in its result register.
+    The subgroup collectively performs a transpose of the tile.
+
+    This op is a direct wrapper around the ROCDL `global.load.tr` family
+    intrinsics. Refer to the RDNA4 ISA documentation for exact semantics.
----------------
kuhar wrote:

```suggestion
    intrinsics. Refer to the ISA manual for exact semantics.
```

https://github.com/llvm/llvm-project/pull/195287


More information about the Mlir-commits mailing list