[mlir][Affine] Add affine.delinearize_index operation
This change adds a new AffineDelinearizeIndexOp to the affine dialect. The operation accepts an index type as well as a basis (array of index values) representing how the index should be decomposed into a multi-index. The decomposition obeys a canonical semantic that treats the final basis element as "fastest varying" and the first basis element as "slowest varying". A naive lowering of the operation using a sequence of AffineApplyOps is given. RFC was discussed on discourse here: https://discourse.llvm.org/t/rfc-tensor-extracting-slices-from-tensor-collapse-shape/64034 Reviewed By: bondhugula, nicolasvasilache Differential Revision: https://reviews.llvm.org/D131997
Loading
Please sign in to comment