|
MLIR
22.0.0git
|
Utility class used to generate nested loops with ranges described by loopRanges and loop type described by the iteratorTypes.
More...
#include "mlir/Dialect/Linalg/Utils/Utils.h"
Public Member Functions | |
| void | doit (OpBuilder &b, Location loc, ArrayRef< Range > loopRanges, LinalgOp linalgOp, ArrayRef< utils::IteratorType > iteratorTypes, function_ref< scf::ValueVector(OpBuilder &, Location, ValueRange, ValueRange)> bodyBuilderFn, ArrayRef< linalg::ProcInfo > procInfo) |
| Specialization to build an scf "for" nest. More... | |
| void | doit (OpBuilder &b, Location loc, ArrayRef< Range > loopRanges, LinalgOp linalgOp, ArrayRef< utils::IteratorType > iteratorTypes, function_ref< scf::ValueVector(OpBuilder &, Location, ValueRange, ValueRange)> bodyBuilderFn, ArrayRef< linalg::ProcInfo >) |
| Specialization to build affine "for" nest. More... | |
| void | doit (OpBuilder &b, Location loc, ArrayRef< Range > loopRanges, LinalgOp linalgOp, ArrayRef< utils::IteratorType > iteratorTypes, function_ref< scf::ValueVector(OpBuilder &, Location, ValueRange, ValueRange)> bodyBuilderFn, ArrayRef< linalg::ProcInfo > procInfo) |
| Specialization for generating a mix of parallel and sequential scf loops. More... | |
Static Public Member Functions | |
| static void | doit (OpBuilder &b, Location loc, ArrayRef< Range > loopRanges, LinalgOp linalgOp, ArrayRef< utils::IteratorType > iteratorTypes, function_ref< scf::ValueVector(OpBuilder &, Location, ValueRange, ValueRange)> bodyBuilderFn, ArrayRef< linalg::ProcInfo > procInfo={}) |
Utility class used to generate nested loops with ranges described by loopRanges and loop type described by the iteratorTypes.
bodyBuilderFn is used to generate the body of the innermost loop. It is passed a range of loop induction variables and a range of operand values to use.
| void mlir::linalg::GenerateLoopNest< scf::ForOp >::doit | ( | OpBuilder & | b, |
| Location | loc, | ||
| ArrayRef< Range > | loopRanges, | ||
| LinalgOp | linalgOp, | ||
| ArrayRef< utils::IteratorType > | iteratorTypes, | ||
| function_ref< scf::ValueVector(OpBuilder &, Location, ValueRange, ValueRange)> | bodyBuilderFn, | ||
| ArrayRef< linalg::ProcInfo > | procInfo | ||
| ) |
Specialization to build an scf "for" nest.
Definition at line 336 of file Utils.cpp.
References mlir::scf::buildLoopNest(), mlir::detail::enumerate(), mlir::scf::LoopNest::loops, mlir::affine::mapLoopToProcessorIds(), and unpackRanges().
| void mlir::linalg::GenerateLoopNest< scf::ParallelOp >::doit | ( | OpBuilder & | b, |
| Location | loc, | ||
| ArrayRef< Range > | loopRanges, | ||
| LinalgOp | linalgOp, | ||
| ArrayRef< utils::IteratorType > | iteratorTypes, | ||
| function_ref< scf::ValueVector(OpBuilder &, Location, ValueRange, ValueRange)> | bodyBuilderFn, | ||
| ArrayRef< linalg::ProcInfo > | procInfo | ||
| ) |
Specialization for generating a mix of parallel and sequential scf loops.
Definition at line 546 of file Utils.cpp.
References mlir::detail::enumerate(), mlir::linalg::generateParallelLoopNest(), mlir::linalg::None, unpackRanges(), and mlir::linalg::updateBoundsForCyclicDistribution().
|
static |
Referenced by linalgOpToLoopsImpl().
| void mlir::linalg::GenerateLoopNest< AffineForOp >::doit | ( | OpBuilder & | b, |
| Location | loc, | ||
| ArrayRef< Range > | loopRanges, | ||
| LinalgOp | linalgOp, | ||
| ArrayRef< utils::IteratorType > | iteratorTypes, | ||
| function_ref< scf::ValueVector(OpBuilder &, Location, ValueRange, ValueRange)> | bodyBuilderFn, | ||
| ArrayRef< linalg::ProcInfo > | |||
| ) |
Specialization to build affine "for" nest.
Definition at line 379 of file Utils.cpp.
References mlir::affine::buildAffineLoopNest(), mlir::getConstantIntValue(), and unpackRanges().