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

Dmitrii Agibov llvmlistbot at llvm.org
Tue Dec 2 08:22:44 PST 2025


https://github.com/d-agbv created https://github.com/llvm/llvm-project/pull/170320

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.

>From ad1d2502f2b32adaa756c98e89e853951ef5020a Mon Sep 17 00:00:00 2001
From: Dmitrii Agibov <dmitrii.agibov at arm.com>
Date: Tue, 2 Dec 2025 13:34:42 +0000
Subject: [PATCH] [mlir][gpu] Remove redundant memory effects from
 gpu.subgroup_mma load/store ops

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.
---
 mlir/include/mlir/Dialect/GPU/IR/GPUOps.td | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

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";
 



More information about the Mlir-commits mailing list