TT-MLIR
|
Public Member Functions | |
MetalLayoutAttr | withGrid (::mlir::MLIRContext *context, ArrayRef< int64_t > tensorShape, GridAttr grid, ArrayRef< std::pair< std::int64_t, std::int64_t >> collapseIntervals={{0, -1}}) |
MetalLayoutAttr | withGrid (::mlir::MLIRContext *context, RankedTensorType ty, GridAttr grid, ArrayRef< std::pair< std::int64_t, std::int64_t >> collapseIntervals={{0, -1}}) |
MetalLayoutAttr | withElementType (::mlir::MLIRContext *context, Type elementType) |
MetalLayoutAttr | withMemorySpace (::mlir::MLIRContext *context, MemorySpace memorySpace) |
MetalLayoutAttr | withMemoryLayout (::mlir::MLIRContext *context, TensorMemoryLayout memLayout) |
MetalLayoutAttr | 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 MetalLayoutAttr | 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 MetalLayoutAttr | 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 MetalLayoutAttr | get (::mlir::MLIRContext *context, RankedTensorType ty, MemorySpace memorySpace, GridAttr grid, Type elementType, TensorMemoryLayout memLayout=TensorMemoryLayout::None) |
static MetalLayoutAttr | 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.metal_layout" |
static constexpr ::llvm::StringLiteral | dialectName = "tt" |
|
static |
|
static |
|
static |
|
static |
uint64_t mlir::tt::MetalLayoutAttr::getElementSizeBytes | ( | ) | const |
Type mlir::tt::MetalLayoutAttr::getElementType | ( | ) | const |
GridAttr mlir::tt::MetalLayoutAttr::getGrid | ( | ) | const |
AffineMap mlir::tt::MetalLayoutAttr::getIdentityTileLinearMap | ( | ) | const |
AffineMap mlir::tt::MetalLayoutAttr::getLinear | ( | ) | const |
TensorMemoryLayout mlir::tt::MetalLayoutAttr::getMemLayout | ( | ) | const |
MemorySpace mlir::tt::MetalLayoutAttr::getMemorySpace | ( | ) | const |
MemRefType mlir::tt::MetalLayoutAttr::getMemref | ( | ) | const |
uint64_t mlir::tt::MetalLayoutAttr::getMemrefSizeBytes | ( | ) | const |
|
inlinestatic |
OOBVal mlir::tt::MetalLayoutAttr::getOobVal | ( | ) | const |
llvm::SmallVector<int64_t> mlir::tt::MetalLayoutAttr::getPhysicalShape | ( | ArrayRef< int64_t > | logicalShape | ) | const |
Type mlir::tt::MetalLayoutAttr::getScalarElementType | ( | ) | const |
llvm::SmallVector<int64_t> mlir::tt::MetalLayoutAttr::getShardShape | ( | bool | convertTileToScalar = true | ) | const |
llvm::SmallVector<int64_t> mlir::tt::MetalLayoutAttr::getStride | ( | ArrayRef< int64_t > | logicalShape | ) | const |
llvm::SmallVector<int64_t> mlir::tt::MetalLayoutAttr::getTiledShape | ( | ArrayRef< int64_t > | logicalTensorShape | ) | const |
bool mlir::tt::MetalLayoutAttr::hasInterleavedL1TensorMemoryLayout | ( | ) | const |
bool mlir::tt::MetalLayoutAttr::hasInterleavedTensorMemoryLayout | ( | ) | const |
bool mlir::tt::MetalLayoutAttr::hasShardedL1TensorMemoryLayout | ( | ) | const |
bool mlir::tt::MetalLayoutAttr::hasShardedTensorMemoryLayout | ( | ) | const |
|
inline |
|
inline |
bool mlir::tt::MetalLayoutAttr::isTiled | ( | ) | const |
|
static |
void mlir::tt::MetalLayoutAttr::print | ( | ::mlir::AsmPrinter & | odsPrinter | ) | const |
AffineMap mlir::tt::MetalLayoutAttr::projectOnto | ( | AffineMap | linearMap, |
AffineMap | physicalMemoryMap | ||
) | const |
AffineMap mlir::tt::MetalLayoutAttr::replaceMemoryMapSymbolsWithShardShape | ( | AffineMap | physicalMemoryMap | ) | const |
MetalLayoutAttr mlir::tt::MetalLayoutAttr::withElementType | ( | ::mlir::MLIRContext * | context, |
Type | elementType | ||
) |
MetalLayoutAttr mlir::tt::MetalLayoutAttr::withGrid | ( | ::mlir::MLIRContext * | context, |
ArrayRef< int64_t > | tensorShape, | ||
GridAttr | grid, | ||
ArrayRef< std::pair< std::int64_t, std::int64_t >> | collapseIntervals = {{0, -1}} |
||
) |
MetalLayoutAttr mlir::tt::MetalLayoutAttr::withGrid | ( | ::mlir::MLIRContext * | context, |
RankedTensorType | ty, | ||
GridAttr | grid, | ||
ArrayRef< std::pair< std::int64_t, std::int64_t >> | collapseIntervals = {{0, -1}} |
||
) |
MetalLayoutAttr mlir::tt::MetalLayoutAttr::withMemoryLayout | ( | ::mlir::MLIRContext * | context, |
TensorMemoryLayout | memLayout | ||
) |
MetalLayoutAttr mlir::tt::MetalLayoutAttr::withMemorySpace | ( | ::mlir::MLIRContext * | context, |
MemorySpace | memorySpace | ||
) |
MetalLayoutAttr mlir::tt::MetalLayoutAttr::withShardShape | ( | ::mlir::MLIRContext * | context, |
llvm::SmallVector< int64_t > | shardShape | ||
) |
|
static |
|
static |