Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for L1 Interleaved tensors in getTensorSizeInBytes (Issue #1292) #1578

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions lib/Dialect/TTNN/IR/TTNNOpsAttrs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,12 @@ mlir::tt::DataType TTNNLayoutAttr::getDataType() const {
return elementTypeToDataType(elementType);
}

// Gets the size of shard in bytes
// Get the size of the element in bytes
//
// This function returns the size of the shard in bytes.
// Size is calculated by multiplying shard shape with element size.
// This function returns the size of a single tensor element in bytes.
// Distinction is made between scalar types and TileType.
//
// return The size of the shard in bytes.
// return The size of the element in bytes.
uint64_t TTNNLayoutAttr::getElementSizeBytes() const {
mlir::Type elementType = getElementType();
if (isTiled()) {
Expand All @@ -177,7 +177,7 @@ uint64_t TTNNLayoutAttr::getElementSizeBytes() const {
// Return the shape of the shard.
// Example: memref<2x2x!tt.tile<32x32xf32>> -> { 2, 2 }
// Example: memref<128x128xf32> -> { 128, 128 }
// Example: memref<2x3!tt.tile<32x32xf32>> -> { 2, 3 }
// Example: memref<2x3x!tt.tile<32x32xf32>> -> { 2, 3 }
//
// return The shape of the shard.
llvm::SmallVector<int64_t> TTNNLayoutAttr::getShardShape() const {
Expand Down
Loading