Skip to content

Commit

Permalink
Uplift third_party/tt-metal to 2024-11-20 (#952)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
vmilosevic and kmabeeTT authored Nov 20, 2024
1 parent 351a587 commit ff339a1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion third_party/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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")
Expand Down

0 comments on commit ff339a1

Please sign in to comment.