diff --git a/tt_metal/distributed/mesh_configurations/N300.json b/tt_metal/distributed/mesh_configurations/N300.json index 9891c42cc11..a39dc931305 100644 --- a/tt_metal/distributed/mesh_configurations/N300.json +++ b/tt_metal/distributed/mesh_configurations/N300.json @@ -1,5 +1,5 @@ { "logical_to_physical_coordinates": [ - [[0, 0], [0, 0, 0, 0]], [[0, 1], [0, 1, 0, 0]] + [[0, 0], [0, 0, 0, 0, 0]], [[0, 1], [0, 0, 1, 0, 0]] ] } diff --git a/tt_metal/distributed/mesh_configurations/T3000.json b/tt_metal/distributed/mesh_configurations/T3000.json index acfe3edac00..790d174b7e1 100644 --- a/tt_metal/distributed/mesh_configurations/T3000.json +++ b/tt_metal/distributed/mesh_configurations/T3000.json @@ -1,6 +1,6 @@ { "logical_to_physical_coordinates": [ - [[0, 0], [0, 0, 0, 0]], [[0, 1], [0, 1, 0, 0]], [[0, 2], [0, 2, 0, 0]], [[0, 3], [0, 3, 0, 0]], - [[1, 0], [1, 0, 0, 0]], [[1, 1], [1, 1, 0, 0]], [[1, 2], [1, 2, 0, 0]], [[1, 3], [1, 3, 0, 0]] + [[0, 0], [0, 0, 0, 0, 0]], [[0, 1], [0, 0, 1, 0, 0]], [[0, 2], [0, 0, 2, 0, 0]], [[0, 3], [0, 0, 3, 0, 0]], + [[1, 0], [0, 1, 0, 0, 0]], [[1, 1], [0, 1, 1, 0, 0]], [[1, 2], [0, 1, 2, 0, 0]], [[1, 3], [0, 1, 3, 0, 0]] ] } diff --git a/tt_metal/distributed/mesh_configurations/TG.json b/tt_metal/distributed/mesh_configurations/TG.json index 63860eff6b6..89da5d57760 100644 --- a/tt_metal/distributed/mesh_configurations/TG.json +++ b/tt_metal/distributed/mesh_configurations/TG.json @@ -1,36 +1,36 @@ { "logical_to_physical_coordinates": [ - [[0, 0], [7, 3, 0, 1]], - [[0, 1], [7, 2, 0, 1]], - [[0, 2], [7, 1, 0, 1]], - [[0, 3], [7, 0, 0, 1]], - [[1, 0], [6, 3, 0, 1]], - [[1, 1], [6, 2, 0, 1]], - [[1, 2], [6, 1, 0, 1]], - [[1, 3], [6, 0, 0, 1]], - [[2, 0], [5, 3, 0, 1]], - [[2, 1], [5, 2, 0, 1]], - [[2, 2], [5, 1, 0, 1]], - [[2, 3], [5, 0, 0, 1]], - [[3, 0], [4, 3, 0, 1]], - [[3, 1], [4, 2, 0, 1]], - [[3, 2], [4, 1, 0, 1]], - [[3, 3], [4, 0, 0, 1]], - [[4, 0], [3, 3, 0, 1]], - [[4, 1], [3, 2, 0, 1]], - [[4, 2], [3, 1, 0, 1]], - [[4, 3], [3, 0, 0, 1]], - [[5, 0], [2, 3, 0, 1]], - [[5, 1], [2, 2, 0, 1]], - [[5, 2], [2, 1, 0, 1]], - [[5, 3], [2, 0, 0, 1]], - [[6, 0], [1, 3, 0, 1]], - [[6, 1], [1, 2, 0, 1]], - [[6, 2], [1, 1, 0, 1]], - [[6, 3], [1, 0, 0, 1]], - [[7, 0], [0, 3, 0, 1]], - [[7, 1], [0, 2, 0, 1]], - [[7, 2], [0, 1, 0, 1]], - [[7, 3], [0, 0, 0, 1]] + [[0, 0], [0, 7, 3, 0, 1]], + [[0, 1], [0, 7, 2, 0, 1]], + [[0, 2], [0, 7, 1, 0, 1]], + [[0, 3], [0, 7, 0, 0, 1]], + [[1, 0], [0, 6, 3, 0, 1]], + [[1, 1], [0, 6, 2, 0, 1]], + [[1, 2], [0, 6, 1, 0, 1]], + [[1, 3], [0, 6, 0, 0, 1]], + [[2, 0], [0, 5, 3, 0, 1]], + [[2, 1], [0, 5, 2, 0, 1]], + [[2, 2], [0, 5, 1, 0, 1]], + [[2, 3], [0, 5, 0, 0, 1]], + [[3, 0], [0, 4, 3, 0, 1]], + [[3, 1], [0, 4, 2, 0, 1]], + [[3, 2], [0, 4, 1, 0, 1]], + [[3, 3], [0, 4, 0, 0, 1]], + [[4, 0], [0, 3, 3, 0, 1]], + [[4, 1], [0, 3, 2, 0, 1]], + [[4, 2], [0, 3, 1, 0, 1]], + [[4, 3], [0, 3, 0, 0, 1]], + [[5, 0], [0, 2, 3, 0, 1]], + [[5, 1], [0, 2, 2, 0, 1]], + [[5, 2], [0, 2, 1, 0, 1]], + [[5, 3], [0, 2, 0, 0, 1]], + [[6, 0], [0, 1, 3, 0, 1]], + [[6, 1], [0, 1, 2, 0, 1]], + [[6, 2], [0, 1, 1, 0, 1]], + [[6, 3], [0, 1, 0, 0, 1]], + [[7, 0], [0, 0, 3, 0, 1]], + [[7, 1], [0, 0, 2, 0, 1]], + [[7, 2], [0, 0, 1, 0, 1]], + [[7, 3], [0, 0, 0, 0, 1]] ] } diff --git a/tt_metal/distributed/mesh_configurations/TGG.json b/tt_metal/distributed/mesh_configurations/TGG.json index 3f4650b1833..3c78f1aa3ad 100644 --- a/tt_metal/distributed/mesh_configurations/TGG.json +++ b/tt_metal/distributed/mesh_configurations/TGG.json @@ -1,68 +1,68 @@ { "logical_to_physical_coordinates": [ - [[0, 0], [0, 3, 0, 1]], - [[0, 1], [0, 2, 0, 1]], - [[0, 2], [0, 1, 0, 1]], - [[0, 3], [0, 0, 0, 1]], - [[1, 0], [1, 3, 0, 1]], - [[1, 1], [1, 2, 0, 1]], - [[1, 2], [1, 1, 0, 1]], - [[1, 3], [1, 0, 0, 1]], - [[2, 0], [2, 3, 0, 1]], - [[2, 1], [2, 2, 0, 1]], - [[2, 2], [2, 1, 0, 1]], - [[2, 3], [2, 0, 0, 1]], - [[3, 0], [3, 3, 0, 1]], - [[3, 1], [3, 2, 0, 1]], - [[3, 2], [3, 1, 0, 1]], - [[3, 3], [3, 0, 0, 1]], - [[4, 0], [4, 3, 0, 1]], - [[4, 1], [4, 2, 0, 1]], - [[4, 2], [4, 1, 0, 1]], - [[4, 3], [4, 0, 0, 1]], - [[5, 0], [5, 3, 0, 1]], - [[5, 1], [5, 2, 0, 1]], - [[5, 2], [5, 1, 0, 1]], - [[5, 3], [5, 0, 0, 1]], - [[6, 0], [6, 3, 0, 1]], - [[6, 1], [6, 2, 0, 1]], - [[6, 2], [6, 1, 0, 1]], - [[6, 3], [6, 0, 0, 1]], - [[7, 0], [7, 3, 0, 1]], - [[7, 1], [7, 2, 0, 1]], - [[7, 2], [7, 1, 0, 1]], - [[7, 3], [7, 0, 0, 1]], - [[0, 4], [0, 0, 0, 2]], - [[0, 5], [0, 1, 0, 2]], - [[0, 6], [0, 2, 0, 2]], - [[0, 7], [0, 3, 0, 2]], - [[1, 4], [1, 0, 0, 2]], - [[1, 5], [1, 1, 0, 2]], - [[1, 6], [1, 2, 0, 2]], - [[1, 7], [1, 3, 0, 2]], - [[2, 4], [2, 0, 0, 2]], - [[2, 5], [2, 1, 0, 2]], - [[2, 6], [2, 2, 0, 2]], - [[2, 7], [2, 3, 0, 2]], - [[3, 4], [3, 0, 0, 2]], - [[3, 5], [3, 1, 0, 2]], - [[3, 6], [3, 2, 0, 2]], - [[3, 7], [3, 3, 0, 2]], - [[4, 4], [4, 0, 0, 2]], - [[4, 5], [4, 1, 0, 2]], - [[4, 6], [4, 2, 0, 2]], - [[4, 7], [4, 3, 0, 2]], - [[5, 4], [5, 0, 0, 2]], - [[5, 5], [5, 1, 0, 2]], - [[5, 6], [5, 2, 0, 2]], - [[5, 7], [5, 3, 0, 2]], - [[6, 4], [6, 0, 0, 2]], - [[6, 5], [6, 1, 0, 2]], - [[6, 6], [6, 2, 0, 2]], - [[6, 7], [6, 3, 0, 2]], - [[7, 4], [7, 0, 0, 2]], - [[7, 5], [7, 1, 0, 2]], - [[7, 6], [7, 2, 0, 2]], - [[7, 7], [7, 3, 0, 2]] + [[0, 0], [0, 0, 3, 0, 1]], + [[0, 1], [0, 0, 2, 0, 1]], + [[0, 2], [0, 0, 1, 0, 1]], + [[0, 3], [0, 0, 0, 0, 1]], + [[1, 0], [0, 1, 3, 0, 1]], + [[1, 1], [0, 1, 2, 0, 1]], + [[1, 2], [0, 1, 1, 0, 1]], + [[1, 3], [0, 1, 0, 0, 1]], + [[2, 0], [0, 2, 3, 0, 1]], + [[2, 1], [0, 2, 2, 0, 1]], + [[2, 2], [0, 2, 1, 0, 1]], + [[2, 3], [0, 2, 0, 0, 1]], + [[3, 0], [0, 3, 3, 0, 1]], + [[3, 1], [0, 3, 2, 0, 1]], + [[3, 2], [0, 3, 1, 0, 1]], + [[3, 3], [0, 3, 0, 0, 1]], + [[4, 0], [0, 4, 3, 0, 1]], + [[4, 1], [0, 4, 2, 0, 1]], + [[4, 2], [0, 4, 1, 0, 1]], + [[4, 3], [0, 4, 0, 0, 1]], + [[5, 0], [0, 5, 3, 0, 1]], + [[5, 1], [0, 5, 2, 0, 1]], + [[5, 2], [0, 5, 1, 0, 1]], + [[5, 3], [0, 5, 0, 0, 1]], + [[6, 0], [0, 6, 3, 0, 1]], + [[6, 1], [0, 6, 2, 0, 1]], + [[6, 2], [0, 6, 1, 0, 1]], + [[6, 3], [0, 6, 0, 0, 1]], + [[7, 0], [0, 7, 3, 0, 1]], + [[7, 1], [0, 7, 2, 0, 1]], + [[7, 2], [0, 7, 1, 0, 1]], + [[7, 3], [0, 7, 0, 0, 1]], + [[0, 4], [0, 0, 0, 0, 2]], + [[0, 5], [0, 0, 1, 0, 2]], + [[0, 6], [0, 0, 2, 0, 2]], + [[0, 7], [0, 0, 3, 0, 2]], + [[1, 4], [0, 1, 0, 0, 2]], + [[1, 5], [0, 1, 1, 0, 2]], + [[1, 6], [0, 1, 2, 0, 2]], + [[1, 7], [0, 1, 3, 0, 2]], + [[2, 4], [0, 2, 0, 0, 2]], + [[2, 5], [0, 2, 1, 0, 2]], + [[2, 6], [0, 2, 2, 0, 2]], + [[2, 7], [0, 2, 3, 0, 2]], + [[3, 4], [0, 3, 0, 0, 2]], + [[3, 5], [0, 3, 1, 0, 2]], + [[3, 6], [0, 3, 2, 0, 2]], + [[3, 7], [0, 3, 3, 0, 2]], + [[4, 4], [0, 4, 0, 0, 2]], + [[4, 5], [0, 4, 1, 0, 2]], + [[4, 6], [0, 4, 2, 0, 2]], + [[4, 7], [0, 4, 3, 0, 2]], + [[5, 4], [0, 5, 0, 0, 2]], + [[5, 5], [0, 5, 1, 0, 2]], + [[5, 6], [0, 5, 2, 0, 2]], + [[5, 7], [0, 5, 3, 0, 2]], + [[6, 4], [0, 6, 0, 0, 2]], + [[6, 5], [0, 6, 1, 0, 2]], + [[6, 6], [0, 6, 2, 0, 2]], + [[6, 7], [0, 6, 3, 0, 2]], + [[7, 4], [0, 7, 0, 0, 2]], + [[7, 5], [0, 7, 1, 0, 2]], + [[7, 6], [0, 7, 2, 0, 2]], + [[7, 7], [0, 7, 3, 0, 2]] ] } diff --git a/tt_metal/distributed/mesh_configurations/device.json b/tt_metal/distributed/mesh_configurations/device.json index ea1a34365f0..0757d260eac 100644 --- a/tt_metal/distributed/mesh_configurations/device.json +++ b/tt_metal/distributed/mesh_configurations/device.json @@ -1,5 +1,5 @@ { "logical_to_physical_coordinates": [ - [[0, 0], [0, 0, 0, 0]] + [[0, 0], [0, 0, 0, 0, 0]] ] } diff --git a/tt_metal/distributed/mesh_device.cpp b/tt_metal/distributed/mesh_device.cpp index a81476ef69e..4601c0818b4 100644 --- a/tt_metal/distributed/mesh_device.cpp +++ b/tt_metal/distributed/mesh_device.cpp @@ -44,10 +44,16 @@ static std::unordered_map load_translatio std::unordered_map result; for (const auto& mapping : j[key]) { - if (mapping.size() != 2 || mapping[0].size() != 2 || mapping[1].size() != 4) { + if (mapping.size() != 2 || mapping[0].size() != 2 || mapping[1].size() != 5) { throw std::runtime_error("Invalid coordinate format in JSON file: " + filename); } - result.emplace(LogicalCoordinate{mapping[0][0], mapping[0][1]}, PhysicalCoordinate{mapping[1][1], mapping[1][0], mapping[1][2], mapping[1][3]}); + result.emplace(LogicalCoordinate{mapping[0][0], mapping[0][1]}, PhysicalCoordinate{ + mapping[1][0], // cluster_id + mapping[1][2], // x + mapping[1][1], // y + mapping[1][3], // rack + mapping[1][4] // shelf + }); } return result; diff --git a/tt_metal/llrt/tt_cluster.cpp b/tt_metal/llrt/tt_cluster.cpp index 114ac7353b7..c29d8d1d5b8 100644 --- a/tt_metal/llrt/tt_cluster.cpp +++ b/tt_metal/llrt/tt_cluster.cpp @@ -128,16 +128,8 @@ void Cluster::generate_cluster_descriptor() { // Cluster descriptor yaml not available for Blackhole bring up if (this->target_type_ == TargetDevice::Simulator) { - // Cannot use tt::umd::Cluster::detect_available_device_ids because that returns physical device IDs - std::vector physical_mmio_device_ids; - std::set logical_mmio_device_ids; - physical_mmio_device_ids = tt_SimulationDevice::detect_available_device_ids(); - for (chip_id_t logical_mmio_device_id = 0; logical_mmio_device_id < physical_mmio_device_ids.size(); - logical_mmio_device_id++) { - logical_mmio_device_ids.insert(logical_mmio_device_id); - } - this->cluster_desc_ = - tt_ClusterDescriptor::create_for_grayskull_cluster(logical_mmio_device_ids, physical_mmio_device_ids); + // Passing simulator reported physical devices as logical devices. + this->cluster_desc_ = tt_ClusterDescriptor::create_mock_cluster(tt_SimulationDevice::detect_available_device_ids(), this->arch_); } else { this->cluster_desc_ = tt_ClusterDescriptor::create_from_yaml(this->cluster_desc_path_); for (const auto &chip_id : this->cluster_desc_->get_all_chips()) { diff --git a/tt_metal/third_party/umd b/tt_metal/third_party/umd index 8985708a924..db8a0d5cdb8 160000 --- a/tt_metal/third_party/umd +++ b/tt_metal/third_party/umd @@ -1 +1 @@ -Subproject commit 8985708a924ee48f202f79f31e05fc15a25a7a44 +Subproject commit db8a0d5cdb8fdee9f8d021edf5683c150452be43