[Mlir-commits] [mlir] [mlir][linalg] Extend elementwise (PR #124661)

Rolf Morel llvmlistbot at llvm.org
Mon Feb 3 08:09:10 PST 2025


================
@@ -0,0 +1,54 @@
+// RUN: mlir-opt %s -split-input-file -verify-diagnostics
+func.func @misspelt_op_div(%A : memref<16x8xf32>, %B: memref<16x8xf32>, %C: memref<16x8xf32>) {
+  // expected-error at +3 {{expected ::mlir::linalg::ElementwiseFn to be one of: exp, log, abs, ceil, floor}}
+  // expected-error at +2 {{failed to parse ElementwiseFnAttr parameter}}
+  // expected-error at +1 {{custom op 'linalg.elementwise' expected operation 'kind' attribute}}
+  linalg.elementwise kind=#linalg.elementwise_fn<dive> ins(%A, %B: memref<16x8xf32>, memref<16x8xf32>) outs(%C: memref<16x8xf32>)
----------------
rolfmorel wrote:

The multi-line style used in the other files is a bit easier on the eye. Would be appreciated if you could use it in this file as well. 👍 

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


More information about the Mlir-commits mailing list