TT-MLIR
|
Public Member Functions | |
LayoutAttr | withGrid (::mlir::MLIRContext *context, ArrayRef< int64_t > tensorShape, GridAttr grid, ArrayRef< std::pair< std::int64_t, std::int64_t >> collapseIntervals={{0, -1}}) |
LayoutAttr | withGrid (::mlir::MLIRContext *context, RankedTensorType ty, GridAttr grid, ArrayRef< std::pair< std::int64_t, std::int64_t >> collapseIntervals={{0, -1}}) |
LayoutAttr | withElementType (::mlir::MLIRContext *context, Type elementType) |
LayoutAttr | withMemorySpace (::mlir::MLIRContext *context, MemorySpace memorySpace) |
LayoutAttr | withMemoryLayout (::mlir::MLIRContext *context, TensorMemoryLayout memLayout) |
LayoutAttr | withShardShape (::mlir::MLIRContext *context, llvm::SmallVector< int64_t > shardShape) |
uint64_t | getMemrefSizeBytes () const |
MemorySpace | getMemorySpace () const |
bool | isSystemMemorySpace () const |
bool | isDeviceMemorySpace () const |
bool | hasShardedTensorMemoryLayout () const |
bool | hasInterleavedTensorMemoryLayout () const |
bool | hasShardedL1TensorMemoryLayout () const |
bool | hasInterleavedL1TensorMemoryLayout () const |
bool | isTiled () const |
Type | getElementType () const |
Type | getScalarElementType () const |
uint64_t | getElementSizeBytes () const |
llvm::SmallVector< int64_t > | getStride (ArrayRef< int64_t > logicalShape) const |
llvm::SmallVector< int64_t > | getPhysicalShape (ArrayRef< int64_t > logicalShape) const |
llvm::SmallVector< int64_t > | getShardShape (bool convertTileToScalar=true) const |
AffineMap | replaceMemoryMapSymbolsWithShardShape (AffineMap physicalMemoryMap) const |
AffineMap | projectOnto (AffineMap linearMap, AffineMap physicalMemoryMap) const |
AffineMap | getIdentityTileLinearMap () const |
llvm::SmallVector< int64_t > | getTiledShape (ArrayRef< int64_t > logicalTensorShape) const |
void | print (::mlir::AsmPrinter &odsPrinter) const |
AffineMap | getLinear () const |
OOBVal | getOobVal () const |
GridAttr | getGrid () const |
MemRefType | getMemref () const |
TensorMemoryLayout | getMemLayout () const |
Static Public Member Functions | |
static LayoutAttr | get (::mlir::MLIRContext *context, ArrayRef< int64_t > tensorShape, Type elementType, MemorySpace memorySpace=MemorySpace::System, GridAttr grid={}, ArrayRef< std::pair< std::int64_t, std::int64_t >> collapseIntervals={{0, -1}}, OOBVal oobVal=OOBVal::Undef, TensorMemoryLayout memLayout=TensorMemoryLayout::None) |
static LayoutAttr | get (::mlir::MLIRContext *context, RankedTensorType ty, MemorySpace memorySpace=MemorySpace::System, GridAttr grid={}, ArrayRef< std::pair< std::int64_t, std::int64_t >> collapseIntervals={{0, -1}}, OOBVal oobVal=OOBVal::Undef, TensorMemoryLayout memLayout=TensorMemoryLayout::None) |
static LayoutAttr | get (::mlir::MLIRContext *context, RankedTensorType ty, MemorySpace memorySpace, GridAttr grid, Type elementType, TensorMemoryLayout memLayout=TensorMemoryLayout::None) |
static LayoutAttr | get (::mlir::MLIRContext *context, AffineMap linear, OOBVal oob_val, GridAttr grid, MemRefType memref, TensorMemoryLayout mem_layout) |
static constexpr ::llvm::StringLiteral | getMnemonic () |
::mlir::Attribute | parse (::mlir::AsmParser &odsParser, ::mlir::Type odsType) |
Static Public Attributes | |
static constexpr ::llvm::StringLiteral | name = "tt.layout" |
static constexpr ::llvm::StringLiteral | dialectName = "tt" |
|
static |
|
static |
|
static |
|
static |
uint64_t mlir::tt::LayoutAttr::getElementSizeBytes | ( | ) | const |
Type mlir::tt::LayoutAttr::getElementType | ( | ) | const |
GridAttr mlir::tt::LayoutAttr::getGrid | ( | ) | const |
AffineMap mlir::tt::LayoutAttr::getIdentityTileLinearMap | ( | ) | const |
AffineMap mlir::tt::LayoutAttr::getLinear | ( | ) | const |
TensorMemoryLayout mlir::tt::LayoutAttr::getMemLayout | ( | ) | const |
MemorySpace mlir::tt::LayoutAttr::getMemorySpace | ( | ) | const |
MemRefType mlir::tt::LayoutAttr::getMemref | ( | ) | const |
uint64_t mlir::tt::LayoutAttr::getMemrefSizeBytes | ( | ) | const |
|
inlinestatic |
OOBVal mlir::tt::LayoutAttr::getOobVal | ( | ) | const |
llvm::SmallVector<int64_t> mlir::tt::LayoutAttr::getPhysicalShape | ( | ArrayRef< int64_t > | logicalShape | ) | const |
Type mlir::tt::LayoutAttr::getScalarElementType | ( | ) | const |
llvm::SmallVector<int64_t> mlir::tt::LayoutAttr::getShardShape | ( | bool | convertTileToScalar = true | ) | const |
llvm::SmallVector<int64_t> mlir::tt::LayoutAttr::getStride | ( | ArrayRef< int64_t > | logicalShape | ) | const |
llvm::SmallVector<int64_t> mlir::tt::LayoutAttr::getTiledShape | ( | ArrayRef< int64_t > | logicalTensorShape | ) | const |
bool mlir::tt::LayoutAttr::hasInterleavedL1TensorMemoryLayout | ( | ) | const |
bool mlir::tt::LayoutAttr::hasInterleavedTensorMemoryLayout | ( | ) | const |
bool mlir::tt::LayoutAttr::hasShardedL1TensorMemoryLayout | ( | ) | const |
bool mlir::tt::LayoutAttr::hasShardedTensorMemoryLayout | ( | ) | const |
|
inline |
|
inline |
bool mlir::tt::LayoutAttr::isTiled | ( | ) | const |
|
static |
void mlir::tt::LayoutAttr::print | ( | ::mlir::AsmPrinter & | odsPrinter | ) | const |
AffineMap mlir::tt::LayoutAttr::projectOnto | ( | AffineMap | linearMap, |
AffineMap | physicalMemoryMap | ||
) | const |
AffineMap mlir::tt::LayoutAttr::replaceMemoryMapSymbolsWithShardShape | ( | AffineMap | physicalMemoryMap | ) | const |
LayoutAttr mlir::tt::LayoutAttr::withElementType | ( | ::mlir::MLIRContext * | context, |
Type | elementType | ||
) |
LayoutAttr mlir::tt::LayoutAttr::withGrid | ( | ::mlir::MLIRContext * | context, |
ArrayRef< int64_t > | tensorShape, | ||
GridAttr | grid, | ||
ArrayRef< std::pair< std::int64_t, std::int64_t >> | collapseIntervals = {{0, -1}} |
||
) |
LayoutAttr mlir::tt::LayoutAttr::withGrid | ( | ::mlir::MLIRContext * | context, |
RankedTensorType | ty, | ||
GridAttr | grid, | ||
ArrayRef< std::pair< std::int64_t, std::int64_t >> | collapseIntervals = {{0, -1}} |
||
) |
LayoutAttr mlir::tt::LayoutAttr::withMemoryLayout | ( | ::mlir::MLIRContext * | context, |
TensorMemoryLayout | memLayout | ||
) |
LayoutAttr mlir::tt::LayoutAttr::withMemorySpace | ( | ::mlir::MLIRContext * | context, |
MemorySpace | memorySpace | ||
) |
LayoutAttr mlir::tt::LayoutAttr::withShardShape | ( | ::mlir::MLIRContext * | context, |
llvm::SmallVector< int64_t > | shardShape | ||
) |
|
static |
|
static |