This change refactors some of the utilities used to unroll larger vector
computations into smaller vector computations. In fact, the indexing
computations used here are rather generic and are useful in other dialects or
downstream projects. Therefore, a utility for iterating over all possible tile
offsets for a particular pair of static (shape, tiled shape) is introduced in
IndexingUtils and replaces the existing computations in the vector unrolling
transformations. This builds off of the refactoring of IndexingUtils introduced
in 203fad476b7e.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
sorry for missing this
mlir/include/mlir/Dialect/Utils/IndexingUtils.h | ||
---|---|---|
277 | Some basic comments to describe what each entry is and how it is stored (i.e. I believe tileShape is in the original order while sliceStrides is in loopOrder) ? | |
mlir/lib/Dialect/Utils/IndexingUtils.cpp | ||
280 | Does the padding actually happen ? | |
286 | I find this way of iterating followed by a permutation somewhat confusing. Would it be possible to rewrite as something like: SmallVector<int64_t> basis; basis.reserve(...); for ... { basis.push_back(...); } sliceStrides = computeStrides(basis); ? It is arguably a little less efficient to create a temporary basis vector but I would take the piece of mind of not having to triple check the logic :) |
Some basic comments to describe what each entry is and how it is stored (i.e. I believe tileShape is in the original order while sliceStrides is in loopOrder) ?