Skip to content

Commit

Permalink
Add Grayskull tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pjanevskiTT committed Oct 23, 2024
1 parent 77afff5 commit 279417f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/api/test_soc_descriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,26 @@ std::size_t get_num_harvested(std::size_t harvesting_mask) {
return num_harvested;
}

// Tests that all physical coordinates are same as all virtual coordinates
// when there is no harvesting.
TEST(SocDescriptor, SocDescriptorGSNoHarvesting) {

tt_SocDescriptor soc_desc = tt_SocDescriptor(test_utils::GetAbsPath("tests/soc_descs/grayskull_10x12.yaml"), 0);

// We expect full grid size since there is no harvesting.
tt_xy_pair worker_grid_size = soc_desc.worker_grid_size;
for (size_t x = 0; x < worker_grid_size.x; x++) {
for (size_t y = 0; y < worker_grid_size.y; y++) {
tt_logical_coords logical_coords = tt_logical_coords(x, y);
tt_virtual_coords virtual_coords = soc_desc.logical_to_virtual_coords(logical_coords);
tt_physical_coords physical_coords = soc_desc.logical_to_physical_coords(logical_coords);

// Virtual and physical coordinates should be the same.
EXPECT_EQ(physical_coords, virtual_coords);
}
}
}

// Tests that all physical coordinates are same as all virtual coordinates
// when there is no harvesting.
TEST(SocDescriptor, SocDescriptorWHNoHarvesting) {
Expand Down

0 comments on commit 279417f

Please sign in to comment.