diff --git a/device/tt_device.h b/device/tt_device.h index d6cd8399..81bff0cd 100644 --- a/device/tt_device.h +++ b/device/tt_device.h @@ -781,7 +781,7 @@ class tt_SiliconDevice: public tt_device // This functions has to be called for local chip, and then it will wait for all connected remote chips to flush. void wait_for_connected_non_mmio_flush(chip_id_t chip_id); - void construct_tt_silicon_device(const uint32_t &num_host_mem_ch_per_mmio_device, const bool skip_driver_allocs, + void construct_tt_silicon_device(const std::string& sdesc_path, const uint32_t &num_host_mem_ch_per_mmio_device, const bool skip_driver_allocs, const bool clean_system_resources, bool perform_harvesting, std::unordered_map simulated_harvesting_masks); // State variables @@ -797,7 +797,6 @@ class tt_SiliconDevice: public tt_device std::unordered_map> m_pci_device_map; // Map of enabled pci devices int m_num_pci_devices; // Number of pci devices in system (enabled or disabled) std::shared_ptr ndesc; - std::string sdesc_path; // remote eth transfer setup static constexpr std::uint32_t NUM_ETH_CORES_FOR_NON_MMIO_TRANSFERS = 6; diff --git a/device/tt_silicon_driver.cpp b/device/tt_silicon_driver.cpp index e4f6f405..f8b99e0c 100644 --- a/device/tt_silicon_driver.cpp +++ b/device/tt_silicon_driver.cpp @@ -289,7 +289,7 @@ std::unordered_map tt_SiliconDevice::get_harvesting_masks_f return default_harvesting_masks; } -void tt_SiliconDevice::construct_tt_silicon_device(const uint32_t &num_host_mem_ch_per_mmio_device, const bool skip_driver_allocs, +void tt_SiliconDevice::construct_tt_silicon_device(const std::string& sdesc_path, const uint32_t &num_host_mem_ch_per_mmio_device, const bool skip_driver_allocs, const bool clean_system_resources, bool perform_harvesting, std::unordered_map simulated_harvesting_masks) { std::unordered_set target_mmio_device_ids; @@ -438,7 +438,7 @@ tt_SiliconDevice::tt_SiliconDevice(const uint32_t &num_host_mem_ch_per_mmio_devi PCIDevice pci_device (physical_device_id, 0); tt::ARCH device_arch = pci_device.get_arch(); - sdesc_path = tt_SocDescriptor::get_soc_descriptor_path(device_arch); + std::string sdesc_path = tt_SocDescriptor::get_soc_descriptor_path(device_arch); arch_name = tt_SocDescriptor(sdesc_path).arch; perform_harvesting_on_sdesc = perform_harvesting; @@ -457,7 +457,7 @@ tt_SiliconDevice::tt_SiliconDevice(const uint32_t &num_host_mem_ch_per_mmio_devi } target_devices_in_cluster = target_devices; - construct_tt_silicon_device(num_host_mem_ch_per_mmio_device, skip_driver_allocs, clean_system_resources, perform_harvesting, simulated_harvesting_masks); + construct_tt_silicon_device(sdesc_path, num_host_mem_ch_per_mmio_device, skip_driver_allocs, clean_system_resources, perform_harvesting, simulated_harvesting_masks); } tt_SiliconDevice::tt_SiliconDevice(const std::string &sdesc_path, const std::string &ndesc_path, const std::set &target_devices, @@ -470,7 +470,6 @@ tt_SiliconDevice::tt_SiliconDevice(const std::string &sdesc_path, const std::str target_devices_in_cluster = target_devices; arch_name = tt_SocDescriptor(sdesc_path).arch; perform_harvesting_on_sdesc = perform_harvesting; - this->sdesc_path = sdesc_path; if (!skip_driver_allocs) { log_info(LogSiliconDriver, "Detected {} PCI device{} : {}", m_num_pci_devices, (m_num_pci_devices > 1) ? "s":"", available_device_ids); @@ -484,7 +483,7 @@ tt_SiliconDevice::tt_SiliconDevice(const std::string &sdesc_path, const std::str ndesc = tt_ClusterDescriptor::create_from_yaml(cluster_descriptor_path); - construct_tt_silicon_device(num_host_mem_ch_per_mmio_device, skip_driver_allocs, clean_system_resources, perform_harvesting, simulated_harvesting_masks); + construct_tt_silicon_device(sdesc_path, num_host_mem_ch_per_mmio_device, skip_driver_allocs, clean_system_resources, perform_harvesting, simulated_harvesting_masks); } void tt_SiliconDevice::configure_active_ethernet_cores_for_mmio_device(chip_id_t mmio_chip, const std::unordered_set& active_eth_cores_per_chip) {