[Mlir-commits] [mlir] [MLIR][TOSA] Add --tosa-remove-redundant-transposes pass (PR #108260)
Arteen Abrishami
llvmlistbot at llvm.org
Fri Sep 13 11:26:22 PDT 2024
================
@@ -206,6 +206,15 @@ def Tosa_ExplicitValuePadOpQuantInfoBuilder : OpBuilder<
input, paddings, pad_value);
}]>;
+//===----------------------------------------------------------------------===//
+// TOSA Operator Trait.
+//===----------------------------------------------------------------------===//
+
+// Permits broadcasting. Elementwise trait is too strict.
----------------
arteen1000 wrote:
The element-wise operators in TOSA all have broadcasting semantics, so we wouldn't ever use `Elementwise`.
As an example, we want to allow something like `tosa.add %0, %1 : (tensor<3xi32>, tensor<1xi32>)` which the `Elementwise` trait disallows. For unary, this makes no difference.
https://github.com/llvm/llvm-project/pull/108260
More information about the Mlir-commits
mailing list