[Mlir-commits] [mlir] [mlir][tosa] Add lowering of `tosa.transpose` to `tosa-to-linalg-named` (PR #75738)

Felix Schneider llvmlistbot at llvm.org
Wed Dec 20 14:12:13 PST 2023


================
@@ -984,6 +985,31 @@ class AvgPool2dConverter : public OpRewritePattern<tosa::AvgPool2dOp> {
   }
 };
 
+class TransposeConverter : public OpRewritePattern<tosa::TransposeOp> {
+public:
+  using OpRewritePattern<tosa::TransposeOp>::OpRewritePattern;
+
+  LogicalResult matchAndRewrite(tosa::TransposeOp op,
+                                PatternRewriter &rewriter) const final {
+    SmallVector<int64_t> constantPerms;
+    if (failed(op.getConstantPerms(constantPerms)))
----------------
ubfx wrote:

I went ahead and deleted the old pattern, moving all related tests from `tosa-to-linalg.mlir` to `tosa-to-linalg-named.mlir`

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


More information about the Mlir-commits mailing list