[Mlir-commits] [mlir] [mlir][tosa] Check for 0-ranked-tensors during fold (PR #68512)

Sarthak Gupta llvmlistbot at llvm.org
Wed Oct 11 01:48:42 PDT 2023


================
@@ -591,3 +591,13 @@ func.func @fold_abs_abs(%arg0: tensor<?x1xf32>) -> tensor<?x1xf32> {
   %1 = tosa.abs %0 : (tensor<?x1xf32>) -> tensor<?x1xf32>
   return %1 : tensor<?x1xf32>
 }
+
+// -----
+
+// CHECK-LABEL: @rank_zero
+func.func nested @rank_zero() {
+  %0 = tensor.empty() : tensor<i32>
+  %1 = tosa.reduce_min %0 {axis = 0 : i32} : (tensor<i32>) -> tensor<1x10xi32>
----------------
gptsarthak wrote:

Added the `CHECK-NOT` labels for both the ops.

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


More information about the Mlir-commits mailing list