Skip to content

Commit

Permalink
UMD create_mock_cluster (#15301)
Browse files Browse the repository at this point in the history
### Ticket
Related to #13948

### Problem description
Tied to UMD change tenstorrent/tt-umd#310

### What's changed
- Rename and clear up create_for_grayskull_cluster to
create_mock_cluster
- For grayskull, the CEM already works, and the create_from_yaml path is
successfully used already

### Checklist
- [x] Post commit CI passes :
https://github.com/tenstorrent/tt-metal/actions/runs/11972671759
- [x] Blackhole Post commit (if applicable): Not applicable
- [x] Model regression CI testing passes (if applicable): Not applicable
- [x] Device performance regression CI testing passes (if applicable):
Not applicable
- [x] New/Existing tests provide coverage for changes: Not applicable
  • Loading branch information
broskoTT committed Nov 26, 2024
1 parent a36fd88 commit dd0daba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
12 changes: 2 additions & 10 deletions tt_metal/llrt/tt_cluster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<chip_id_t> physical_mmio_device_ids;
std::set<chip_id_t> 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()) {
Expand Down
2 changes: 1 addition & 1 deletion tt_metal/third_party/umd
Submodule umd updated 99 files
+4 −2 .github/workflows/build-and-run-all-tests.yml
+56 −0 .github/workflows/build-clients.yml
+10 −8 .github/workflows/build-device.yml
+8 −2 .github/workflows/build-image.yml
+5 −2 .github/workflows/build-tests.yml
+0 −18 .github/workflows/on-pr.yml
+0 −54 .github/workflows/on-push.yml
+4 −1 .github/workflows/pre-commit.yml
+2 −1 .github/workflows/run-tests.yml
+10 −2 .github/workflows/test-runner.yaml
+42 −0 common/disjoint_set.hpp
+31 −0 common/utils.hpp
+0 −2 device/.clang-format
+8 −4 device/architecture_implementation.cpp
+4 −3 device/architecture_implementation.h
+4 −4 device/blackhole/blackhole_coordinate_manager.h
+9 −11 device/blackhole/blackhole_implementation.cpp
+61 −35 device/blackhole/blackhole_implementation.h
+1,529 −819 device/cluster.cpp
+390 −185 device/cluster.h
+13 −13 device/coordinate_manager.cpp
+11 −8 device/coordinate_manager.h
+308 −181 device/cpuset_lib.cpp
+82 −86 device/cpuset_lib.hpp
+12 −22 device/driver_atomics.h
+3 −3 device/grayskull/grayskull_coordinate_manager.h
+7 −6 device/grayskull/grayskull_implementation.cpp
+39 −4 device/grayskull/grayskull_implementation.h
+89 −57 device/hugepage.cpp
+6 −5 device/hugepage.h
+4 −0 device/ioctl.h
+34 −10 device/mockup/tt_mockup_device.hpp
+238 −129 device/pcie/pci_device.cpp
+50 −32 device/pcie/pci_device.hpp
+140 −104 device/simulation/deprecated/tt_emulation_device.cpp
+79 −45 device/simulation/deprecated/tt_emulation_device.h
+76 −31 device/simulation/deprecated/tt_emulation_stub.cpp
+254 −182 device/simulation/deprecated/tt_versim_device.cpp
+76 −25 device/simulation/deprecated/tt_versim_device.h
+90 −31 device/simulation/deprecated/tt_versim_stub.cpp
+66 −61 device/simulation/tt_simulation_device.cpp
+20 −14 device/simulation/tt_simulation_device.h
+10 −9 device/simulation/tt_simulation_host.cpp
+2 −1 device/simulation/tt_simulation_host.hpp
+4 −4 device/tlb.h
+1 −1 device/tt_arch_types.h
+381 −216 device/tt_cluster_descriptor.cpp
+98 −93 device/tt_cluster_descriptor.h
+33 −11 device/tt_cluster_descriptor_types.h
+34 −0 device/tt_device.cpp
+11 −17 device/tt_io.hpp
+14 −14 device/tt_silicon_driver_common.cpp
+22 −33 device/tt_silicon_driver_common.hpp
+57 −36 device/tt_soc_descriptor.cpp
+36 −34 device/tt_soc_descriptor.h
+12 −0 device/tt_xy_pair.h
+4 −2 device/wormhole/wormhole_coordinate_manager.cpp
+4 −4 device/wormhole/wormhole_coordinate_manager.h
+7 −6 device/wormhole/wormhole_implementation.cpp
+37 −3 device/wormhole/wormhole_implementation.h
+1 −0 device/xy_pair.cpp
+3 −0 device/xy_pair.h
+0 −2 tests/.clang-format
+23 −0 tests/api/cluster_descriptor_examples/blackhole_P150.yaml
+383 −0 tests/api/cluster_descriptor_examples/galaxy.yaml
+23 −0 tests/api/cluster_descriptor_examples/grayskull_E150.yaml
+23 −0 tests/api/cluster_descriptor_examples/grayskull_E300.yaml
+41 −0 tests/api/cluster_descriptor_examples/wormhole_2xN300_unconnected.yaml
+24 −0 tests/api/cluster_descriptor_examples/wormhole_N150.yaml
+30 −0 tests/api/cluster_descriptor_examples/wormhole_N300.yaml
+24 −94 tests/api/test_chip.cpp
+70 −95 tests/api/test_cluster.cpp
+42 −72 tests/api/test_cluster_descriptor.cpp
+18 −9 tests/api/test_mockup_device.cpp
+17 −20 tests/api/test_soc_descriptor_bh.cpp
+8 −11 tests/api/test_soc_descriptor_gs.cpp
+28 −30 tests/api/test_soc_descriptor_wh.cpp
+48 −49 tests/blackhole/test_bh_common.h
+438 −209 tests/blackhole/test_silicon_driver_bh.cpp
+17 −7 tests/emulation/test_emulation_device.cpp
+17 −3 tests/galaxy/test_galaxy_common.cpp
+4 −9 tests/galaxy/test_galaxy_common.h
+66 −17 tests/galaxy/test_umd_concurrent_threads.cpp
+42 −14 tests/galaxy/test_umd_remote_api.cpp
+92 −98 tests/galaxy/test_umd_remote_api_stability.cpp
+288 −123 tests/grayskull/test_silicon_driver.cpp
+19 −10 tests/microbenchmark/device_fixture.hpp
+68 −30 tests/microbenchmark/test_rw_tensix.cpp
+1 −2 tests/pcie/test_pcie_device.cpp
+6 −9 tests/simulation/device_fixture.hpp
+27 −34 tests/simulation/test_simulation_device.cpp
+22 −3 tests/test_utils/device_test_utils.hpp
+7 −5 tests/test_utils/generate_cluster_desc.hpp
+1 −1 tests/test_utils/soc_desc_test_utils.hpp
+187 −142 tests/test_utils/stimulus_generators.hpp
+2 −3 tests/unit_test_main.cpp
+426 −201 tests/wormhole/test_silicon_driver_wh.cpp
+196 −202 tests/wormhole/test_umd_remote_api_stability.cpp
+46 −49 tests/wormhole/test_wh_common.h

0 comments on commit dd0daba

Please sign in to comment.