MLIR  20.0.0git
Public Member Functions | Public Attributes | List of all members
mlir::linalg::LinalgPromotionOptions Struct Reference

#include "mlir/Dialect/Linalg/Transforms/Transforms.h"

Public Member Functions

LinalgPromotionOptionssetOperandsToPromote (ArrayRef< int64_t > operands)
 
LinalgPromotionOptionssetUseFullTileBuffers (ArrayRef< bool > useFullTiles)
 
LinalgPromotionOptionssetUseFullTileBuffersByDefault (bool use)
 
LinalgPromotionOptionssetAlignment (unsigned align)
 
LinalgPromotionOptionssetMemorySpace (Attribute memorySpc)
 
LinalgPromotionOptionssetUseAlloca (bool use)
 
LinalgPromotionOptionssetAllocationDeallocationFns (AllocBufferCallbackFn const &allocFn, DeallocBufferCallbackFn const &deallocFn)
 
LinalgPromotionOptionssetCopyInOutFns (CopyCallbackFn const &copyIn, CopyCallbackFn const &copyOut)
 

Public Attributes

std::optional< DenseSet< unsigned > > operandsToPromote
 Indices of subViews to promote. More...
 
std::optional< llvm::SmallBitVector > useFullTileBuffers
 If ith element of useFullTiles is true the full view should be used for the promoted buffer of the ith operand in operandsToPromote. More...
 
bool useFullTileBuffersDefault = false
 If true all operands unspecified by useFullTileBuffers will use the full view, otherwise the partial view. More...
 
std::optional< unsigned > alignment
 Alignment of promoted buffer. If std::nullopt do not specify alignment. More...
 
std::optional< AttributememorySpace
 Memory space of promoted buffer. More...
 
bool useAlloca = false
 Use alloca with the default allocation scheme. More...
 
std::optional< AllocBufferCallbackFnallocationFn
 Callback function to do the allocation of the promoted buffer. More...
 
std::optional< DeallocBufferCallbackFndeallocationFn
 
std::optional< CopyCallbackFncopyInFn
 Callback function to do the copy of data to and from the promoted subview. More...
 
std::optional< CopyCallbackFncopyOutFn
 

Detailed Description

Definition at line 353 of file Transforms.h.

Member Function Documentation

◆ setAlignment()

LinalgPromotionOptions& mlir::linalg::LinalgPromotionOptions::setAlignment ( unsigned  align)
inline

Definition at line 385 of file Transforms.h.

References alignment.

◆ setAllocationDeallocationFns()

LinalgPromotionOptions& mlir::linalg::LinalgPromotionOptions::setAllocationDeallocationFns ( AllocBufferCallbackFn const &  allocFn,
DeallocBufferCallbackFn const &  deallocFn 
)
inline

Definition at line 408 of file Transforms.h.

References allocationFn, and deallocationFn.

◆ setCopyInOutFns()

LinalgPromotionOptions& mlir::linalg::LinalgPromotionOptions::setCopyInOutFns ( CopyCallbackFn const &  copyIn,
CopyCallbackFn const &  copyOut 
)
inline

Definition at line 418 of file Transforms.h.

References copyInFn, and copyOutFn.

◆ setMemorySpace()

LinalgPromotionOptions& mlir::linalg::LinalgPromotionOptions::setMemorySpace ( Attribute  memorySpc)
inline

Definition at line 392 of file Transforms.h.

References memorySpace.

◆ setOperandsToPromote()

LinalgPromotionOptions& mlir::linalg::LinalgPromotionOptions::setOperandsToPromote ( ArrayRef< int64_t >  operands)
inline

Definition at line 357 of file Transforms.h.

References operandsToPromote.

◆ setUseAlloca()

LinalgPromotionOptions& mlir::linalg::LinalgPromotionOptions::setUseAlloca ( bool  use)
inline

Definition at line 398 of file Transforms.h.

References useAlloca.

◆ setUseFullTileBuffers()

LinalgPromotionOptions& mlir::linalg::LinalgPromotionOptions::setUseFullTileBuffers ( ArrayRef< bool >  useFullTiles)
inline

Definition at line 368 of file Transforms.h.

References useFullTileBuffers.

◆ setUseFullTileBuffersByDefault()

LinalgPromotionOptions& mlir::linalg::LinalgPromotionOptions::setUseFullTileBuffersByDefault ( bool  use)
inline

Definition at line 379 of file Transforms.h.

References useFullTileBuffersDefault.

Member Data Documentation

◆ alignment

std::optional<unsigned> mlir::linalg::LinalgPromotionOptions::alignment

Alignment of promoted buffer. If std::nullopt do not specify alignment.

Definition at line 384 of file Transforms.h.

Referenced by setAlignment().

◆ allocationFn

std::optional<AllocBufferCallbackFn> mlir::linalg::LinalgPromotionOptions::allocationFn

Callback function to do the allocation of the promoted buffer.

If std::nullopt, then the default allocation scheme of allocating a memref<?xi8> buffer followed by a view operation is used.

Definition at line 405 of file Transforms.h.

Referenced by setAllocationDeallocationFns().

◆ copyInFn

std::optional<CopyCallbackFn> mlir::linalg::LinalgPromotionOptions::copyInFn

Callback function to do the copy of data to and from the promoted subview.

If std::nullopt then a memref.copy is used.

Definition at line 416 of file Transforms.h.

Referenced by setCopyInOutFns().

◆ copyOutFn

std::optional<CopyCallbackFn> mlir::linalg::LinalgPromotionOptions::copyOutFn

Definition at line 417 of file Transforms.h.

Referenced by setCopyInOutFns().

◆ deallocationFn

std::optional<DeallocBufferCallbackFn> mlir::linalg::LinalgPromotionOptions::deallocationFn

Definition at line 406 of file Transforms.h.

Referenced by setAllocationDeallocationFns().

◆ memorySpace

std::optional<Attribute> mlir::linalg::LinalgPromotionOptions::memorySpace

Memory space of promoted buffer.

If std::nullopt do not specify memory space.

Definition at line 391 of file Transforms.h.

Referenced by setMemorySpace().

◆ operandsToPromote

std::optional<DenseSet<unsigned> > mlir::linalg::LinalgPromotionOptions::operandsToPromote

Indices of subViews to promote.

If std::nullopt, try to promote all operands.

Definition at line 356 of file Transforms.h.

Referenced by setOperandsToPromote().

◆ useAlloca

bool mlir::linalg::LinalgPromotionOptions::useAlloca = false

Use alloca with the default allocation scheme.

Definition at line 397 of file Transforms.h.

Referenced by setUseAlloca().

◆ useFullTileBuffers

std::optional<llvm::SmallBitVector> mlir::linalg::LinalgPromotionOptions::useFullTileBuffers

If ith element of useFullTiles is true the full view should be used for the promoted buffer of the ith operand in operandsToPromote.

Otherwise the partial view will be used. The decision is defaulted to useFullTileBuffersDefault when useFullTileBuffers is std::nullopt and for operands missing from useFullTileBuffers.

Definition at line 367 of file Transforms.h.

Referenced by setUseFullTileBuffers().

◆ useFullTileBuffersDefault

bool mlir::linalg::LinalgPromotionOptions::useFullTileBuffersDefault = false

If true all operands unspecified by useFullTileBuffers will use the full view, otherwise the partial view.

Definition at line 378 of file Transforms.h.

Referenced by setUseFullTileBuffersByDefault().


The documentation for this struct was generated from the following file: