Skip to content

Commit

Permalink
Uplift third_party/tt-metal to c2d7b099da7b194475ca7e6cf18c2eff496f86…
Browse files Browse the repository at this point in the history
…6c 2024-12-10 (#1546)

* Uplift third_party/tt-metal to c2d7b099da7b194475ca7e6cf18c2eff496f866c 2024-12-10

* Update MeshShape construction no longer a std::pair

* Update ::ttnn::operations::conv::conv2d::conv2d() solve compile error

 - tt-metal moved 4 fields from Conv2dConfig (that we used default values for)
   and now takes optional DeviceComputeKernelConfig arg.
 - Provide std::nullopt for this new arg, it maintains same defaults as before
    const MathFidelity default_fidelity = MathFidelity::HiFi4
    bool default_approx_mode = true,
    bool default_fp32_acc = false,
    bool default_l1_acc = false,

---------

Co-authored-by: kmitrovicTT <[email protected]>
Co-authored-by: Kyle Mabee <[email protected]>
  • Loading branch information
3 people authored Dec 11, 2024
1 parent b72ba03 commit 1941cf5
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
3 changes: 1 addition & 2 deletions runtime/lib/common/system_desc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,7 @@ std::pair<::tt::runtime::SystemDesc, DeviceIds> getCurrentSystemDesc() {
size_t numDevices = ::tt::tt_metal::GetNumAvailableDevices();
std::vector<chip_id_t> deviceIds(numDevices);
std::iota(deviceIds.begin(), deviceIds.end(), 0);
::tt::tt_metal::distributed::MeshShape meshShape =
std::make_pair(1, numDevices);
::tt::tt_metal::distributed::MeshShape meshShape = {1, numDevices};
std::shared_ptr<::tt::tt_metal::distributed::MeshDevice> meshDevice =
::tt::tt_metal::distributed::MeshDevice::create(
meshShape, DEFAULT_L1_SMALL_SIZE, DEFAULT_TRACE_REGION_SIZE, 1,
Expand Down
4 changes: 2 additions & 2 deletions runtime/lib/ttmetal/runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ size_t getNumAvailableDevices() {

Device openDevice(DeviceIds const &deviceIds, size_t numHWCQs) {
LOG_ASSERT(deviceIds.size(), "No devices specified");
::tt::tt_metal::distributed::MeshShape grid =
std::make_pair(1, deviceIds.size());

::tt::tt_metal::distributed::MeshShape grid = {1, deviceIds.size()};
std::shared_ptr<::tt::tt_metal::distributed::MeshDevice> meshDevice =
::tt::tt_metal::distributed::MeshDevice::create(
grid, DEFAULT_L1_SMALL_SIZE, DEFAULT_TRACE_REGION_SIZE, numHWCQs,
Expand Down
6 changes: 5 additions & 1 deletion runtime/lib/ttnn/operations/conv/conv2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ void run(const ::tt::target::ttnn::Conv2dOp *op, ProgramContext &context) {
auto config = ::ttnn::operations::conv::Conv2dConfig();
config.dtype = utils::getDataType(op->input());
config.weights_dtype = utils::getDataType(op->weight());

// Use defaults for now, until compiler drives this.
std::optional<::ttnn::DeviceComputeKernelConfig> computeConfig = std::nullopt;

::ttnn::MemoryConfig outMemConfig =
::tt::runtime::ttnn::utils::createMemoryConfig(op->out());
DeviceVariant targetDevice =
Expand All @@ -37,7 +41,7 @@ void run(const ::tt::target::ttnn::Conv2dOp *op, ProgramContext &context) {
{op->stride_height(), op->stride_width()},
{op->padding_height(), op->padding_width()},
{op->dilation_height(), op->dilation_width()}, op->groups(), bias,
config, outMemConfig));
config, computeConfig, outMemConfig));
},
targetDevice);

Expand Down
3 changes: 1 addition & 2 deletions runtime/lib/ttnn/runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,7 @@ size_t getNumAvailableDevices() {

Device openDevice(DeviceIds const &deviceIds, size_t numHWCQs) {
LOG_ASSERT(deviceIds.size(), "No devices specified");
::tt::tt_metal::distributed::MeshShape grid =
std::make_pair(1, deviceIds.size());
::tt::tt_metal::distributed::MeshShape grid = {1, deviceIds.size()};
std::shared_ptr<::ttnn::MeshDevice> meshDevice = ::ttnn::MeshDevice::create(
grid, kL1SmallSize, DEFAULT_TRACE_REGION_SIZE, numHWCQs,
::tt::tt_metal::DispatchCoreType::WORKER);
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 "7768e89929915f40f7fdb45e352dd4b83f335168")
set(TT_METAL_VERSION "c2d7b099da7b194475ca7e6cf18c2eff496f866c")

if ("$ENV{ARCH_NAME}" STREQUAL "grayskull")
set(ARCH_NAME "grayskull")
Expand Down

0 comments on commit 1941cf5

Please sign in to comment.