The FoldSubView transformation contains a utility that takes a set of
indices in the domain of a memref.subview result and transform them
into the domain of the memref.subview's source. This function is
useful more widely, especially when "subview folding" needs to be
implemented in other dialects. It is therefore moved under
MemRef/Utils.h and renamed to a memref::invertSubViewIndexMapping.
Details
Details
- Reviewers
ThomasRaoux nicolasvasilache
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
@christopherbate note https://reviews.llvm.org/D128986 which also supports expand / collapse.
I suspect we can refactor at finer granularity and make the individual parts more composable (i.e. make OpFoldResult and AffineApply happen under the hood rather than have to maintain all this if/else everywhere).
mlir/include/mlir/Dialect/MemRef/Utils/MemRefUtils.h | ||
---|---|---|
39 | invert is a misnomer IMO, this is better thought of as folding through a subview. |
Comment Actions
Closing in favor of introducing interface. Here is the draft diff: https://reviews.llvm.org/D134393
invert is a misnomer IMO, this is better thought of as folding through a subview.