[Mlir-commits] [mlir] [mlir][tosa] Check for unranked tensors during validation (PR #68509)
Eric Kunze
llvmlistbot at llvm.org
Tue Oct 10 15:48:14 PDT 2023
================
@@ -695,4 +695,13 @@ func.func @test_custom(%arg0: tensor<1x1x1x1x1x1x10xi32>) -> tensor<1x1x1x1x1x1x
return %0 : tensor<1x1x1x1x1x1x10xi32>
}
+// -----
+// CHECK-LABEL: unranked_tensor
+func.func @test_unranked_tensor(%arg0: tensor<1x1x1x1x13x21xf32>) {
+ // expected-error at +1 {{'tosa.slice' op failed level check: unranked tensor}}
+ %0 = "tosa.slice"(%arg0) {start = array<i64: 0, 0, 0, 0, 6, 8, 0>, size = array<i64: 1, 1, 1, 1, 4, 11, 1>} :
----------------
eric-k256 wrote:
This test is a bit odd, as if you know the input size and the slice attributes you would be able to infer the rank (and exact shape) of the output tensor. It would feel more natural as if %arg0 was tensor<*xf32>
https://github.com/llvm/llvm-project/pull/68509
More information about the Mlir-commits
mailing list