Skip to content

Commit

Permalink
Small revert
Browse files Browse the repository at this point in the history
  • Loading branch information
pjanevskiTT committed Dec 16, 2024
1 parent 4b6774d commit 7c807c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions device/tt_soc_descriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,9 +258,9 @@ int tt_SocDescriptor::get_num_dram_channels() const {
}

bool tt_SocDescriptor::is_worker_core(const tt_xy_pair &core) const {
const CoreCoord physical_tensix_core = CoreCoord(core.x, core.y, CoreType::TENSIX, CoordSystem::PHYSICAL);
const std::vector<CoreCoord> &tensix_cores = get_cores(CoreType::TENSIX);
return std::find(tensix_cores.begin(), tensix_cores.end(), physical_tensix_core) != tensix_cores.end();
return (
routing_x_to_worker_x.find(core.x) != routing_x_to_worker_x.end() &&
routing_y_to_worker_y.find(core.y) != routing_y_to_worker_y.end());
}

tt_xy_pair tt_SocDescriptor::get_core_for_dram_channel(int dram_chan, int subchannel) const {
Expand All @@ -273,9 +273,7 @@ CoreCoord tt_SocDescriptor::get_dram_core_for_channel(int dram_chan, int subchan
}

bool tt_SocDescriptor::is_ethernet_core(const tt_xy_pair &core) const {
const CoreCoord eth_coord = CoreCoord(core.x, core.y, CoreType::ETH, CoordSystem::PHYSICAL);
const std::vector<CoreCoord> &eth_coords = get_cores(CoreType::ETH);
return std::find(eth_coords.begin(), eth_coords.end(), eth_coord) != eth_coords.end();
return this->ethernet_core_channel_map.find(core) != ethernet_core_channel_map.end();
}

std::string tt_SocDescriptor::get_soc_descriptor_path(tt::ARCH arch) {
Expand Down
2 changes: 1 addition & 1 deletion tests/api/test_soc_descriptor.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: (c) 2023 Tenstorrent Inc.
* SPDX-FileCopyrightText: (c) 2024 Tenstorrent Inc.
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand Down

0 comments on commit 7c807c5

Please sign in to comment.