[Mlir-commits] [mlir] [mlir][linalg] Fix crashes in parser on linalg ops without operands (PR #97944)

Felix Schneider llvmlistbot at llvm.org
Sun Jul 7 03:54:32 PDT 2024


================
@@ -455,6 +455,18 @@ func.func @map_input_output_shape_mismatch(
 
 // -----
 
+func.func @map_no_operands(
+    %lhs: tensor<64xf32>, %rhs: tensor<64xf32>, %init: tensor<64xf32>)
+    -> tensor<64xf32> {
+  // This must not crash the parser.
+  linalg.map { arith.addf }
----------------
ubfx wrote:

You're right, I got confused here. But the verifier gets tripped correctly when putting the Op in a separate function. When both versions (with and without result) are in the same function, the verifier always (?) trips on the Op with a result. Do you have an idea why this is?

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


More information about the Mlir-commits mailing list