MLIR  19.0.0git
Namespaces | Macros | Functions
AsyncParallelFor.cpp File Reference
#include "mlir/Dialect/Async/Passes.h"
#include "PassDetail.h"
#include "mlir/Dialect/Arith/IR/Arith.h"
#include "mlir/Dialect/Async/IR/Async.h"
#include "mlir/Dialect/Async/Transforms.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Dialect/SCF/IR/SCF.h"
#include "mlir/IR/IRMapping.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 <utility>
#include "mlir/Dialect/Async/Passes.h.inc"

Go to the source code of this file.

Namespaces

 mlir
 Include the generated interface declarations.
 

Macros

#define GEN_PASS_DEF_ASYNCPARALLELFOR
 
#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 38 of file AsyncParallelFor.cpp.

◆ GEN_PASS_DEF_ASYNCPARALLELFOR

#define GEN_PASS_DEF_ASYNCPARALLELFOR

Definition at line 31 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

Definition at line 254 of file AsyncParallelFor.cpp.

◆ delinearize()

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

Definition at line 200 of file AsyncParallelFor.cpp.

References mlir::ImplicitLocOpBuilder::create().

Referenced by foldExtractFromShapeCast().

◆ doAsyncDispatch()

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

Definition at line 581 of file AsyncParallelFor.cpp.

◆ doSequentialDispatch()

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

Definition at line 654 of file AsyncParallelFor.cpp.

◆ getParallelComputeFunctionType()

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

Definition at line 217 of file AsyncParallelFor.cpp.

◆ integerConstants()

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

Definition at line 191 of file AsyncParallelFor.cpp.

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