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

Matthias Springer llvmlistbot at llvm.org
Sun Jul 7 03:18:48 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 }
----------------
matthias-springer wrote:

Also, the `init` operand is not optional, yet another reason why this should fail verification.
```
    // Output arg
    TensorOrMemref:$init
```


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


More information about the Mlir-commits mailing list