[Mlir-commits] [mlir] [MLIR][Linalg] Add specialization for linalg.broadcast (PR #104684)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sat Aug 17 13:46:26 PDT 2024


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 f620c5b692dd0bc08692979236073db0db27f0fc 9a1f106e7b477b102e979d9f572e18c8693fe8ba --extensions cpp,h -- mlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.h mlir/lib/Dialect/Linalg/IR/LinalgInterfaces.cpp mlir/lib/Dialect/Linalg/Transforms/Specialize.cpp
``````````

</details>

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

``````````diff
diff --git a/mlir/lib/Dialect/Linalg/Transforms/Specialize.cpp b/mlir/lib/Dialect/Linalg/Transforms/Specialize.cpp
index 801622752c..c9afbcd246 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/Specialize.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/Specialize.cpp
@@ -274,12 +274,13 @@ FailureOr<LinalgOp> mlir::linalg::specializeGenericOp(RewriterBase &rewriter,
   }
 
   // Broadcast
-  std::optional<SmallVector<int64_t>> equivalentToBroadcast
-          = isaBroadcastOpInterface(genericOp);
+  std::optional<SmallVector<int64_t>> equivalentToBroadcast =
+      isaBroadcastOpInterface(genericOp);
   if (equivalentToBroadcast) {
     auto dims = *equivalentToBroadcast;
     LinalgOp namedOp = rewriter.replaceOpWithNewOp<BroadcastOp>(
-        genericOp, genericOp.getDpsInputs()[0], genericOp.getDpsInits()[0], dims);
+        genericOp, genericOp.getDpsInputs()[0], genericOp.getDpsInits()[0],
+        dims);
     return namedOp;
   }
 

``````````

</details>


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


More information about the Mlir-commits mailing list