[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 04:09:03 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:

Ah yes. Those cases it errors out in the final sanity checking at the end of the Parser and never get to the verifier, so I never should have put both tests into the same `FuncOp`.

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


More information about the Mlir-commits mailing list