diff --git a/blackhole_1chip_cluster.yaml b/blackhole_1chip_cluster.yaml deleted file mode 100644 index 5091db51..00000000 --- a/blackhole_1chip_cluster.yaml +++ /dev/null @@ -1,25 +0,0 @@ -arch: { - 0: Blackhole, -} - -chips: { - 0: [0,0,0,0], -} - -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: n150, -} - diff --git a/device/hugepage.h b/device/hugepage.h index 95d9033e..d12b1396 100644 --- a/device/hugepage.h +++ b/device/hugepage.h @@ -27,4 +27,4 @@ std::string find_hugepage_dir(std::size_t pagesize); // Today we assume there's only one pipeline running within the system. // One hugepage per device such that each device gets unique memory. int open_hugepage_file(const std::string &dir, chip_id_t physical_device_id, uint16_t channel); -} \ No newline at end of file +} diff --git a/device/libs/create_ethernet_map.h b/device/libs/create_ethernet_map.h index 84164085..247f40e5 100644 --- a/device/libs/create_ethernet_map.h +++ b/device/libs/create_ethernet_map.h @@ -1,3 +1,9 @@ +/* + * SPDX-FileCopyrightText: (c) 2024 Tenstorrent Inc. + * + * SPDX-License-Identifier: Apache-2.0 + */ + // External function to create the cluster descriptor yaml file. extern "C" { int create_ethernet_map(char *file); diff --git a/device/tt_cluster_descriptor.cpp b/device/tt_cluster_descriptor.cpp index 9604318a..34dd2165 100644 --- a/device/tt_cluster_descriptor.cpp +++ b/device/tt_cluster_descriptor.cpp @@ -523,16 +523,21 @@ void tt_ClusterDescriptor::load_ethernet_connections_from_connectivity_descripto } void tt_ClusterDescriptor::load_chips_from_connectivity_descriptor(YAML::Node &yaml, tt_ClusterDescriptor &desc) { + + for (YAML::const_iterator node = yaml["arch"].begin(); node != yaml["arch"].end(); ++node) { + chip_id_t chip_id = node->first.as(); + desc.all_chips.insert(chip_id); + } + for (YAML::const_iterator node = yaml["chips"].begin(); node != yaml["chips"].end(); ++node) { chip_id_t chip_id = node->first.as(); std::vector chip_rack_coords = node->second.as>(); log_assert(chip_rack_coords.size() == 4, "Galaxy (x, y, rack, shelf) coords must be size 4"); eth_coord_t chip_location{ chip_rack_coords.at(0), chip_rack_coords.at(1), chip_rack_coords.at(2), chip_rack_coords.at(3)}; - + desc.chip_locations.insert({chip_id, chip_location}); desc.coords_to_chip_ids[std::get<2>(chip_location)][std::get<3>(chip_location)][std::get<1>(chip_location)][std::get<0>(chip_location)] = chip_id; - desc.all_chips.insert(chip_id); } for(const auto& chip : yaml["chips_with_mmio"]) { @@ -558,7 +563,7 @@ void tt_ClusterDescriptor::load_chips_from_connectivity_descriptor(YAML::Node &y std::get<3>(chip_location)); } - if (yaml["boardtype"]) { + if (yaml["boardtype"]) { for (const auto& chip_board_type : yaml["boardtype"].as>()) { auto &chip = chip_board_type.first; BoardType board_type; @@ -568,7 +573,13 @@ void tt_ClusterDescriptor::load_chips_from_connectivity_descriptor(YAML::Node &y 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 { + log_warning(LogSiliconDriver, "Unknown board type for chip {}. This might happen because chip is running old firmware. Defaulting to DEFAULT", chip); board_type = BoardType::DEFAULT; } desc.chip_board_type.insert({chip, board_type}); @@ -622,7 +633,7 @@ const std::unordered_map& tt_ClusterDescriptor::get_chip_locations() const { static auto locations = std::unordered_map(); - if (locations.empty()) { + if (locations.empty() and !this->chip_locations.empty()) { for (auto chip_id : this->enabled_active_chips) { locations[chip_id] = chip_locations.at(chip_id); } @@ -632,6 +643,7 @@ const std::unordered_map& tt_ClusterDescriptor::get_chip } chip_id_t tt_ClusterDescriptor::get_shelf_local_physical_chip_coords(chip_id_t virtual_coord) { + log_assert(!this->chip_locations.empty(), "Getting physical chip coordinates is only valid for systems where chips have coordinates"); // Physical cooridnates of chip inside a single rack. Calculated based on Galaxy topology. // See: https://yyz-gitlab.local.tenstorrent.com/tenstorrent/budabackend/-/wikis/uploads/23e7a5168f38dfb706f9887fde78cb03/image.png int x = std::get<0>(get_chip_locations().at(virtual_coord)); @@ -667,6 +679,7 @@ const std::unordered_map& tt_ClusterDescriptor::get_noc_transla std::size_t tt_ClusterDescriptor::get_number_of_chips() const { return this->enabled_active_chips.size(); } int tt_ClusterDescriptor::get_ethernet_link_distance(chip_id_t chip_a, chip_id_t chip_b) const { + log_assert(!this->chip_locations.empty(), "Getting physical chip coordinates is only valid for systems where chips have coordinates"); return this->get_ethernet_link_coord_distance(chip_locations.at(chip_a), chip_locations.at(chip_b)); } diff --git a/device/tt_cluster_descriptor.h b/device/tt_cluster_descriptor.h index 9bf46301..746a99dc 100644 --- a/device/tt_cluster_descriptor.h +++ b/device/tt_cluster_descriptor.h @@ -25,8 +25,10 @@ namespace YAML { class Node; } enum BoardType : uint32_t { N150 = 0, N300 = 1, - GALAXY = 2, - DEFAULT = 3, + E150 = 2, + P150A = 3, + GALAXY = 4, + DEFAULT = 5, }; class tt_ClusterDescriptor { @@ -88,9 +90,13 @@ class tt_ClusterDescriptor { // get_cluster_descriptor_file_path will create ethernet map in the background. static std::string get_cluster_descriptor_file_path(); static std::unique_ptr create_from_yaml(const std::string &cluster_descriptor_file_path); + + // TODO: This function is used to create mock cluster descriptor yaml files, for example for simulation. + // The name of the function is kept to not gate the changes regarding create-ethernet-map. + // It should be renamed to something like create_mock_cluster_descriptor and changed in tt-metal/tt-debuda. static std::unique_ptr create_for_grayskull_cluster( - const std::set &logical_mmio_device_ids, - const std::vector &physical_mmio_device_ids); + const std::set &logical_mmio_device_ids, + const std::vector &physical_mmio_device_ids); const std::unordered_map& get_harvesting_info() const; const std::unordered_map& get_noc_translation_table_en() const; diff --git a/device/tt_silicon_driver.cpp b/device/tt_silicon_driver.cpp index 61d6ddd2..a971dc07 100644 --- a/device/tt_silicon_driver.cpp +++ b/device/tt_silicon_driver.cpp @@ -302,14 +302,14 @@ tt_SiliconDevice::tt_SiliconDevice(const std::string &sdesc_path, const std::str log_info(LogSiliconDriver, "Detected {} PCI device{} : {}", m_num_pci_devices, (m_num_pci_devices > 1) ? "s":"", available_device_ids); log_debug(LogSiliconDriver, "Passed target devices: {}", target_devices); } - - if (ndesc_path == "") { - ndesc = tt_ClusterDescriptor::create_for_grayskull_cluster(target_devices, available_device_ids); - } - else { - ndesc = tt_ClusterDescriptor::create_from_yaml(ndesc_path); + + std::string cluster_descriptor_path = ndesc_path; + if (cluster_descriptor_path == "") { + cluster_descriptor_path = tt_ClusterDescriptor::get_cluster_descriptor_file_path(); } + ndesc = tt_ClusterDescriptor::create_from_yaml(cluster_descriptor_path); + for (auto &d: target_devices){ if (ndesc->is_chip_mmio_capable(d)){ target_mmio_device_ids.insert(d); diff --git a/tests/api/test_chip.cpp b/tests/api/test_chip.cpp index 308bc9e0..6c4a010b 100644 --- a/tests/api/test_chip.cpp +++ b/tests/api/test_chip.cpp @@ -47,16 +47,9 @@ inline std::unique_ptr get_cluster_desc() { // TODO: Remove different branch for different archs std::unique_ptr cluster_desc; - if (device_arch == tt::ARCH::GRAYSKULL) { - cluster_desc = tt_ClusterDescriptor::create_for_grayskull_cluster(pci_device_ids_set, pci_device_ids); - } else if (device_arch == tt::ARCH::BLACKHOLE) { - std::string yaml_path = test_utils::GetAbsPath("blackhole_1chip_cluster.yaml"); - cluster_desc = tt_ClusterDescriptor::create_from_yaml(yaml_path); - } else { - // TODO: remove getting manually cluster descriptor from yaml. - std::string yaml_path = tt_ClusterDescriptor::get_cluster_descriptor_file_path(); - cluster_desc = tt_ClusterDescriptor::create_from_yaml(yaml_path); - } + // TODO: remove getting manually cluster descriptor from yaml. + std::string yaml_path = tt_ClusterDescriptor::get_cluster_descriptor_file_path(); + cluster_desc = tt_ClusterDescriptor::create_from_yaml(yaml_path); return cluster_desc; } @@ -116,7 +109,7 @@ inline std::unique_ptr get_cluster() { // TODO: Don't pass each of these arguments. - return std::unique_ptr(new Cluster(soc_path, device_arch == tt::ARCH::GRAYSKULL ? "" : yaml_path, detected_num_chips_set)); + return std::unique_ptr(new Cluster(soc_path, tt_ClusterDescriptor::get_cluster_descriptor_file_path(), detected_num_chips_set)); } // TODO: Once default auto TLB setup is in, check it is setup properly. diff --git a/tests/api/test_cluster.cpp b/tests/api/test_cluster.cpp index 1653d534..bfe21fb6 100644 --- a/tests/api/test_cluster.cpp +++ b/tests/api/test_cluster.cpp @@ -56,18 +56,10 @@ inline std::unique_ptr get_cluster_desc() { return nullptr; } - // TODO: Remove different branch for different archs std::unique_ptr cluster_desc; - if (device_arch == tt::ARCH::GRAYSKULL) { - cluster_desc = tt_ClusterDescriptor::create_for_grayskull_cluster(pci_device_ids_set, pci_device_ids); - } else if (device_arch == tt::ARCH::BLACKHOLE) { - std::string yaml_path = test_utils::GetAbsPath("blackhole_1chip_cluster.yaml"); - cluster_desc = tt_ClusterDescriptor::create_from_yaml(yaml_path); - } else { - // TODO: remove getting manually cluster descriptor from yaml. - std::string yaml_path = tt_ClusterDescriptor::get_cluster_descriptor_file_path(); - cluster_desc = tt_ClusterDescriptor::create_from_yaml(yaml_path); - } + // TODO: remove getting manually cluster descriptor from yaml. + std::string yaml_path = tt_ClusterDescriptor::get_cluster_descriptor_file_path(); + cluster_desc = tt_ClusterDescriptor::create_from_yaml(yaml_path); return cluster_desc; } @@ -126,7 +118,7 @@ inline std::unique_ptr get_cluster() { // TODO: Don't pass each of these arguments. return std::unique_ptr( - new Cluster(soc_path, device_arch == tt::ARCH::GRAYSKULL ? "" : yaml_path, detected_num_chips_set)); + new Cluster(soc_path, tt_ClusterDescriptor::get_cluster_descriptor_file_path(), detected_num_chips_set)); } // TODO: Should not be wormhole specific. diff --git a/tests/api/test_cluster_descriptor.cpp b/tests/api/test_cluster_descriptor.cpp index 8e3791c6..5efc0d4e 100644 --- a/tests/api/test_cluster_descriptor.cpp +++ b/tests/api/test_cluster_descriptor.cpp @@ -38,16 +38,9 @@ inline std::unique_ptr get_cluster_desc() { // TODO: Remove different branch for different archs std::unique_ptr cluster_desc; - if (device_arch == tt::ARCH::GRAYSKULL) { - cluster_desc = tt_ClusterDescriptor::create_for_grayskull_cluster(pci_device_ids_set, pci_device_ids); - } else if (device_arch == tt::ARCH::BLACKHOLE) { - std::string yaml_path = test_utils::GetAbsPath("blackhole_1chip_cluster.yaml"); - cluster_desc = tt_ClusterDescriptor::create_from_yaml(yaml_path); - } else { - // TODO: remove getting manually cluster descriptor from yaml. - std::string yaml_path = tt_ClusterDescriptor::get_cluster_descriptor_file_path(); - cluster_desc = tt_ClusterDescriptor::create_from_yaml(yaml_path); - } + // TODO: remove getting manually cluster descriptor from yaml. + std::string yaml_path = tt_ClusterDescriptor::get_cluster_descriptor_file_path(); + cluster_desc = tt_ClusterDescriptor::create_from_yaml(yaml_path); return cluster_desc; } diff --git a/tests/api/test_mockup_device.cpp b/tests/api/test_mockup_device.cpp index c13f2728..f41b5aea 100644 --- a/tests/api/test_mockup_device.cpp +++ b/tests/api/test_mockup_device.cpp @@ -55,4 +55,4 @@ TEST(ApiMockupTest, CreateDevice) { auto device_driver = std::make_unique(get_soc_descriptor_file(arch)); } -} // namespace test::mockup_device \ No newline at end of file +} // namespace test::mockup_device diff --git a/tests/blackhole/test_silicon_driver_bh.cpp b/tests/blackhole/test_silicon_driver_bh.cpp index 5f93adf4..a78d1f66 100644 --- a/tests/blackhole/test_silicon_driver_bh.cpp +++ b/tests/blackhole/test_silicon_driver_bh.cpp @@ -59,7 +59,7 @@ std::int32_t get_static_tlb_index(tt_xy_pair target) { std::set get_target_devices() { std::set target_devices; - std::unique_ptr cluster_desc_uniq = tt_ClusterDescriptor::create_from_yaml(test_utils::GetAbsPath("blackhole_1chip_cluster.yaml")); + std::unique_ptr cluster_desc_uniq = tt_ClusterDescriptor::create_from_yaml(tt_ClusterDescriptor::get_cluster_descriptor_file_path()); for (int i = 0; i < cluster_desc_uniq->get_number_of_chips(); i++) { target_devices.insert(i); } @@ -72,7 +72,7 @@ TEST(SiliconDriverBH, CreateDestroy) { tt_device_params default_params; // Initialize the driver with a 1x1 descriptor and explictly do not perform harvesting for(int i = 0; i < 50; i++) { - tt_SiliconDevice device = tt_SiliconDevice(test_utils::GetAbsPath("tests/soc_descs/blackhole_140_arch_no_eth.yaml"), test_utils::GetAbsPath("blackhole_1chip_cluster.yaml"), target_devices, num_host_mem_ch_per_mmio_device, false, true, false); + tt_SiliconDevice device = tt_SiliconDevice(test_utils::GetAbsPath("tests/soc_descs/blackhole_140_arch_no_eth.yaml"), tt_ClusterDescriptor::get_cluster_descriptor_file_path(), target_devices, num_host_mem_ch_per_mmio_device, false, true, false); set_params_for_remote_txn(device); device.start_device(default_params); device.deassert_risc_reset(); @@ -205,7 +205,7 @@ TEST(SiliconDriverBH, UnalignedStaticTLB_RW) { uint32_t num_host_mem_ch_per_mmio_device = 1; - tt_SiliconDevice device = tt_SiliconDevice(test_utils::GetAbsPath("tests/soc_descs/blackhole_140_arch_no_eth.yaml"), test_utils::GetAbsPath("blackhole_1chip_cluster.yaml"), target_devices, num_host_mem_ch_per_mmio_device, false, true, true); + tt_SiliconDevice device = tt_SiliconDevice(test_utils::GetAbsPath("tests/soc_descs/blackhole_140_arch_no_eth.yaml"), tt_ClusterDescriptor::get_cluster_descriptor_file_path(), target_devices, num_host_mem_ch_per_mmio_device, false, true, true); set_params_for_remote_txn(device); auto mmio_devices = device.get_target_mmio_device_ids(); @@ -264,7 +264,7 @@ TEST(SiliconDriverBH, StaticTLB_RW) { uint32_t num_host_mem_ch_per_mmio_device = 1; - tt_SiliconDevice device = tt_SiliconDevice(test_utils::GetAbsPath("tests/soc_descs/blackhole_140_arch_no_eth.yaml"), test_utils::GetAbsPath("blackhole_1chip_cluster.yaml"), target_devices, num_host_mem_ch_per_mmio_device, false, true, true); + tt_SiliconDevice device = tt_SiliconDevice(test_utils::GetAbsPath("tests/soc_descs/blackhole_140_arch_no_eth.yaml"), tt_ClusterDescriptor::get_cluster_descriptor_file_path(), target_devices, num_host_mem_ch_per_mmio_device, false, true, true); set_params_for_remote_txn(device); auto mmio_devices = device.get_target_mmio_device_ids(); @@ -314,7 +314,7 @@ TEST(SiliconDriverBH, DynamicTLB_RW) { std::set target_devices = get_target_devices(); uint32_t num_host_mem_ch_per_mmio_device = 1; - tt_SiliconDevice device = tt_SiliconDevice(test_utils::GetAbsPath("tests/soc_descs/blackhole_140_arch_no_eth.yaml"), test_utils::GetAbsPath("blackhole_1chip_cluster.yaml"), target_devices, num_host_mem_ch_per_mmio_device, false, true, true); + tt_SiliconDevice device = tt_SiliconDevice(test_utils::GetAbsPath("tests/soc_descs/blackhole_140_arch_no_eth.yaml"), tt_ClusterDescriptor::get_cluster_descriptor_file_path(), target_devices, num_host_mem_ch_per_mmio_device, false, true, true); set_params_for_remote_txn(device); @@ -378,7 +378,7 @@ TEST(SiliconDriverBH, MultiThreadedDevice) { std::set target_devices = get_target_devices(); uint32_t num_host_mem_ch_per_mmio_device = 1; - tt_SiliconDevice device = tt_SiliconDevice(test_utils::GetAbsPath("tests/soc_descs/blackhole_140_arch_no_eth.yaml"), test_utils::GetAbsPath("blackhole_1chip_cluster.yaml"), target_devices, num_host_mem_ch_per_mmio_device, false, true, true); + tt_SiliconDevice device = tt_SiliconDevice(test_utils::GetAbsPath("tests/soc_descs/blackhole_140_arch_no_eth.yaml"), tt_ClusterDescriptor::get_cluster_descriptor_file_path(), target_devices, num_host_mem_ch_per_mmio_device, false, true, true); set_params_for_remote_txn(device); @@ -437,7 +437,7 @@ TEST(SiliconDriverBH, MultiThreadedMemBar) { uint32_t base_addr = l1_mem::address_map::DATA_BUFFER_SPACE_BASE; uint32_t num_host_mem_ch_per_mmio_device = 1; - tt_SiliconDevice device = tt_SiliconDevice(test_utils::GetAbsPath("tests/soc_descs/blackhole_140_arch_no_eth.yaml"), test_utils::GetAbsPath("blackhole_1chip_cluster.yaml"), target_devices, num_host_mem_ch_per_mmio_device, false, true, true); + tt_SiliconDevice device = tt_SiliconDevice(test_utils::GetAbsPath("tests/soc_descs/blackhole_140_arch_no_eth.yaml"), tt_ClusterDescriptor::get_cluster_descriptor_file_path(), target_devices, num_host_mem_ch_per_mmio_device, false, true, true); set_params_for_remote_txn(device); for(int i = 0; i < target_devices.size(); i++) { // Iterate over devices and only setup static TLBs for functional worker cores @@ -539,7 +539,7 @@ TEST(SiliconDriverBH, DISABLED_BroadcastWrite) { // Cannot broadcast to tensix/e uint32_t num_host_mem_ch_per_mmio_device = 1; - tt_SiliconDevice device = tt_SiliconDevice(test_utils::GetAbsPath("tests/soc_descs/blackhole_140_arch_no_eth.yaml"), test_utils::GetAbsPath("blackhole_1chip_cluster.yaml"), target_devices, num_host_mem_ch_per_mmio_device, false, true, true); + tt_SiliconDevice device = tt_SiliconDevice(test_utils::GetAbsPath("tests/soc_descs/blackhole_140_arch_no_eth.yaml"), tt_ClusterDescriptor::get_cluster_descriptor_file_path(), target_devices, num_host_mem_ch_per_mmio_device, false, true, true); set_params_for_remote_txn(device); auto mmio_devices = device.get_target_mmio_device_ids(); @@ -596,7 +596,7 @@ TEST(SiliconDriverBH, DISABLED_VirtualCoordinateBroadcast) { // same problem as uint32_t num_host_mem_ch_per_mmio_device = 1; - tt_SiliconDevice device = tt_SiliconDevice(test_utils::GetAbsPath("tests/soc_descs/blackhole_140_arch_no_eth.yaml"), test_utils::GetAbsPath("blackhole_1chip_cluster.yaml"), target_devices, num_host_mem_ch_per_mmio_device, false, true, true); + tt_SiliconDevice device = tt_SiliconDevice(test_utils::GetAbsPath("tests/soc_descs/blackhole_140_arch_no_eth.yaml"), tt_ClusterDescriptor::get_cluster_descriptor_file_path(), target_devices, num_host_mem_ch_per_mmio_device, false, true, true); set_params_for_remote_txn(device); auto mmio_devices = device.get_target_mmio_device_ids(); diff --git a/tests/grayskull/test_silicon_driver.cpp b/tests/grayskull/test_silicon_driver.cpp index f6b2985e..d55455e6 100644 --- a/tests/grayskull/test_silicon_driver.cpp +++ b/tests/grayskull/test_silicon_driver.cpp @@ -7,6 +7,7 @@ #include "gtest/gtest.h" #include "tt_device.h" #include "device/tt_soc_descriptor.h" +#include "device/tt_cluster_descriptor.h" #include "device/wormhole/wormhole_implementation.h" #include "l1_address_map.h" #include "tests/test_utils/generate_cluster_desc.hpp" @@ -17,7 +18,7 @@ TEST(SiliconDriverGS, CreateDestroySequential) { uint32_t num_host_mem_ch_per_mmio_device = 1; tt_device_params default_params; for(int i = 0; i < 100; i++) { - tt_SiliconDevice device = tt_SiliconDevice(test_utils::GetAbsPath("tests/soc_descs/grayskull_10x12.yaml"), "", target_devices, num_host_mem_ch_per_mmio_device, false, true); + tt_SiliconDevice device = tt_SiliconDevice(test_utils::GetAbsPath("tests/soc_descs/grayskull_10x12.yaml"), tt_ClusterDescriptor::get_cluster_descriptor_file_path(), target_devices, num_host_mem_ch_per_mmio_device, false, true); device.start_device(default_params); device.deassert_risc_reset(); device.close_device(); @@ -31,7 +32,7 @@ TEST(SiliconDriverGS, CreateMultipleInstance) { default_params.init_device = false; std::unordered_map concurrent_devices = {}; for(int i = 0; i < 100; i++) { - concurrent_devices.insert({i, new tt_SiliconDevice(test_utils::GetAbsPath("tests/soc_descs/grayskull_10x12.yaml"), "", target_devices, num_host_mem_ch_per_mmio_device, false, true)}); + concurrent_devices.insert({i, new tt_SiliconDevice(test_utils::GetAbsPath("tests/soc_descs/grayskull_10x12.yaml"), tt_ClusterDescriptor::get_cluster_descriptor_file_path(), target_devices, num_host_mem_ch_per_mmio_device, false, true)}); concurrent_devices.at(i) -> start_device(default_params); } @@ -45,7 +46,7 @@ TEST(SiliconDriverGS, Harvesting) { std::set target_devices = {0}; std::unordered_map simulated_harvesting_masks = {{0, 6}, {1, 12}}; uint32_t num_host_mem_ch_per_mmio_device = 1; - tt_SiliconDevice device = tt_SiliconDevice(test_utils::GetAbsPath("tests/soc_descs/grayskull_10x12.yaml"), "", target_devices, num_host_mem_ch_per_mmio_device, false, true, true, simulated_harvesting_masks); + tt_SiliconDevice device = tt_SiliconDevice(test_utils::GetAbsPath("tests/soc_descs/grayskull_10x12.yaml"), tt_ClusterDescriptor::get_cluster_descriptor_file_path(), target_devices, num_host_mem_ch_per_mmio_device, false, true, true, simulated_harvesting_masks); auto sdesc_per_chip = device.get_virtual_soc_descriptors(); ASSERT_EQ(device.using_harvested_soc_descriptors(), true) << "Expected Driver to have performed harvesting"; @@ -62,7 +63,7 @@ TEST(SiliconDriverGS, CustomSocDesc) { std::unordered_map simulated_harvesting_masks = {{0, 6}, {1, 12}}; uint32_t num_host_mem_ch_per_mmio_device = 1; // Initialize the driver with a 1x1 descriptor and explictly do not perform harvesting - tt_SiliconDevice device = tt_SiliconDevice(test_utils::GetAbsPath("./tests/soc_descs/grayskull_1x1_arch.yaml"), "", target_devices, num_host_mem_ch_per_mmio_device, false, true, false, simulated_harvesting_masks); + tt_SiliconDevice device = tt_SiliconDevice(test_utils::GetAbsPath("./tests/soc_descs/grayskull_1x1_arch.yaml"), tt_ClusterDescriptor::get_cluster_descriptor_file_path(), target_devices, num_host_mem_ch_per_mmio_device, false, true, false, simulated_harvesting_masks); auto sdesc_per_chip = device.get_virtual_soc_descriptors(); ASSERT_EQ(device.using_harvested_soc_descriptors(), false) << "SOC descriptors should not be modified when harvesting is disabled"; for(const auto& chip : sdesc_per_chip) { @@ -82,7 +83,7 @@ TEST(SiliconDriverGS, HarvestingRuntime) { std::set target_devices = {0}; std::unordered_map simulated_harvesting_masks = {{0, 6}, {1, 12}}; uint32_t num_host_mem_ch_per_mmio_device = 1; - tt_SiliconDevice device = tt_SiliconDevice(test_utils::GetAbsPath("tests/soc_descs/grayskull_10x12.yaml"), "", target_devices, num_host_mem_ch_per_mmio_device, false, true, true, simulated_harvesting_masks); + tt_SiliconDevice device = tt_SiliconDevice(test_utils::GetAbsPath("tests/soc_descs/grayskull_10x12.yaml"), tt_ClusterDescriptor::get_cluster_descriptor_file_path(), target_devices, num_host_mem_ch_per_mmio_device, false, true, true, simulated_harvesting_masks); for(int i = 0; i < target_devices.size(); i++) { // Iterate over devices and only setup static TLBs for functional worker cores @@ -145,7 +146,7 @@ TEST(SiliconDriverGS, StaticTLB_RW) { std::set target_devices = {0}; uint32_t num_host_mem_ch_per_mmio_device = 1; - tt_SiliconDevice device = tt_SiliconDevice(test_utils::GetAbsPath("tests/soc_descs/grayskull_10x12.yaml"), "", target_devices, num_host_mem_ch_per_mmio_device, false, true); + tt_SiliconDevice device = tt_SiliconDevice(test_utils::GetAbsPath("tests/soc_descs/grayskull_10x12.yaml"), tt_ClusterDescriptor::get_cluster_descriptor_file_path(), target_devices, num_host_mem_ch_per_mmio_device, false, true); for(int i = 0; i < target_devices.size(); i++) { // Iterate over devices and only setup static TLBs for worker cores auto& sdesc = device.get_virtual_soc_descriptors().at(i); @@ -193,7 +194,7 @@ TEST(SiliconDriverGS, DynamicTLB_RW) { std::set target_devices = {0}; uint32_t num_host_mem_ch_per_mmio_device = 1; - tt_SiliconDevice device = tt_SiliconDevice(test_utils::GetAbsPath("tests/soc_descs/grayskull_10x12.yaml"), "", target_devices, num_host_mem_ch_per_mmio_device, false, true); + tt_SiliconDevice device = tt_SiliconDevice(test_utils::GetAbsPath("tests/soc_descs/grayskull_10x12.yaml"), tt_ClusterDescriptor::get_cluster_descriptor_file_path(), target_devices, num_host_mem_ch_per_mmio_device, false, true); device.set_fallback_tlb_ordering_mode("SMALL_READ_WRITE_TLB", TLB_DATA::Posted); // Explicitly test API to set fallback tlb ordering mode tt_device_params default_params; device.start_device(default_params); @@ -235,7 +236,7 @@ TEST(SiliconDriverGS, MultiThreadedDevice) { std::set target_devices = {0}; uint32_t num_host_mem_ch_per_mmio_device = 1; - tt_SiliconDevice device = tt_SiliconDevice(test_utils::GetAbsPath("tests/soc_descs/grayskull_10x12.yaml"), "", target_devices, num_host_mem_ch_per_mmio_device, false, true); + tt_SiliconDevice device = tt_SiliconDevice(test_utils::GetAbsPath("tests/soc_descs/grayskull_10x12.yaml"), tt_ClusterDescriptor::get_cluster_descriptor_file_path(), target_devices, num_host_mem_ch_per_mmio_device, false, true); tt_device_params default_params; device.start_device(default_params); @@ -313,7 +314,7 @@ TEST(SiliconDriverGS, MultiThreadedMemBar) { // this tests takes ~5 mins to run uint32_t base_addr = l1_mem::address_map::DATA_BUFFER_SPACE_BASE; uint32_t num_host_mem_ch_per_mmio_device = 1; - tt_SiliconDevice device = tt_SiliconDevice(test_utils::GetAbsPath("tests/soc_descs/grayskull_10x12.yaml"), "", target_devices, num_host_mem_ch_per_mmio_device, false, true); + tt_SiliconDevice device = tt_SiliconDevice(test_utils::GetAbsPath("tests/soc_descs/grayskull_10x12.yaml"), tt_ClusterDescriptor::get_cluster_descriptor_file_path(), target_devices, num_host_mem_ch_per_mmio_device, false, true); for(int i = 0; i < target_devices.size(); i++) { // Iterate over devices and only setup static TLBs for functional worker cores