Skip to content

Commit

Permalink
Runtime - Update createBufferFromTensorRef() for Buffer API changes i…
Browse files Browse the repository at this point in the history
…n tt-metal

 - Matches changes from tt-metal PR 14394
  • Loading branch information
kmabeeTT committed Oct 30, 2024
1 parent caa7b90 commit a2e64a2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions runtime/include/tt/runtime/detail/ttmetal.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,12 @@ createBufferFromTensorRef(::tt::tt_metal::Device *device,
.page_size = pageSize,
.buffer_type = bufferType,
.buffer_layout = TensorMemoryLayout::BLOCK_SHARDED,
.shard_parameters = shardSpecBuffer,
.allocate = false};
std::shared_ptr<::tt::tt_metal::Buffer> buffer =
::tt::tt_metal::CreateBuffer(shardedBufferConfig);
.shard_parameters = shardSpecBuffer};

assert(tensorRef->address());
buffer->set_address(tensorRef->address());
std::shared_ptr<::tt::tt_metal::Buffer> buffer =
::tt::tt_metal::CreateBuffer(shardedBufferConfig, tensorRef->address());

return buffer;
}
#pragma clang diagnostic pop
Expand Down

0 comments on commit a2e64a2

Please sign in to comment.