MLIR 22.0.0git
ConvertToDestinationStyle.cpp File Reference

Go to the source code of this file.

Functions

static Value createInserts (RewriterBase &rewriter, Location loc, int dim, Value destination, ArrayRef< int64_t > shape, ArrayRef< Value > constants, OperandRange::iterator &elementIt, SmallVectorImpl< Value > &indices)
static void createMemcpy (OpBuilder &b, Location loc, Value tensorSource, Value memrefDest, const linalg::BufferizeToAllocationOptions &options)
 Create a memcpy from the given source tensor to the given destination memref.
static OperationmovePaddingToFillOrGenericOp (RewriterBase &rewriter, Location loc, PadOp padOp, Value dest)
static SmallVector< ValuereifyOrComputeDynamicSizes (OpBuilder &b, Value value)
static Value createAllocationForTensor (RewriterBase &rewriter, Location loc, Value value, const linalg::BufferizeToAllocationOptions &options, Attribute memorySpace={})

Function Documentation

◆ createAllocationForTensor()

Value createAllocationForTensor ( RewriterBase & rewriter,
Location loc,
Value value,
const linalg::BufferizeToAllocationOptions & options,
Attribute memorySpace = {} )
static

◆ createInserts()

Value createInserts ( RewriterBase & rewriter,
Location loc,
int dim,
Value destination,
ArrayRef< int64_t > shape,
ArrayRef< Value > constants,
OperandRange::iterator & elementIt,
SmallVectorImpl< Value > & indices )
static

◆ createMemcpy()

void createMemcpy ( OpBuilder & b,
Location loc,
Value tensorSource,
Value memrefDest,
const linalg::BufferizeToAllocationOptions & options )
static

Create a memcpy from the given source tensor to the given destination memref.

The copy op type can be specified in the options.

Definition at line 56 of file ConvertToDestinationStyle.cpp.

References b, mlir::Value::getType(), mlir::linalg::BufferizeToAllocationOptions::LinalgCopy, mlir::linalg::BufferizeToAllocationOptions::MemrefCopy, and options.

Referenced by mlir::linalg::bufferizeToAllocation().

◆ movePaddingToFillOrGenericOp()

◆ reifyOrComputeDynamicSizes()