[Mlir-commits] [mlir] [MLIR][NVGPU] Introduce `warpgroup.init.accumulator` Op (PR #67530)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Oct 5 05:57:17 PDT 2023


================
@@ -727,4 +727,15 @@ def NVGPU_WarpgroupMmaOp : NVGPU_Op<"warpgroup.mma"> {
   let hasVerifier = 1;
 }
 
+def NVGPU_WarpgroupMmaInitAccumulatorOp : NVGPU_Op<"warpgroup.mma.init.accumulator"> {  
+  let summary = "Initialize accumulator matrix for `warppgroup.mma`";
+
+  let description = [{
+    This Op generates and initilizes the accumulator matrix for 
+    `nvgpu.warpgroup.mma` op to perform matrix-multiply-and-accumulate (mma).
+  }];
+  let results = (outs Variadic<NVGPU_WarpgroupAccumulator>:$matrixC);
----------------
qcolombet wrote:

> Makes storing them to memref easier. For example, multiple accumulator (with variadic) can be stored to the same memref, and their offset is nicely calculated.

But that's on the `store` side, for the `init` this doesn't make things easier (well aside from making the IR denser :)). We still create one struct per result.

> Otherwise, I need to write store for each accumulator, calculate memref's subview for each of them

We still have to do that, don't we?

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


More information about the Mlir-commits mailing list