[Mlir-commits] [mlir] [mlir][tosa] Add folder for multiply like reduce_prod operation (PR #128067)

Jack Frankland llvmlistbot at llvm.org
Thu Feb 27 08:21:51 PST 2025


================
@@ -1012,3 +1012,14 @@ func.func nested @do_not_fold_reciprocal_int() -> tensor<3x600x1200xi32> {
   %2 = "tosa.reciprocal"(%1): (tensor<3x600x1200xi32>) -> tensor<3x600x1200xi32>
   return %2 : tensor<3x600x1200xi32>
 }
+
+// -----
----------------
FranklandJack wrote:

Could we add some negative tests here? From the above logic it seems like the following cases should fail:
1. input tensor of rank > 1
2. input tensor of rank 1 with  dim[0] > 1

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


More information about the Mlir-commits mailing list