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

Fix warning for grayskull boards #414

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions device/api/umd/device/tt_cluster_descriptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ class Node;
}

enum BoardType : uint32_t {
N150 = 0,
N300 = 1,
E150 = 2,
P150A = 3,
GALAXY = 4,
UNKNOWN = 5,
E75 = 0,
E150 = 1,
E300 = 2,
N150 = 3,
N300 = 4,
P150A = 5,
GALAXY = 6,
UNKNOWN = 7,
};

class tt_ClusterDescriptor {
Expand Down
14 changes: 9 additions & 5 deletions device/tt_cluster_descriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -737,16 +737,20 @@ void tt_ClusterDescriptor::load_chips_from_connectivity_descriptor(YAML::Node &y
for (const auto &chip_board_type : yaml["boardtype"].as<std::map<int, std::string>>()) {
auto &chip = chip_board_type.first;
BoardType board_type;
if (chip_board_type.second == "n150") {
if (chip_board_type.second == "e75") {
pjanevskiTT marked this conversation as resolved.
Show resolved Hide resolved
board_type = BoardType::E75;
pjanevskiTT marked this conversation as resolved.
Show resolved Hide resolved
} else if (chip_board_type.second == "e150") {
board_type = BoardType::E150;
} else if (chip_board_type.second == "e300") {
board_type = BoardType::E300;
} else if (chip_board_type.second == "n150") {
board_type = BoardType::N150;
} else if (chip_board_type.second == "n300") {
board_type = BoardType::N300;
} else if (chip_board_type.second == "GALAXY") {
board_type = BoardType::GALAXY;
} else if (chip_board_type.second == "e150") {
board_type = BoardType::E150;
} else if (chip_board_type.second == "p150A") {
board_type = BoardType::P150A;
} else if (chip_board_type.second == "GALAXY") {
board_type = BoardType::GALAXY;
} else {
log_warning(
LogSiliconDriver,
Expand Down
23 changes: 23 additions & 0 deletions tests/api/cluster_descriptor_examples/grayskull_e75.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
arch: {
Copy link
Contributor

Choose a reason for hiding this comment

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

thanks!

0: Grayskull,
}

chips: {
}

ethernet_connections: [
]

chips_with_mmio: [
0: 0,
]

# harvest_mask is the bit indicating which tensix row is harvested. So bit 0 = first tensix row; bit 1 = second tensix row etc...
harvesting: {
0: {noc_translation: false, harvest_mask: 0},
}

# This value will be null if the boardtype is unknown, should never happen in practice but to be defensive it would be useful to throw an error on this case.
boardtype: {
0: e75,
}
1 change: 1 addition & 0 deletions tests/api/test_cluster_descriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ TEST(ApiClusterDescriptorTest, TestAllOfflineClusterDescriptors) {
for (std::string cluster_desc_yaml : {
"blackhole_P150.yaml",
"galaxy.yaml",
"grayskull_e75.yaml",
"grayskull_E150.yaml",
"grayskull_E300.yaml",
"wormhole_2xN300_unconnected.yaml",
Expand Down
Loading