MLIR 22.0.0git
mlir::async Namespace Reference

Typedefs

using AsyncMinTaskSizeComputationFunction
 Emit the IR to compute the minimum number of iterations of scf.parallel body that would be viable for a single parallel task.

Functions

bool isRefCounted (Type type)
 Returns true if the type is reference counted at runtime.
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.
void cloneConstantsIntoTheRegion (Region &region)
 Clone ConstantLike operations that are defined above the given region and have users in the region into the region entry block.
void cloneConstantsIntoTheRegion (Region &region, OpBuilder &builder)

Typedef Documentation

◆ AsyncMinTaskSizeComputationFunction

Initial value:
std::function<Value(ImplicitLocOpBuilder, scf::ParallelOp)>
ImplicitLocOpBuilder maintains a 'current location', allowing use of the create<> method without spec...
Definition Builders.h:630
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
Definition Value.h:96

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.

Function Documentation

◆ cloneConstantsIntoTheRegion() [1/2]

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.

References cloneConstantsIntoTheRegion().

Referenced by cloneConstantsIntoTheRegion(), and outlineExecuteOp().

◆ cloneConstantsIntoTheRegion() [2/2]

◆ isRefCounted()

bool mlir::async::isRefCounted ( Type type)
inline

Returns true if the type is reference counted at runtime.

Definition at line 52 of file Async.h.

Referenced by walkReferenceCountedValues().

◆ populateAsyncParallelForPatterns()

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 929 of file AsyncParallelFor.cpp.

References mlir::patterns.