From cc5f8ad6934727e0e35b886a785afc5b81afa174 Mon Sep 17 00:00:00 2001 From: Joseph Chu Date: Fri, 21 Feb 2025 09:30:14 +0000 Subject: [PATCH] wip --- tests/ttnn/unit_tests/test_multi_device.py | 1 - tt_metal/api/tt-metalium/mesh_device_view.hpp | 1 + tt_metal/distributed/mesh_device_view.cpp | 2 ++ ttnn/cpp/ttnn/device_operation.hpp | 1 + ttnn/cpp/ttnn/tensor/storage.cpp | 2 +- 5 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/ttnn/unit_tests/test_multi_device.py b/tests/ttnn/unit_tests/test_multi_device.py index 0f093d2a2e42..528fa9e08532 100644 --- a/tests/ttnn/unit_tests/test_multi_device.py +++ b/tests/ttnn/unit_tests/test_multi_device.py @@ -578,7 +578,6 @@ def test_slicing(mesh_device): def test_clone(mesh_device): - pytest.skip("TT-Mesh: logic in clone needs to be fixed: fails with Not implemented") results_11BH = ttnn.from_torch( torch.randn(1, 1, 32, 128), dtype=ttnn.bfloat16, diff --git a/tt_metal/api/tt-metalium/mesh_device_view.hpp b/tt_metal/api/tt-metalium/mesh_device_view.hpp index afe2b49fb058..d8da18ec63b5 100644 --- a/tt_metal/api/tt-metalium/mesh_device_view.hpp +++ b/tt_metal/api/tt-metalium/mesh_device_view.hpp @@ -56,6 +56,7 @@ class MeshDeviceView { [[nodiscard]] DeviceView get_devices(const SimpleMeshShape& submesh_shape) const; [[nodiscard]] DeviceView get_devices() const; [[nodiscard]] size_t num_devices() const; + [[nodiscard]] const MeshCoordinateRange& coord_range() const; [[nodiscard]] bool empty() const noexcept; [[nodiscard]] size_t size() const noexcept; diff --git a/tt_metal/distributed/mesh_device_view.cpp b/tt_metal/distributed/mesh_device_view.cpp index 64b80167f311..3a4018a2ac77 100644 --- a/tt_metal/distributed/mesh_device_view.cpp +++ b/tt_metal/distributed/mesh_device_view.cpp @@ -119,6 +119,8 @@ size_t MeshDeviceView::num_cols() const { } size_t MeshDeviceView::num_devices() const { return devices_.shape().mesh_size(); } +const MeshCoordinateRange& MeshDeviceView::coord_range() const { return devices_.coord_range(); } + bool MeshDeviceView::contains_device(chip_id_t device_id) const { return device_coordinates_.find(device_id) != device_coordinates_.end(); } diff --git a/ttnn/cpp/ttnn/device_operation.hpp b/ttnn/cpp/ttnn/device_operation.hpp index c28e7f6334a3..6c76645f9332 100644 --- a/ttnn/cpp/ttnn/device_operation.hpp +++ b/ttnn/cpp/ttnn/device_operation.hpp @@ -293,6 +293,7 @@ void launch_on_worker_thread(auto cq_id, auto device_operation_id, const auto& o }; if (is_program_cache_enabled) { + TT_THROW("Program cache not yet supported"); auto& program = create_or_get_program_from_cache( program_cache, program_cache_hit, program_hash, operation_attributes, tensor_args, tensor_return_value); diff --git a/ttnn/cpp/ttnn/tensor/storage.cpp b/ttnn/cpp/ttnn/tensor/storage.cpp index ff0f01074929..984c09ba326a 100644 --- a/ttnn/cpp/ttnn/tensor/storage.cpp +++ b/ttnn/cpp/ttnn/tensor/storage.cpp @@ -8,7 +8,7 @@ namespace tt::tt_metal { DeviceStorage::DeviceStorage(std::shared_ptr buffer_) { - TT_THROW("DeviceStorage not implemented for Buffer"); + tt::log_warning("Constructing DeviceStorage from Single-Device Buffer"); buffer = std::move(buffer_); }