Skip to content
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

#12883: Add initial unit tests for N300 #12922

Merged
merged 3 commits into from
Sep 23, 2024
Merged

Conversation

Aswinmcw
Copy link
Contributor

@Aswinmcw Aswinmcw commented Sep 20, 2024

Tracking Issue : #12883

Currently we don't have any tests for CCL to be run in N300, this PR will add initial tests to be run as post commit

Checklist

from models.utility_functions import skip_for_grayskull


def is_unsupported_case(input_shape, dim, mem_config, num_devices, num_links, input_dtype, layout):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it's still the same check as in test_all_gather.py. Please import and use that one instead.

return False, ""


def run_all_gather_on_n300_impl(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we commonize this with the main run function from test all-gather? Really the only difference should be the device count check - everything else I believe should be commonizable.

if len(all_devices) != 2:
pytest.skip("Not N300!")

for device in all_devices:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same commonization comment

if (this->receiver_device_id == this->sender_device_id) {
TT_FATAL(input_tensor.device()->get_ethernet_sockets(this->receiver_device_id.value()).size() >= 2 * this->num_links, "2 Device all gather requires at least 2 eth connections per link");
} else {
if (this->receiver_device_id != this->sender_device_id) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should just be able to delete the condition. For 2 chip, we should always have topology linear anyways, so the checks inside should always pass.

@Aswinmcw Aswinmcw merged commit 96fd0df into main Sep 23, 2024
122 of 123 checks passed
@Aswinmcw Aswinmcw deleted the Aswinmcw/n300_unit_tests branch September 23, 2024 06:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Initial N300 CCL unit tests
3 participants