[Mlir-commits] [mlir] [mlir][gpu] Remove redundant memory effects from gpu.subgroup_mma load/store ops (PR #170320)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Dec 2 08:23:19 PST 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir

@llvm/pr-subscribers-mlir-gpu

Author: Dmitrii Agibov (d-agbv)

<details>
<summary>Changes</summary>

The gpu.subgroup_mma_load_matrix and gpu.subgroup_mma_store_matrix ops declare memory effects at the op and operands levels. Op level memory effects traits do not add any additional information and they complicate memory analysis, e.g. they prevent lowering of the scf.parallel to gpu if loop's body contains gpu.subgroup_mma_store op.

Remove redundant op level memory effects traits to simplify analysis and make it consistent with other similar ops.

---
Full diff: https://github.com/llvm/llvm-project/pull/170320.diff


1 Files Affected:

- (modified) mlir/include/mlir/Dialect/GPU/IR/GPUOps.td (+2-4) 


``````````diff
diff --git a/mlir/include/mlir/Dialect/GPU/IR/GPUOps.td b/mlir/include/mlir/Dialect/GPU/IR/GPUOps.td
index 5c7df25c58cde..e589e6f0aab98 100644
--- a/mlir/include/mlir/Dialect/GPU/IR/GPUOps.td
+++ b/mlir/include/mlir/Dialect/GPU/IR/GPUOps.td
@@ -1799,8 +1799,7 @@ def GPU_SetDefaultDeviceOp : GPU_Op<"set_default_device",
   let assemblyFormat = "attr-dict $devIndex";
 }
 
-def GPU_SubgroupMmaLoadMatrixOp : GPU_Op<"subgroup_mma_load_matrix",
-    [MemoryEffects<[MemRead]>]>{
+def GPU_SubgroupMmaLoadMatrixOp : GPU_Op<"subgroup_mma_load_matrix"> {
 
   let summary = "GPU warp synchronous matrix load";
 
@@ -1845,8 +1844,7 @@ def GPU_SubgroupMmaLoadMatrixOp : GPU_Op<"subgroup_mma_load_matrix",
   let hasVerifier = 1;
 }
 
-def GPU_SubgroupMmaStoreMatrixOp : GPU_Op<"subgroup_mma_store_matrix",
-    [MemoryEffects<[MemWrite]>]>{
+def GPU_SubgroupMmaStoreMatrixOp : GPU_Op<"subgroup_mma_store_matrix"> {
 
   let summary = "GPU warp synchronous matrix store";
 

``````````

</details>


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


More information about the Mlir-commits mailing list