[Mlir-commits] [mlir] [mlir][linalg] Add TransposeConv2D Pass (PR #68567)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Oct 19 04:23:02 PDT 2023
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 906d3ff054b0ca6439521e8871bac54843cc73a2 944c68b681753300d57b24a06de168c184c3f1c2 -- mlir/lib/Dialect/Linalg/Transforms/TransposeConv2D.cpp mlir/include/mlir/Dialect/Linalg/Passes.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Dialect/Linalg/Transforms/TransposeConv2D.cpp b/mlir/lib/Dialect/Linalg/Transforms/TransposeConv2D.cpp
index ec9e590750ff..22e592a11342 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/TransposeConv2D.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/TransposeConv2D.cpp
@@ -34,7 +34,8 @@ namespace {
/// Before:
///
/// %0 = linalg.conv_2d_nhwc_fhwc {dilations = dense<1> : tensor<2xi64>,
-/// strides = dense<2> : tensor<2xi64>}
+/// strides = dense<2> :
+/// tensor<2xi64>}
/// ins (%input, %filter: tensor<1x4x4x6xf32>, tensor<8x2x2x6xf32>)
/// outs (%init: tensor<1x2x2x8xf32>) -> tensor<1x2x2x8xf32>
///
@@ -42,11 +43,14 @@ namespace {
///
/// %cst = arith.constant 0.000000e+00 : f32
/// %0 = tensor.empty() : tensor<2x2x6x8xf32>
-/// %1 = linalg.fill ins(%cst : f32) outs(%0 : tensor<2x2x6x8xf32>) -> tensor<2x2x6x8xf32>
-/// %transposed = linalg.transpose ins(%arg1 : tensor<8x2x2x6xf32>) outs(%1 : tensor<2x2x6x8xf32>)
+/// %1 = linalg.fill ins(%cst : f32) outs(%0 : tensor<2x2x6x8xf32>) ->
+/// tensor<2x2x6x8xf32> %transposed = linalg.transpose ins(%arg1 :
+/// tensor<8x2x2x6xf32>) outs(%1 : tensor<2x2x6x8xf32>)
/// permutation = [1, 2, 3, 0]
-/// %2 = linalg.conv_2d_nhwc_hwcf {dilations = dense<1> : tensor<2xi64>, strides = dense<2> : tensor<2xi64>}
-/// ins(%arg0, %transposed : tensor<1x4x4x6xf32>, tensor<2x2x6x8xf32>) outs(%arg2 : tensor<1x2x2x8xf32>)
+/// %2 = linalg.conv_2d_nhwc_hwcf {dilations = dense<1> : tensor<2xi64>,
+/// strides = dense<2> : tensor<2xi64>}
+/// ins(%arg0, %transposed : tensor<1x4x4x6xf32>, tensor<2x2x6x8xf32>)
+/// outs(%arg2 : tensor<1x2x2x8xf32>)
/// -> tensor<1x2x2x8xf32>
///
/// with an analogous example for the quantized case.
``````````
</details>
https://github.com/llvm/llvm-project/pull/68567
More information about the Mlir-commits
mailing list