[Mlir-commits] [mlir] [mlir][Vector] Add utility for computing scalable value bounds (PR #83876)

Benjamin Maxwell llvmlistbot at llvm.org
Fri Mar 8 06:26:53 PST 2024


================
@@ -300,3 +301,132 @@ vector::createUnrollIterator(VectorType vType, int64_t targetRank) {
   shapeToUnroll = shapeToUnroll.slice(0, firstScalableDim);
   return StaticTileOffsetRange(shapeToUnroll, /*unrollStep=*/1);
 }
+
+FailureOr<vector::ConstantOrScalableBound::BoundSize>
+vector::ConstantOrScalableBound::getSize() const {
----------------
MacDue wrote:

It's for converting the `affine_map` to a single quantity. In my mind `computeScalableBound()` is just like `computeConstantBound()`, but it supports scalability. So in many cases you can convert the bound to a single (possibly scalable) value (which is simply represented with a `int64_t` and a scalable flag, like it is in the vector type).

https://github.com/llvm/llvm-project/pull/83876


More information about the Mlir-commits mailing list