From a2e64a281e5a6db65f95c4f649b9951900c76a08 Mon Sep 17 00:00:00 2001 From: Kyle Mabee Date: Wed, 30 Oct 2024 16:13:37 +0000 Subject: [PATCH] Runtime - Update createBufferFromTensorRef() for Buffer API changes in tt-metal - Matches changes from tt-metal PR 14394 --- runtime/include/tt/runtime/detail/ttmetal.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/runtime/include/tt/runtime/detail/ttmetal.h b/runtime/include/tt/runtime/detail/ttmetal.h index 83dcaae4b..7ebe75eab 100644 --- a/runtime/include/tt/runtime/detail/ttmetal.h +++ b/runtime/include/tt/runtime/detail/ttmetal.h @@ -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