MLIR
20.0.0git
|
Typedefs | |
using | AsyncMinTaskSizeComputationFunction = std::function< Value(ImplicitLocOpBuilder, scf::ParallelOp)> |
Emit the IR to compute the minimum number of iterations of scf.parallel body that would be viable for a single parallel task. More... | |
Functions | |
bool | isRefCounted (Type type) |
Returns true if the type is reference counted at runtime. More... | |
void | populateAsyncParallelForPatterns (RewritePatternSet &patterns, bool asyncDispatch, int32_t numWorkerThreads, const AsyncMinTaskSizeComputationFunction &computeMinTaskSize) |
Add a pattern to the given pattern list to lower scf.parallel to async operations. More... | |
void | cloneConstantsIntoTheRegion (Region ®ion) |
Clone ConstantLike operations that are defined above the given region and have users in the region into the region entry block. More... | |
void | cloneConstantsIntoTheRegion (Region ®ion, OpBuilder &builder) |
using mlir::async::AsyncMinTaskSizeComputationFunction = typedef std::function<Value(ImplicitLocOpBuilder, scf::ParallelOp)> |
Emit the IR to compute the minimum number of iterations of scf.parallel body that would be viable for a single parallel task.
Allows the user to avoid incurring the overheads of spawning costly parallel tasks in absence of sufficient amount of parallelizable work.
Must return an index type.
Definition at line 28 of file Transforms.h.
void mlir::async::cloneConstantsIntoTheRegion | ( | Region & | region | ) |
Clone ConstantLike operations that are defined above the given region and have users in the region into the region entry block.
We do that to reduce the number of function arguments when we outline async.execute
and scf.parallel
operations body into functions.
Definition at line 15 of file PassDetail.cpp.
Referenced by outlineExecuteOp().
Definition at line 20 of file PassDetail.cpp.
References mlir::OpBuilder::clone(), mlir::Region::front(), mlir::Operation::getResults(), mlir::getUsedValuesDefinedAbove(), mlir::Operation::hasTrait(), mlir::replaceAllUsesInRegionWith(), and mlir::OpBuilder::setInsertionPointToStart().
|
inline |
Returns true if the type is reference counted at runtime.
Definition at line 52 of file Async.h.
Referenced by walkReferenceCountedValues().
void mlir::async::populateAsyncParallelForPatterns | ( | RewritePatternSet & | patterns, |
bool | asyncDispatch, | ||
int32_t | numWorkerThreads, | ||
const AsyncMinTaskSizeComputationFunction & | computeMinTaskSize | ||
) |
Add a pattern to the given pattern list to lower scf.parallel to async operations.
Definition at line 949 of file AsyncParallelFor.cpp.
References mlir::patterns.