Skip to content

Commit 5dbd049

Browse files
[mlir][arith] arith-to-apfloat: Add vector support (#171024)
Add support for vectorized operations such as `arith.addf ... : vector<4xf4E2M1FN>`. The computation is scalarized: scalar operands are extracted with `vector.to_elements`, multiple scalar computations are performed and the result is inserted back into a vector with `vector.from_elements`.
1 parent 7bfdaa5 commit 5dbd049

File tree

5 files changed

+430
-265
lines changed

5 files changed

+430
-265
lines changed

mlir/include/mlir/Conversion/Passes.td

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,8 @@ def ArithToAPFloatConversionPass
198198
calls (APFloatWrappers.cpp). APFloat is a software implementation of
199199
floating-point arithmetic operations.
200200
}];
201-
let dependentDialects = ["func::FuncDialect"];
201+
let dependentDialects = ["arith::ArithDialect", "func::FuncDialect",
202+
"vector::VectorDialect"];
202203
}
203204

204205
//===----------------------------------------------------------------------===//

0 commit comments

Comments
 (0)