diff --git a/tt_metal/llrt/tt_cluster.cpp b/tt_metal/llrt/tt_cluster.cpp index e08f859f2f8..f3b23b287eb 100644 --- a/tt_metal/llrt/tt_cluster.cpp +++ b/tt_metal/llrt/tt_cluster.cpp @@ -116,19 +116,6 @@ std::filesystem::path get_cluster_desc_yaml() { return fs::absolute(cluster_desc_path); } -void Cluster::get_cluster_type(YAML::Node &yaml) { - is_tg_cluster_ = false; - if(yaml["boardtype"]) { - for (const auto& chip_board_type : yaml["boardtype"].as>()) { - chip_id_t chip = chip_board_type.first; - auto board_type = chip_board_type.second; - if (board_type == "GALAXY") { - is_tg_cluster_ = true; - } - } - } -} - bool Cluster::is_galaxy_cluster() const { return this->is_tg_cluster_; } @@ -148,7 +135,12 @@ void Cluster::generate_cluster_descriptor() { } else { this->cluster_desc_ = tt_ClusterDescriptor::create_from_yaml(this->cluster_desc_path_); YAML::Node yaml = YAML::LoadFile(this->cluster_desc_path_); - get_cluster_type(yaml); + for (const auto &chip_id : this->cluster_desc_->get_all_chips()) { + if (this->cluster_desc_->get_board_type(chip_id) == BoardType::GALAXY) { + this->is_tg_cluster_ = true; + break; + } + } } // Use cluster descriptor to map MMIO device id to all devices on the same card (including the MMIO device) @@ -167,6 +159,7 @@ void Cluster::generate_cluster_descriptor() { uint32_t total_num_hugepages = get_num_hugepages(); if (this->is_tg_cluster_) { + // TODO: don't think this check is correct, we want to have total num hugepages == num chips even for Galaxy TT_FATAL(total_num_hugepages >= this->cluster_desc_->get_all_chips().size()/4, "Machine setup error: Insufficient number of hugepages available, expected >= {} for {} devices but have {}. Increase number of hugepages!", this->cluster_desc_->get_all_chips().size()/4, this->cluster_desc_->get_all_chips().size(), total_num_hugepages); } else { diff --git a/tt_metal/llrt/tt_cluster.hpp b/tt_metal/llrt/tt_cluster.hpp index 869690645b7..c6aadc7af9e 100644 --- a/tt_metal/llrt/tt_cluster.hpp +++ b/tt_metal/llrt/tt_cluster.hpp @@ -177,7 +177,6 @@ class Cluster { void detect_arch_and_target(); void generate_cluster_descriptor(); - void get_cluster_type(YAML::Node &yaml); void initialize_device_drivers(); void assert_risc_reset(); diff --git a/tt_metal/tt_metal.cpp b/tt_metal/tt_metal.cpp index fe2544a76d7..0a54814175c 100644 --- a/tt_metal/tt_metal.cpp +++ b/tt_metal/tt_metal.cpp @@ -157,6 +157,17 @@ std::map CreateDevices( bool is_galaxy = tt::Cluster::instance().is_galaxy_cluster(); for (const auto &device_id : device_ids) { const auto &mmio_device_id = tt::Cluster::instance().get_associated_mmio_device(device_id); + if (device_id == mmio_device_id) { + std::cout << " MMIO Device " << device_id + << " Tunnel Count: " << tt::Cluster::instance().get_mmio_device_tunnel_count(mmio_device_id) + << std::endl; + std::cout << " MMIO Device " << device_id + << " Tunnel Depth: " << tt::Cluster::instance().get_mmio_device_max_tunnel_depth(mmio_device_id) + << std::endl; + } else { + std::cout << " Device " << device_id + << " Tunnel Depth: " << tt::Cluster::instance().get_device_tunnel_depth(device_id) << std::endl; + } if (active_devices.find(mmio_device_id) == active_devices.end()) { for (const auto &mmio_controlled_device_id : tt::Cluster::instance().get_devices_controlled_by_mmio_device(mmio_device_id)) {