[Mlir-commits] [mlir] [mlir][linalg] Produce canonical linalg.generic for im2col (PR #134675)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Jul 16 09:23:13 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/Linalg/Transforms/ConvertConv2DToImg2Col.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Dialect/Linalg/Transforms/ConvertConv2DToImg2Col.cpp b/mlir/lib/Dialect/Linalg/Transforms/ConvertConv2DToImg2Col.cpp
index 6266145db..821b3f3d9 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/ConvertConv2DToImg2Col.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/ConvertConv2DToImg2Col.cpp
@@ -114,10 +114,11 @@ struct Im2ColToInputDimsExprs {
/// @param exprs Affine expressions for output and filter indices.
/// @param strides [height, width] stride values for the convolution.
/// @param rewriter Pattern rewriter.
-/// @return Affine expressions mapping im2col matrix indices to input offsets.
+/// @return Affine expressions mapping im2col matrix indices to input
+/// offsets.
static Im2ColToInputDimsExprs getIm2ColInputMap(Im2ColToOperandsExprs exprs,
- ArrayRef<int64_t> strides,
- RewriterBase &rewriter) {
+ ArrayRef<int64_t> strides,
+ RewriterBase &rewriter) {
// maps the iteration space of the im2col matrix to (output_y, filter_y)
auto hIndicesMap = AffineMap::inferFromExprList(
{ArrayRef{exprs.ohIndex, exprs.fhIndex}}, rewriter.getContext())[0];
``````````
</details>
https://github.com/llvm/llvm-project/pull/134675
More information about the Mlir-commits
mailing list