[Mlir-commits] [mlir] [mlir][linalg] Type conversion of operands in new elementwise-op. (PR #131542)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Fri Mar 21 04:50:52 PDT 2025
================
@@ -563,13 +563,16 @@ def ElementwiseOp : LinalgStructuredBase_Op<"elementwise", [
The number of dims of the iterator-types are inferred from the rank of
the result type.
+ Numeric casting is performed on the input operand, promoting it to the same
+ data type as the result.
+
Example:
Defining a unary linalg.elemwise with default indexing-map:
```mlir
%exp = linalg.elemwise
kind=#linalg.elemwise_kind<exp>
- ins(%x : tensor<4x16x8xf32>)
+ ins(%x : tensor<4x16x8xf16>)
----------------
banach-space wrote:
So you have changed this example so that there's casting. But what kind of casting? And why is it crucial? It would be good to expand docs.
https://github.com/llvm/llvm-project/pull/131542
More information about the Mlir-commits
mailing list