[Mlir-commits] [mlir] [tosa] Fix crash in shape inference for `tosa.transpose` (PR #74367)
Felix Schneider
llvmlistbot at llvm.org
Mon Dec 4 23:25:19 PST 2023
================
@@ -1310,3 +1310,14 @@ func.func @test_large_constant_permutation() {
return
}
+// -----
+
+// CHECK-LABEL: test_rank0_transpose_perms
+// Fail to infer the shape but not crash.
+func.func @test_rank0_transpose_perms() {
+ %14 = tensor.empty() : tensor<5x27xi64>
+ %cst = tensor.empty() : tensor<i32>
+ // CHECK: tosa.transpose
+ %72 = tosa.transpose %14, %cst : (tensor<5x27xi64>, tensor<i32>) -> tensor<?x?xi64>
----------------
ubfx wrote:
I agree, at the moment, `transpose` doesn't have a verifier so this was just a crash-fix PR but I will add a verifier which checks for those thing in a separate PR.
https://github.com/llvm/llvm-project/pull/74367
More information about the Mlir-commits
mailing list