[mlir][sparse] unifying enterLoopOverTensorAtLvl and enterCoIterationOverTensorsAtLvls
The tensor levels are now explicitly categorized into different `LoopCondKind` to instruct LoopEmitter generate different code for different kinds of condition (e.g., `SparseCond`, `SparseSliceCond`, `SparseAffineIdxCond`, etc) The process of generating a while loop is now dissembled into three steps and they are dispatched to different LoopCondKind handler. 1. Generate LoopCondition (e.g., `pos <= posHi` for `SparseCond`, `slice.isNonEmpty` for `SparseAffineIdxCond`) 2. Generate LoopBody (e.g., compute the coordinates) 3. Generate ExtraChecks (e.g., `if (onSlice(crd))` for `SparseSliceCond`) Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D152464
Loading
Please sign in to comment