[Mlir-commits] [mlir] [MLIR][AMDGPU] Add a wrapper for global LDS load intrinsics in AMDGPU (PR #133498)
Krzysztof Drewniak
llvmlistbot at llvm.org
Mon Apr 7 09:33:48 PDT 2025
================
@@ -765,4 +765,39 @@ def AMDGPU_WMMAOp :
let hasVerifier = 1;
}
+def AMDGPU_GatherToLDSOp :
+ AMDGPU_Op<"gather_to_lds", [SameVariadicOperandSize]>,
+ Arguments<(ins
+ Arg<AnyMemRef, "buffer to gather from", [MemRead]>:$src,
+ Variadic<Index>:$srcIndices,
+ Arg<AnyMemRef, "buffer to write to", [MemWrite]>:$dst,
+ Variadic<Index>:$dstIndices,
+ TypeAttr:$transferType
+ )>,
+ Results<(outs)> {
+ let summary = "MLIR wrapper for CDNA mfma instructions";
+ let description = [{
+ The `amdgpu.global_load` op is a wrapper around the `global_load_lds` instructions.
+
+ Operands:
+ * `$src`: global memory memref to read from.
+ * `$srcIndices`: indices into `$src` to read from for this thread.
+ * `$dst`: LDS memory memref to write to.
+ * `$dstIndices`: base indices into `$dst` to write to for the subgroup of this thread.
+ number of subgroup size of elements will be written contiguously to `$dst[$dstIndices]`.
----------------
krzysz00 wrote:
Something about "number of subgroup size of elements" doesn't read write. Maybe this is "The elements gathered by the subgroup will be written in order of lane ID will be written into contiguously starting at `$dst[$dstIndices`."?
https://github.com/llvm/llvm-project/pull/133498
More information about the Mlir-commits
mailing list