SSA values, the handle must be mapped to exactly one payload op with
exactly one index-typed result.
+ Note: The input vector sizes must be bigger than or equal to their
+ counterpart iteration space sizes.
+
+ Typically this operator should be applied to linalg operations that have
+ already be tiled to the appropriate sizes.
+
#### Return modes:
This operation produces a definite failure if the dynamic vector sizes (SSA
"Input vector sizes don't match the number of loops");
assert(!ShapedType::isDynamicShape(inputVectorSizes) &&
"Input vector sizes can't have dynamic dimensions");
- assert(llvm::all_of(
- llvm::zip(linalgOp.getStaticLoopRanges(), inputVectorSizes),
- [](std::tuple<int64_t, int64_t> sizePair) {
- int64_t staticSize = std::get<0>(sizePair);
- int64_t inputSize = std::get<1>(sizePair);
- return ShapedType::isDynamic(staticSize) ||
- staticSize <= inputSize;
- }) &&
- "Input vector sizes must be smaller or equal than iteration space "
- "static sizes");
+ assert(
+ llvm::all_of(
+ llvm::zip(linalgOp.getStaticLoopRanges(), inputVectorSizes),
+ [](std::tuple<int64_t, int64_t> sizePair) {
+ int64_t staticSize = std::get<0>(sizePair);
+ int64_t inputSize = std::get<1>(sizePair);
+ return ShapedType::isDynamic(staticSize) ||
+ staticSize <= inputSize;
+ }) &&
+ "Input vector sizes must be greater than or equal to iteration space "
+ "static sizes");
}
// TODO: Masking is only supported for dynamic shapes so input vector sizes
/// Emit a suitable vector form for a Linalg op. If provided, `inputVectorSizes`
/// are used to vectorize this operation. `inputVectorSizes` must match the rank
-/// of the iteration space of the operation and the sizes must be smaller or
-/// equal than their counterpart interation space sizes, if static.
+/// of the iteration space of the operation and the input vector sizes must be
+/// greater than or equal to their counterpart iteration space sizes, if static.
/// `inputVectorShapes` also allows the vectorization of operations with dynamic
/// shapes.
LogicalResult mlir::linalg::vectorize(RewriterBase &rewriter, LinalgOp linalgOp,