[Mlir-commits] [mlir] [mlir][tosa] Fix tosa-infer-shapes crash (PR #87234)
Rob Suderman
llvmlistbot at llvm.org
Mon Apr 1 11:36:27 PDT 2024
================
@@ -1177,6 +1177,120 @@ func.func @while_test(%arg0 : tensor<i32>, %arg1 : tensor<1xi32>) -> () {
// -----
+// This test locks down a fix for a crash in the type inference process.
+// The relevant pattern is a while loop whose body contains a TOSA operation which is
+// consumed by a non-inferrable user in the same body.
+// Previously, this would trigger a crash due to how types are cached and then
+// reapplied to the operations in the loops body.
+
+// CHECK-LABEL: @while_dont_crash
+func.func @while_dont_crash(%arg0 : tensor<i32>) -> (tensor<*xi32>) {
+ %0 = tosa.add %arg0, %arg0 : (tensor<i32>, tensor<i32>) -> tensor<*xi32>
+
----------------
rsuderman wrote:
Could we try to condense this a little bit? There are a ton of empty newlines everywhere and it would be nice to get it a little more compact/
https://github.com/llvm/llvm-project/pull/87234
More information about the Mlir-commits
mailing list