MLIR  15.0.0git
Macros | Functions
AsyncParallelFor.cpp File Reference
#include <utility>
#include "PassDetail.h"
#include "mlir/Dialect/Arithmetic/IR/Arithmetic.h"
#include "mlir/Dialect/Async/IR/Async.h"
#include "mlir/Dialect/Async/Passes.h"
#include "mlir/Dialect/Async/Transforms.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Dialect/SCF/IR/SCF.h"
#include "mlir/IR/BlockAndValueMapping.h"
#include "mlir/IR/ImplicitLocOpBuilder.h"
#include "mlir/IR/Matchers.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
#include "mlir/Transforms/RegionUtils.h"
+ Include dependency graph for AsyncParallelFor.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "async-parallel-for"
 

Functions

template<typename ValueRange >
static SmallVector< IntegerAttr > integerConstants (ValueRange values)
 
static SmallVector< Valuedelinearize (ImplicitLocOpBuilder &b, Value index, ArrayRef< Value > tripCounts)
 
static ParallelComputeFunctionType getParallelComputeFunctionType (scf::ParallelOp op, PatternRewriter &rewriter)
 
static ParallelComputeFunction createParallelComputeFunction (scf::ParallelOp op, const ParallelComputeFunctionBounds &bounds, unsigned numBlockAlignedInnerLoops, PatternRewriter &rewriter)
 
static func::FuncOp createAsyncDispatchFunction (ParallelComputeFunction &computeFunc, PatternRewriter &rewriter)
 
static void doAsyncDispatch (ImplicitLocOpBuilder &b, PatternRewriter &rewriter, ParallelComputeFunction &parallelComputeFunction, scf::ParallelOp op, Value blockSize, Value blockCount, const SmallVector< Value > &tripCounts)
 
static void doSequentialDispatch (ImplicitLocOpBuilder &b, PatternRewriter &rewriter, ParallelComputeFunction &parallelComputeFunction, scf::ParallelOp op, Value blockSize, Value blockCount, const SmallVector< Value > &tripCounts)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "async-parallel-for"

Definition at line 33 of file AsyncParallelFor.cpp.

Function Documentation

◆ createAsyncDispatchFunction()

static func::FuncOp createAsyncDispatchFunction ( ParallelComputeFunction &  computeFunc,
PatternRewriter rewriter 
)
static

◆ createParallelComputeFunction()

static ParallelComputeFunction createParallelComputeFunction ( scf::ParallelOp  op,
const ParallelComputeFunctionBounds &  bounds,
unsigned  numBlockAlignedInnerLoops,
PatternRewriter rewriter 
)
static

◆ delinearize()

static SmallVector<Value> delinearize ( ImplicitLocOpBuilder b,
Value  index,
ArrayRef< Value tripCounts 
)
static

Definition at line 195 of file AsyncParallelFor.cpp.

References mlir::ImplicitLocOpBuilder::create().

◆ doAsyncDispatch()

static void doAsyncDispatch ( ImplicitLocOpBuilder b,
PatternRewriter rewriter,
ParallelComputeFunction &  parallelComputeFunction,
scf::ParallelOp  op,
Value  blockSize,
Value  blockCount,
const SmallVector< Value > &  tripCounts 
)
static

◆ doSequentialDispatch()

static void doSequentialDispatch ( ImplicitLocOpBuilder b,
PatternRewriter rewriter,
ParallelComputeFunction &  parallelComputeFunction,
scf::ParallelOp  op,
Value  blockSize,
Value  blockCount,
const SmallVector< Value > &  tripCounts 
)
static

◆ getParallelComputeFunctionType()

static ParallelComputeFunctionType getParallelComputeFunctionType ( scf::ParallelOp  op,
PatternRewriter rewriter 
)
static

◆ integerConstants()

template<typename ValueRange >
static SmallVector<IntegerAttr> integerConstants ( ValueRange  values)
static

Definition at line 186 of file AsyncParallelFor.cpp.

References mlir::m_Constant(), and mlir::matchPattern().

Referenced by doSequentialDispatch().