MLIR 24.0.0git
CreateAsyncGroups.cpp File Reference

Go to the source code of this file.

Functions

template<typename OpTy>
static bool isContiguousXferOp (OpTy op)
 Return "true" if the given vector transfer op is contiguous and suitable for replacement with an async copy.
static bool isContiguousStore (Operation *write)
 Return "true" if the given op is a contiguous and suitable vector.transfer_write or vector.store op.
static bool isContiguousRead (Operation *read)
 Return "true" if the given op is a contiguous and suitable vector.transfer_read or vector.load op.
static FailureOr< TransferMask > getMaskOp (Operation *loadOp)
 If the given vector load op has a mask that is defined by vector.create_mask, return that op.
static Value buildNumReadElements (OpBuilder &b, Location loc, Operation *readOp)
 Build an SSA value that represents the number of read elements.
static bool resultsInSupportedAsyncCopy (MemRefType memrefType, VectorType vecType)
 Return "true" if the conversion to async copy is supported by "async copy".

Function Documentation

◆ buildNumReadElements()

Value buildNumReadElements ( OpBuilder & b,
Location loc,
Operation * readOp )
static

Build an SSA value that represents the number of read elements.

Definition at line 89 of file CreateAsyncGroups.cpp.

References b, mlir::arith::ConstantIndexOp::create(), mlir::getConstantIntValue(), and getMaskOp().

Referenced by mlir::nvgpu::createAsyncGroups().

◆ getMaskOp()

FailureOr< TransferMask > getMaskOp ( Operation * loadOp)
static

If the given vector load op has a mask that is defined by vector.create_mask, return that op.

Definition at line 60 of file CreateAsyncGroups.cpp.

Referenced by buildNumReadElements(), and mlir::nvgpu::createAsyncGroups().

◆ isContiguousRead()

bool isContiguousRead ( Operation * read)
static

Return "true" if the given op is a contiguous and suitable vector.transfer_read or vector.load op.

Definition at line 43 of file CreateAsyncGroups.cpp.

References isContiguousXferOp().

Referenced by mlir::nvgpu::createAsyncGroups().

◆ isContiguousStore()

bool isContiguousStore ( Operation * write)
static

Return "true" if the given op is a contiguous and suitable vector.transfer_write or vector.store op.

Definition at line 34 of file CreateAsyncGroups.cpp.

References isContiguousXferOp().

Referenced by mlir::nvgpu::createAsyncGroups().

◆ isContiguousXferOp()

template<typename OpTy>
bool isContiguousXferOp ( OpTy op)
static

Return "true" if the given vector transfer op is contiguous and suitable for replacement with an async copy.

An op masked by an enclosing vector.mask is not: replacing it would drop the mask and leave non-maskable ops inside the vector.mask region.

Definition at line 25 of file CreateAsyncGroups.cpp.

References mlir::nvgpu::getMemrefOperand(), and mlir::getType().

Referenced by isContiguousRead(), and isContiguousStore().

◆ resultsInSupportedAsyncCopy()

bool resultsInSupportedAsyncCopy ( MemRefType memrefType,
VectorType vecType )
static

Return "true" if the conversion to async copy is supported by "async copy".

Definition at line 149 of file CreateAsyncGroups.cpp.

References mlir::Type::getIntOrFloatBitWidth(), and mlir::Type::isIntOrFloat().

Referenced by mlir::nvgpu::createAsyncGroups().