[Mlir-commits] [mlir] [mlir][vector]Enable DropUnitDimFromTransposeOp (PR #93007)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed May 22 02:17:03 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 3efaf9caa56393597839b796d34f92459c711605 7d14d34c0411534f0286721ccbd6a70301daba8f -- mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp
``````````

</details>

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

``````````diff
diff --git a/mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp b/mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp
index fe74a6446c..4225ea6cac 100644
--- a/mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp
+++ b/mlir/lib/Dialect/Vector/Transforms/VectorTransforms.cpp
@@ -1695,7 +1695,6 @@ struct DropUnitDimFromElementwiseOps final
   }
 };
 
-
 /// Removes unit dimensions from a transpose op. Generates a vector.shape_cast
 /// on the operand and result to match types.
 ///
@@ -1741,7 +1740,8 @@ struct DropUnitDimFromTransposeOp final
           }
           // Decrement all dimensions of higher rank to keep permutation map
           // in range of the new rank.
-          else if ((unsigned)newPerm[permutationIdx] > dim.index() - removedDims) {
+          else if ((unsigned)newPerm[permutationIdx] >
+                   dim.index() - removedDims) {
             newPerm[permutationIdx]--;
           }
         }

``````````

</details>


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


More information about the Mlir-commits mailing list