Issue 157069
Summary [mlir] error: custom op 'linalg.elemwise_binary' is unknown
Labels mlir
Assignees
Reporter vfdff
    The linalg.elemwise_binary is a standard interface in linalg dialect, but the mlir-opt doesn't know it,  see [linalgelementwiseop](https://mlir.llvm.org/docs/Dialects/Linalg/#linalgelementwise-linalgelementwiseop), 



* test: https://godbolt.org/z/ePP3a5EaM
```
func.func @Add_105_L0(%arg0: tensor<18x4x64x64xf16>, %arg1: tensor<18x4x64x64xf16>) -> tensor<18x4x64x64xf16> attributes {hacc.entry} {
    %cst = arith.constant 1.000000e+00 : f16
    %0 = tensor.empty() : tensor<18x4x64x64xf16>
    %1 = linalg.fill ins(%cst : f16) outs(%0 : tensor<18x4x64x64xf16>) -> tensor<18x4x64x64xf16>
    %2 = linalg.elemwise_binary {fun = #linalg.binary_fn<mul>} ins(%arg1, %1 : tensor<18x4x64x64xf16>, tensor<18x4x64x64xf16>) outs(%0 : tensor<18x4x64x64xf16>) -> tensor<18x4x64x64xf16>
    %3 = linalg.elemwise_binary {fun = #linalg.binary_fn<add>} ins(%arg0, %2 : tensor<18x4x64x64xf16>, tensor<18x4x64x64xf16>) outs(%0 : tensor<18x4x64x64xf16>) -> tensor<18x4x64x64xf16>
    return %3 : tensor<18x4x64x64xf16>
  }
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to