[Mlir-commits] [mlir] [mlir][Tensor] Generalize the pattern to swap `tensor.collapse_shape` -> `tensor.expand_shape`. (PR #133819)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Apr 15 14:03:10 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/Dialect/Tensor/Transforms/ReshapePatterns.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Dialect/Tensor/Transforms/ReshapePatterns.cpp b/mlir/lib/Dialect/Tensor/Transforms/ReshapePatterns.cpp
index 338f22ded..a3de7f9b4 100644
--- a/mlir/lib/Dialect/Tensor/Transforms/ReshapePatterns.cpp
+++ b/mlir/lib/Dialect/Tensor/Transforms/ReshapePatterns.cpp
@@ -215,8 +215,7 @@ struct BubbleUpExpandThroughParallelCollapse
int64_t newExpandIndex = 0, newCollapseIndex = 0, sourceSizeIndex = 0,
resultSizeIndex = 0;
- for (size_t idx = 0, idxEnd = collapseReInds.size(); idx < idxEnd;
- idx++) {
+ for (size_t idx = 0, idxEnd = collapseReInds.size(); idx < idxEnd; idx++) {
auto &collapseReassociation = collapseReInds[idx];
auto &expandReassociation = expandReInds[idx];
``````````
</details>
https://github.com/llvm/llvm-project/pull/133819
More information about the Mlir-commits
mailing list