[Mlir-commits] [mlir] [mlir][tosa] Use traits to check output type aligns with input type (PR #193961)

Longsheng Mou llvmlistbot at llvm.org
Wed Apr 29 01:48:55 PDT 2026


================
@@ -2349,8 +2349,12 @@ def Tosa_ReshapeBlockScaledOp
 // Operator: reverse
 //===----------------------------------------------------------------------===//
 def Tosa_ReverseOp: Tosa_Op<"reverse", [
-    DeclareOpInterfaceMethods<InferShapedTypeOpInterface,
-                              ["inferReturnTypeComponents"]>, Pure]> {
+      DeclareOpInterfaceMethods<InferShapedTypeOpInterface,
+                                ["inferReturnTypeComponents"]>,
+      SameOperandsAndResultRank,
----------------
CoTinker wrote:

Why not `SameOperandsAndResultType`?

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


More information about the Mlir-commits mailing list