From ff339a1591a355227cf9060db62809734b7f8917 Mon Sep 17 00:00:00 2001 From: Vladimir Milosevic <157983820+vmilosevic@users.noreply.github.com> Date: Wed, 20 Nov 2024 22:40:00 +0100 Subject: [PATCH] Uplift third_party/tt-metal to 2024-11-20 (#952) * Uplift third_party/tt-metal to 2024-11-20 * Change createMemoryConfig() to not return ShardSpec if INTERLEAVED - Recent tt-metal check will fire this (and use ShardSpec) even for Interleaved tensors. >> Tensor with shape ttnn.Shape([1, 100[128], 3[32], 100[128]]) cannot be sharded because alignment will have rank greater than 2! --------- Co-authored-by: Kyle Mabee --- .../include/tt/runtime/ttnn/operations/utils.cpp | 12 +++++++++--- third_party/CMakeLists.txt | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/runtime/lib/ttnn/operations/include/tt/runtime/ttnn/operations/utils.cpp b/runtime/lib/ttnn/operations/include/tt/runtime/ttnn/operations/utils.cpp index 435607b87..c595fe26b 100644 --- a/runtime/lib/ttnn/operations/include/tt/runtime/ttnn/operations/utils.cpp +++ b/runtime/lib/ttnn/operations/include/tt/runtime/ttnn/operations/utils.cpp @@ -125,7 +125,10 @@ createMemoryConfig(const ::tt::target::TensorRef *tensorRef) { ::tt::tt_metal::BufferType ttnnBufferType = ::tt::runtime::ttnn::utils::toTTNNBufferType(targetMemorySpace); - return {ttnnMemLayout, ttnnBufferType, shardSpec}; + return {ttnnMemLayout, ttnnBufferType, + ttnnMemLayout == tt_metal::TensorMemoryLayout::INTERLEAVED + ? std::nullopt + : std::make_optional(shardSpec)}; } // Prefer to use this method over the one above @@ -169,8 +172,11 @@ createMemoryConfig(const ::tt::target::MemoryConfigDesc *memcfg, ttnnCoreRangeSet, ttnnShardShape, ::tt::tt_metal::ShardOrientation::ROW_MAJOR, false); - ::ttnn::MemoryConfig memoryConfig = {tensorMemoryLayout, bufferType, - shardSpec}; + ::ttnn::MemoryConfig memoryConfig = { + tensorMemoryLayout, bufferType, + tensorMemoryLayout == tt_metal::TensorMemoryLayout::INTERLEAVED + ? std::nullopt + : std::make_optional(shardSpec)}; return memoryConfig; } diff --git a/third_party/CMakeLists.txt b/third_party/CMakeLists.txt index b1c679a50..4e6175566 100644 --- a/third_party/CMakeLists.txt +++ b/third_party/CMakeLists.txt @@ -1,6 +1,6 @@ include(ExternalProject) -set(TT_METAL_VERSION "f16cadfabebd7654baef73e4ac2c3240b12b0d1d") +set(TT_METAL_VERSION "89fc3ba835854773eaec4274da10044718dee429") if ("$ENV{ARCH_NAME}" STREQUAL "grayskull") set(ARCH_NAME "grayskull")