[Mlir-commits] [mlir] [mlir][linalg] Add TransposeConv2D Pass (PR #68567)

Benjamin Maxwell llvmlistbot at llvm.org
Thu Oct 19 02:32:49 PDT 2023


================
@@ -145,4 +145,15 @@ def LinalgDetensorize : InterfacePass<"linalg-detensorize", "FunctionOpInterface
   ];
 }
 
+def LinalgTransposeConv2D : Pass<"linalg-transpose-conv2d-ops"> {
+  let summary = "Convert conv_2d_nhwc_fhwc to conv_2d_nhwc_hwcf by transposing the filter.";
+  let constructor = "mlir::createLinalgTransposeConv2DPass()";
+  let dependentDialects = ["linalg::LinalgDialect"];
+
+  let description = [{
+    This pass converts NHWC Conv2D operations with FHWC channel orderings to NHWC
+    Conv2D operations with HWCF channel orderings.
+    }];
----------------
MacDue wrote:

nit: align closing `}]` with `let` 
```suggestion
  let description = [{
    This pass converts NHWC Conv2D operations with FHWC channel orderings to NHWC
    Conv2D operations with HWCF channel orderings.
  }];
```

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


More information about the Mlir-commits mailing list