-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Ticket N/A ### Problem description Expose mesh events to TTNN, further integration of TT-distributed with TTNN. ### What's changed Related cleanups bundled in this PR: * Make `EnqueueRecordEvent`, `EnqueueRecordEventToHost` return `MeshEvent` by value, instead of accepting `std::shared_ptr<MeshEvent>` and mutating the reference internally. * Make `EnqueueWaitForEvent` and `EventSynchronize` accept `MeshEvent` by constant reference. * Expose `MeshCoordinateRange` to TTNN - this is needed for the `MeshEvent` APIs. ### Checklist - [X] [All post commit](https://github.com/tenstorrent/tt-metal/actions/runs/13577312078) - [X] New/Existing tests provide coverage for changes - ran `MeshEvents` tests from `distributed_unit_tests`
- Loading branch information
1 parent
b20f868
commit e05b927
Showing
23 changed files
with
238 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// SPDX-FileCopyrightText: © 2025 Tenstorrent Inc. | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#include <mesh_event.hpp> | ||
|
||
namespace tt::tt_metal::distributed { | ||
|
||
MeshEvent::MeshEvent(uint32_t id, MeshDevice* device, uint32_t mesh_cq_id, const MeshCoordinateRange& device_range) : | ||
id_(id), device_(device), mesh_cq_id_(mesh_cq_id), device_range_(device_range) {} | ||
|
||
uint32_t MeshEvent::id() const { return id_; } | ||
MeshDevice* MeshEvent::device() const { return device_; } | ||
uint32_t MeshEvent::mesh_cq_id() const { return mesh_cq_id_; } | ||
const MeshCoordinateRange& MeshEvent::device_range() const { return device_range_; } | ||
|
||
std::ostream& operator<<(std::ostream& os, const MeshEvent& event) { | ||
os << "MeshEvent(id=" << event.id() << ", device_id=" << event.device()->id() | ||
<< ", mesh_cq_id=" << event.mesh_cq_id() << ", device_range=" << event.device_range() << ")"; | ||
return os; | ||
} | ||
|
||
} // namespace tt::tt_metal::distributed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.