[Mlir-commits] [mlir] [mlir][amdgpu] Define an amdgpu.scaling_mfma wrapper (PR #137498)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sun Apr 27 22:54:42 PDT 2025


================
@@ -830,4 +830,52 @@ def AMDGPU_GatherToLDSOp :
   let hasVerifier = 1;
 }
 
+def AMDGPU_ScaledMFMAOp :
+    AMDGPU_Op<"scaled_mfma", [AllTypesMatch<["destC", "destD"]>,
+                        Pure]>,
+    Arguments<(ins
+                   I32Attr:$m,
+                   I32Attr:$n,
+                   I32Attr:$k,
+                   MFMAInTypes:$sourceA,
+                   MFMAInTypes:$sourceB,
+                   MFMAOutTypes:$destC,
+                   I32Attr:$scaleA,
+                   I32Attr:$scaleB,
+                   I32Attr:$opselA,
+                   I32Attr:$opselB)>,
+    Results<(outs MFMAOutTypes: $destD)> {
+  let summary = "MLIR wrapper for CDNA mfma instructions";
----------------
Muzammiluddin-Syed-ECE wrote:

`GatherToLDS` has a summary which also refers to the `GatherToLDSOp` as a "MLIR wrapper for CDNA mfma instructions".

So, assuming this summary is correct, "CDNA mfma instructions" seems to refer to a class of instructions related to MFMAs including `GatherToLDSOp` and not just `MFMAOp`, which would imply `ScaledMFMA` should also fall under this description. 

But I believe I may be overthinking this, so I've changed both summaries.


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


More information about the Mlir-commits mailing list