[Mlir-commits] [mlir] [mlir][vector] Add `actualRank` output parameter to `createUnrollIterator()` (PR #94197)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Mon Jun 3 09:54:05 PDT 2024
================
@@ -86,20 +86,24 @@ bool isContiguousSlice(MemRefType memrefType, VectorType vectorType);
///
/// If no leading dimensions can be unrolled an empty optional will be returned.
///
+/// The actual rank the vector type can be unrolled to can be discovered by
+/// passing a pointer (to an int64_t) to the optional `actualRank` parameter.
+///
----------------
banach-space wrote:
Now I see why I got confused. Basically, information specific to scalable vectors is split across two paragraphs (with a paragraph in between). Let's fix that:
```
/// Returns an iterator for all positions in the leading dimensions of `vType`
/// up to the `targetRank`.
///
/// If any leading dimension before the `targetRank` is
/// scalable (so cannot be unrolled), it will return an iterator for positions
/// up to the first scalable dimension. In such cases, the actual rank the vector
/// type can be unrolled to can be discovered by passing a pointer (to an int64_t)
/// to the optional `actualRank` parameter.
///
/// If no leading dimensions can be unrolled an empty optional will be returned.
```
WDYT? Feel free to re-use or change, but please merge the info regarding scalable vectors into one paragraph.
Also, it might be worth renaming `targetRank` as `targetRankForScalableVecs` to hint that in all other cases (fixed-width) `targetRank` is respected.
https://github.com/llvm/llvm-project/pull/94197
More information about the Mlir-commits
mailing list