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

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sat Apr 26 23:05:17 PDT 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions cpp -- mlir/lib/Conversion/AMDGPUToROCDL/AMDGPUToROCDL.cpp mlir/lib/Dialect/AMDGPU/IR/AMDGPUDialect.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/mlir/lib/Dialect/AMDGPU/IR/AMDGPUDialect.cpp b/mlir/lib/Dialect/AMDGPU/IR/AMDGPUDialect.cpp
index 90131a664..6d3fa4d37 100644
--- a/mlir/lib/Dialect/AMDGPU/IR/AMDGPUDialect.cpp
+++ b/mlir/lib/Dialect/AMDGPU/IR/AMDGPUDialect.cpp
@@ -519,23 +519,23 @@ LogicalResult ScaledMFMAOp::verify() {
   if (opselB != 0)
     return emitOpError("Opsel B must be a zero extended 8 bit value.");
 
-  auto valid = [&](Type mlirElemType){
+  auto valid = [&](Type mlirElemType) {
     return llvm::TypeSwitch<Type, bool>(mlirElemType)
-    .Case([](Float8E4M3FNType) { return true; })
-    .Case([](Float8E5M2Type) { return true; })
-    .Case([](Float6E2M3FNType) { return true; })
-    .Case([](Float6E3M2FNType) { return true; })
-    .Case([](Float4E2M1FNType) { return true; })
-    .Default([](Type) { return false; });
+        .Case([](Float8E4M3FNType) { return true; })
+        .Case([](Float8E5M2Type) { return true; })
+        .Case([](Float6E2M3FNType) { return true; })
+        .Case([](Float6E3M2FNType) { return true; })
+        .Case([](Float4E2M1FNType) { return true; })
+        .Default([](Type) { return false; });
   };
-  
+
   Type aType = getSourceA().getType();
   Type bType = getSourceB().getType();
   if (!valid(aType))
-    return emitOpError("Source A must be of element type fp4, fp6 or fp8."); 
-  if (!valid(bType)) 
+    return emitOpError("Source A must be of element type fp4, fp6 or fp8.");
+  if (!valid(bType))
     return emitOpError("Source B must be of element type fp4, fp6 or fp8.");
-  
+
   return success();
 }
 

``````````

</details>


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


More information about the Mlir-commits mailing list