[Mlir-commits] [mlir] Add Vector bitwidth target to Linearize Vectorizable and Constant Ops (PR #83314)
Ivan Butygin
llvmlistbot at llvm.org
Thu Feb 29 19:28:46 PST 2024
================
@@ -19,10 +19,27 @@
using namespace mlir;
+static bool isLessThanTargetBitWidth(Operation *op, unsigned targetBitWidth) {
+ auto resultTypes = op->getResultTypes();
+ for (auto resType : resultTypes) {
+ VectorType vecType = cast<VectorType>(resType);
+ unsigned trailingVecDimBitWidth =
+ vecType.getShape().back() * vecType.getElementTypeBitWidth();
----------------
Hardcode84 wrote:
I think, vectors of index type are allowed, and `getElementTypeBitWidth()` will crash for them, we need to handle them somehow (probably just ignoring them entirely in this pass).
https://github.com/llvm/llvm-project/pull/83314
More information about the Mlir-commits
mailing list