-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#17477: Adopt ND coordinate system in system mesh, coordinate translation #17926
Conversation
{1, std::make_pair("device.json", SimpleMeshShape(1, 1))}, | ||
{2, std::make_pair("N300.json", SimpleMeshShape(1, 2))}, | ||
{8, std::make_pair("T3000.json", SimpleMeshShape(2, 4))}, | ||
{32, std::make_pair(is_qg ? "QG.json" : "TG.json", SimpleMeshShape(8, 4))}, | ||
{64, std::make_pair("TGG.json", SimpleMeshShape(8, 8))}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keeping these 2 together to ensure things are in sync.
for (auto& [device_range, program] : programs_) { | ||
if (program_idx) { | ||
TT_ASSERT(sem_size == program.get_sem_size(device, logical_core, core_type)); | ||
TT_ASSERT(sem_size == program.get_sem_size(mesh_device.get(), logical_core, core_type)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to expose get_device_index
directly any more.
@@ -112,7 +115,8 @@ std::vector<chip_id_t> SystemMesh::Impl::get_mapped_physical_device_ids(const Me | |||
auto line_coords = MeshDeviceView::get_line_coordinates( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cfjchu is 1D case fundamentally special? Below, the 2D code attempts to "rotate" the shape and the constraint is that every dim has to fit inside SystemMesh
. In ND case, do we keep the same rotating logic + keep the same special case for 1D? Would 2D (or any reduced dimensionality) be a special case too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our WH mesh is 2D physically connected. So for example, when a user requests a 1x8 on a 2x4 physically connected T3000 mesh, we don't constrain the line to be bounded by the max-dim on row/col (i.e. 2, 4). Instead, we do return a line back to the user that snakes the 2D physical mesh and we follow a convention where we snake from top-left going right and then left.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. So we need the special case for 1D representation as there are dependencies, and in the future we might do something similar for collapsing 3D into 2D and so on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😍 . Are these the remaining set of touch points that still use MeshShape
? Can we swap out MeshShape
and SimpleMeshShape
after this?
There is some more stuff in |
I have changes in flight for |
Yep, sg. |
…tion (#17926) ### Ticket #17477 ### Problem description TT-distributed needs to adopt ND coordinate system for mesh primitives. ### What's changed Plumbed `SimpleMeshShape` in `SystemMesh`, logical to physical coordinate translation mapping. ### Checklist - [X] [All post commit](https://github.com/tenstorrent/tt-metal/actions/runs/13395057290) - [X] New/Existing tests provide coverage for changes
…tion (#17926) ### Ticket #17477 ### Problem description TT-distributed needs to adopt ND coordinate system for mesh primitives. ### What's changed Plumbed `SimpleMeshShape` in `SystemMesh`, logical to physical coordinate translation mapping. ### Checklist - [X] [All post commit](https://github.com/tenstorrent/tt-metal/actions/runs/13395057290) - [X] New/Existing tests provide coverage for changes
…tion (#17926) ### Ticket #17477 ### Problem description TT-distributed needs to adopt ND coordinate system for mesh primitives. ### What's changed Plumbed `SimpleMeshShape` in `SystemMesh`, logical to physical coordinate translation mapping. ### Checklist - [X] [All post commit](https://github.com/tenstorrent/tt-metal/actions/runs/13395057290) - [X] New/Existing tests provide coverage for changes
Ticket
#17477
Problem description
TT-distributed needs to adopt ND coordinate system for mesh primitives.
What's changed
Plumbed
SimpleMeshShape
inSystemMesh
, logical to physical coordinate translation mapping.Checklist