TT-MLIR
|
Public Member Functions | |
uint64_t | getShardSizeInBytes () const |
BufferType | getBufferType () const |
TTNNLayoutAttr | withGrid (::mlir::MLIRContext *context, ArrayRef< int64_t > tensorShape, GridAttr grid, ArrayRef< std::pair< std::int64_t, std::int64_t >> collapseIntervals={{0, -1}}) |
TTNNLayoutAttr | withGrid (::mlir::MLIRContext *context, RankedTensorType ty, GridAttr grid, ArrayRef< std::pair< std::int64_t, std::int64_t >> collapseIntervals={{0, -1}}) |
TTNNLayoutAttr | withElementType (::mlir::MLIRContext *context, Type elementType) |
TTNNLayoutAttr | withBufferType (::mlir::MLIRContext *context, BufferType bufferType) |
TTNNLayoutAttr | withMemoryLayout (::mlir::MLIRContext *context, TensorMemoryLayout memLayout) |
TTNNLayoutAttr | withShardShape (::mlir::MLIRContext *context, llvm::SmallVector< int64_t > shardShape) |
bool | isSystemBufferType () const |
bool | isDeviceBufferType () const |
bool | hasShardedTensorMemoryLayout () const |
bool | hasShardedL1TensorMemoryLayout () const |
bool | hasInterleavedL1TensorMemoryLayout () const |
bool | isTiled () const |
Type | getElementType () const |
DataType | getDataTypeFromMemRef () const |
uint64_t | getElementSizeBytes () const |
int64_t | getTensorSizeInBytes (ArrayRef< int64_t > tensorShape, ::mlir::tt::DeviceAttr device) 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 |
GridAttr | getGrid () const |
MemRefType | getMemref () const |
TensorMemoryLayout | getMemLayout () const |
Static Public Member Functions | |
static TTNNLayoutAttr | get (::mlir::MLIRContext *context, ArrayRef< int64_t > tensorShape, Type elementType, BufferType bufferType, GridAttr grid, TensorMemoryLayout memoryLayout, ArrayRef< std::pair< std::int64_t, std::int64_t >> collapseIntervals={{0, -1}}) |
static TTNNLayoutAttr | get (::mlir::MLIRContext *context, AffineMap linear, 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 = "ttnn.ttnn_layout" |
static constexpr ::llvm::StringLiteral | dialectName = "ttnn" |
|
static |
|
static |
BufferType mlir::tt::ttnn::TTNNLayoutAttr::getBufferType | ( | ) | const |
DataType mlir::tt::ttnn::TTNNLayoutAttr::getDataTypeFromMemRef | ( | ) | const |
uint64_t mlir::tt::ttnn::TTNNLayoutAttr::getElementSizeBytes | ( | ) | const |
Type mlir::tt::ttnn::TTNNLayoutAttr::getElementType | ( | ) | const |
GridAttr mlir::tt::ttnn::TTNNLayoutAttr::getGrid | ( | ) | const |
AffineMap mlir::tt::ttnn::TTNNLayoutAttr::getIdentityTileLinearMap | ( | ) | const |
AffineMap mlir::tt::ttnn::TTNNLayoutAttr::getLinear | ( | ) | const |
TensorMemoryLayout mlir::tt::ttnn::TTNNLayoutAttr::getMemLayout | ( | ) | const |
MemRefType mlir::tt::ttnn::TTNNLayoutAttr::getMemref | ( | ) | const |
|
inlinestatic |
llvm::SmallVector<int64_t> mlir::tt::ttnn::TTNNLayoutAttr::getPhysicalShape | ( | ArrayRef< int64_t > | logicalShape | ) | const |
llvm::SmallVector<int64_t> mlir::tt::ttnn::TTNNLayoutAttr::getShardShape | ( | bool | convertTileToScalar = true | ) | const |
uint64_t mlir::tt::ttnn::TTNNLayoutAttr::getShardSizeInBytes | ( | ) | const |
llvm::SmallVector<int64_t> mlir::tt::ttnn::TTNNLayoutAttr::getStride | ( | ArrayRef< int64_t > | logicalShape | ) | const |
int64_t mlir::tt::ttnn::TTNNLayoutAttr::getTensorSizeInBytes | ( | ArrayRef< int64_t > | tensorShape, |
::mlir::tt::DeviceAttr | device | ||
) | const |
llvm::SmallVector<int64_t> mlir::tt::ttnn::TTNNLayoutAttr::getTiledShape | ( | ArrayRef< int64_t > | logicalTensorShape | ) | const |
bool mlir::tt::ttnn::TTNNLayoutAttr::hasInterleavedL1TensorMemoryLayout | ( | ) | const |
bool mlir::tt::ttnn::TTNNLayoutAttr::hasShardedL1TensorMemoryLayout | ( | ) | const |
bool mlir::tt::ttnn::TTNNLayoutAttr::hasShardedTensorMemoryLayout | ( | ) | const |
|
inline |
|
inline |
bool mlir::tt::ttnn::TTNNLayoutAttr::isTiled | ( | ) | const |
|
static |
void mlir::tt::ttnn::TTNNLayoutAttr::print | ( | ::mlir::AsmPrinter & | odsPrinter | ) | const |
AffineMap mlir::tt::ttnn::TTNNLayoutAttr::projectOnto | ( | AffineMap | linearMap, |
AffineMap | physicalMemoryMap | ||
) | const |
AffineMap mlir::tt::ttnn::TTNNLayoutAttr::replaceMemoryMapSymbolsWithShardShape | ( | AffineMap | physicalMemoryMap | ) | const |
TTNNLayoutAttr mlir::tt::ttnn::TTNNLayoutAttr::withBufferType | ( | ::mlir::MLIRContext * | context, |
BufferType | bufferType | ||
) |
TTNNLayoutAttr mlir::tt::ttnn::TTNNLayoutAttr::withElementType | ( | ::mlir::MLIRContext * | context, |
Type | elementType | ||
) |
TTNNLayoutAttr mlir::tt::ttnn::TTNNLayoutAttr::withGrid | ( | ::mlir::MLIRContext * | context, |
ArrayRef< int64_t > | tensorShape, | ||
GridAttr | grid, | ||
ArrayRef< std::pair< std::int64_t, std::int64_t >> | collapseIntervals = {{0, -1}} |
||
) |
TTNNLayoutAttr mlir::tt::ttnn::TTNNLayoutAttr::withGrid | ( | ::mlir::MLIRContext * | context, |
RankedTensorType | ty, | ||
GridAttr | grid, | ||
ArrayRef< std::pair< std::int64_t, std::int64_t >> | collapseIntervals = {{0, -1}} |
||
) |
TTNNLayoutAttr mlir::tt::ttnn::TTNNLayoutAttr::withMemoryLayout | ( | ::mlir::MLIRContext * | context, |
TensorMemoryLayout | memLayout | ||
) |
TTNNLayoutAttr mlir::tt::ttnn::TTNNLayoutAttr::withShardShape | ( | ::mlir::MLIRContext * | context, |
llvm::SmallVector< int64_t > | shardShape | ||
) |
|
static |
|
static |