Skip to content

Commit

Permalink
[UMD] Removed set_*_params calls and constants (#15908)
Browse files Browse the repository at this point in the history
### Ticket
Related to #13948

### Problem description
Related to UMD change: tenstorrent/tt-umd#395
These parameters are defined by hardware.
The only parameters to be defined by the client are membars. This change
adds set_barrier_address_params accordingly.

### What's changed
Removed set_device_dram_address_params and set_device_l1_address_params,
and related constants.
Replace with call to set_barrier_address_params.

### Checklist
- [ ] All post-commit tests :
https://github.com/tenstorrent/tt-metal/actions/runs/12361649190 - main
generally unhealthy, I haven't seen new fails related to this change.
- [x] Blackhole post-commit tests :
https://github.com/tenstorrent/tt-metal/actions/runs/12361650912
- [ ] (Single-card) Model perf tests :
https://github.com/tenstorrent/tt-metal/actions/runs/12361652594 - N300
job failing on main
- [x] (Single-card) Device perf regressions :
https://github.com/tenstorrent/tt-metal/actions/runs/12361654455
- [x] (T3K) T3000 unit tests :
https://github.com/tenstorrent/tt-metal/actions/runs/12361656223
- [ ] (T3K) T3000 demo tests :
https://github.com/tenstorrent/tt-metal/actions/runs/12361657485 -
falcon job failing on main
- [ ] (TG) TG unit tests :
https://github.com/tenstorrent/tt-metal/actions/runs/12361658889 - unit
test failing on main
- [ ] (TG) TG demo tests :
https://github.com/tenstorrent/tt-metal/actions/runs/12361660547 -
failing on main
- [ ] (TGG) TGG unit tests :
https://github.com/tenstorrent/tt-metal/actions/runs/12361662343 -
failing on main for a long time due to hugepages
- [x] (TGG) TGG demo tests :
https://github.com/tenstorrent/tt-metal/actions/runs/12361664160
  • Loading branch information
broskoTT authored Dec 17, 2024
1 parent 8caba97 commit 5381e43
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 17 deletions.
3 changes: 0 additions & 3 deletions tt_metal/llrt/blackhole/bh_hal_active_eth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ HalCoreInfoType create_active_eth_mem_map() {
mem_map_bases[static_cast<std::size_t>(HalL1MemAddrType::GO_MSG)] = GET_ETH_MAILBOX_ADDRESS_HOST(go_message);
mem_map_bases[static_cast<std::size_t>(HalL1MemAddrType::LAUNCH_MSG_BUFFER_RD_PTR)] =
GET_ETH_MAILBOX_ADDRESS_HOST(launch_msg_rd_ptr);
mem_map_bases[static_cast<std::size_t>(HalL1MemAddrType::FW_VERSION_ADDR)] =
eth_l1_mem::address_map::FW_VERSION_ADDR;
mem_map_bases[static_cast<std::size_t>(HalL1MemAddrType::BANK_TO_NOC_SCRATCH)] =
eth_l1_mem::address_map::ERISC_MEM_BANK_TO_NOC_SCRATCH;

Expand All @@ -66,7 +64,6 @@ HalCoreInfoType create_active_eth_mem_map() {
eth_l1_mem::address_map::MAX_SIZE - eth_l1_mem::address_map::ERISC_L1_UNRESERVED_BASE;
mem_map_sizes[static_cast<std::size_t>(HalL1MemAddrType::GO_MSG)] = sizeof(go_msg_t);
mem_map_sizes[static_cast<std::size_t>(HalL1MemAddrType::LAUNCH_MSG_BUFFER_RD_PTR)] = sizeof(std::uint32_t);
mem_map_sizes[static_cast<std::size_t>(HalL1MemAddrType::FW_VERSION_ADDR)] = sizeof(std::uint32_t);
mem_map_sizes[static_cast<std::size_t>(HalL1MemAddrType::BANK_TO_NOC_SCRATCH)] =
eth_l1_mem::address_map::ERISC_MEM_BANK_TO_NOC_SIZE;

Expand Down
3 changes: 1 addition & 2 deletions tt_metal/llrt/hal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,9 @@ enum class HalL1MemAddrType : uint8_t {
CORE_INFO,
GO_MSG,
LAUNCH_MSG_BUFFER_RD_PTR,
FW_VERSION_ADDR, // Really only applicable to active eth core right now
LOCAL,
BANK_TO_NOC_SCRATCH,
COUNT // Keep this last so it always indicates number of enum options
COUNT // Keep this last so it always indicates number of enum options
};

enum class HalDramMemAddrType : uint8_t { DRAM_BARRIER = 0, COUNT = 1 };
Expand Down
12 changes: 6 additions & 6 deletions tt_metal/llrt/tt_cluster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,15 +252,15 @@ void Cluster::open_driver(const bool &skip_driver_allocs) {
} else if (this->target_type_ == TargetDevice::Simulator) {
device_driver = std::make_unique<tt_SimulationDevice>(sdesc_path);
}
std::uint32_t dram_barrier_base = tt_metal::hal.get_dev_addr(tt_metal::HalDramMemAddrType::DRAM_BARRIER);
device_driver->set_device_dram_address_params(tt_device_dram_address_params{dram_barrier_base});

l1_address_params.tensix_l1_barrier_base = tt_metal::hal.get_dev_addr(tt_metal::HalProgrammableCoreType::TENSIX, tt_metal::HalL1MemAddrType::BARRIER);
barrier_address_params barrier_params;
barrier_params.tensix_l1_barrier_base = tt_metal::hal.get_dev_addr(tt_metal::HalProgrammableCoreType::TENSIX, tt_metal::HalL1MemAddrType::BARRIER);
barrier_params.dram_barrier_base = tt_metal::hal.get_dev_addr(tt_metal::HalDramMemAddrType::DRAM_BARRIER);

if (tt_metal::hal.get_arch() != tt::ARCH::GRAYSKULL) {
l1_address_params.eth_l1_barrier_base = tt_metal::hal.get_dev_addr(tt_metal::HalProgrammableCoreType::ACTIVE_ETH, tt_metal::HalL1MemAddrType::BARRIER);
l1_address_params.fw_version_addr = tt_metal::hal.get_dev_addr(tt_metal::HalProgrammableCoreType::ACTIVE_ETH, tt_metal::HalL1MemAddrType::FW_VERSION_ADDR);
barrier_params.eth_l1_barrier_base = tt_metal::hal.get_dev_addr(tt_metal::HalProgrammableCoreType::ACTIVE_ETH, tt_metal::HalL1MemAddrType::BARRIER);
}
device_driver->set_device_l1_address_params(l1_address_params);
device_driver->set_barrier_address_params(barrier_params);

this->get_metal_desc_from_tt_desc(
device_driver->get_virtual_soc_descriptors(), device_driver->get_harvesting_masks_for_soc_descriptors());
Expand Down
2 changes: 0 additions & 2 deletions tt_metal/llrt/tt_cluster.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,6 @@ class Cluster {
// Mapping of each devices' ethernet routing mode
std::unordered_map<chip_id_t, std::unordered_map<CoreCoord, EthRouterMode>> device_eth_routing_info_;

tt_device_l1_address_params l1_address_params;

std::unordered_map<chip_id_t, std::unordered_map<chip_id_t, std::vector<CoreCoord>>> ethernet_sockets_;
};

Expand Down
3 changes: 0 additions & 3 deletions tt_metal/llrt/wormhole/wh_hal_active_eth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ HalCoreInfoType create_active_eth_mem_map() {
mem_map_bases[static_cast<std::size_t>(HalL1MemAddrType::GO_MSG)] = GET_ETH_MAILBOX_ADDRESS_HOST(go_message);
mem_map_bases[static_cast<std::size_t>(HalL1MemAddrType::LAUNCH_MSG_BUFFER_RD_PTR)] =
GET_ETH_MAILBOX_ADDRESS_HOST(launch_msg_rd_ptr);
mem_map_bases[static_cast<std::size_t>(HalL1MemAddrType::FW_VERSION_ADDR)] =
eth_l1_mem::address_map::FW_VERSION_ADDR;
mem_map_bases[static_cast<std::size_t>(HalL1MemAddrType::BANK_TO_NOC_SCRATCH)] =
eth_l1_mem::address_map::ERISC_MEM_BANK_TO_NOC_SCRATCH;

Expand All @@ -63,7 +61,6 @@ HalCoreInfoType create_active_eth_mem_map() {
eth_l1_mem::address_map::MAX_SIZE - eth_l1_mem::address_map::ERISC_L1_UNRESERVED_BASE;
mem_map_sizes[static_cast<std::size_t>(HalL1MemAddrType::GO_MSG)] = sizeof(go_msg_t);
mem_map_sizes[static_cast<std::size_t>(HalL1MemAddrType::LAUNCH_MSG_BUFFER_RD_PTR)] = sizeof(uint32_t);
mem_map_sizes[static_cast<std::size_t>(HalL1MemAddrType::FW_VERSION_ADDR)] = sizeof(std::uint32_t);
mem_map_sizes[static_cast<std::size_t>(HalL1MemAddrType::BANK_TO_NOC_SCRATCH)] = eth_l1_mem::address_map::ERISC_MEM_BANK_TO_NOC_SIZE;

std::vector<std::vector<HalJitBuildConfig>> processor_classes(NumEthDispatchClasses);
Expand Down
2 changes: 1 addition & 1 deletion tt_metal/third_party/umd
Submodule umd updated 40 files
+3 −1 .github/workflows/build-tests.yml
+33 −11 README.md
+2 −0 device/api/umd/device/architecture_implementation.h
+9 −0 device/api/umd/device/blackhole_coordinate_manager.h
+1 −0 device/api/umd/device/blackhole_implementation.h
+5 −32 device/api/umd/device/cluster.h
+28 −12 device/api/umd/device/coordinate_manager.h
+1 −0 device/api/umd/device/grayskull_implementation.h
+1 −8 device/api/umd/device/tt_simulation_device.h
+58 −38 device/api/umd/device/tt_soc_descriptor.h
+6 −0 device/api/umd/device/types/cluster_types.h
+1 −0 device/api/umd/device/wormhole_implementation.h
+95 −0 device/blackhole/blackhole_coordinate_manager.cpp
+11 −0 device/blackhole/blackhole_implementation.cpp
+12 −16 device/cluster.cpp
+133 −1 device/coordinate_manager.cpp
+8 −0 device/grayskull/grayskull_implementation.cpp
+1 −7 device/mockup/tt_mockup_device.hpp
+1 −15 device/simulation/tt_simulation_device.cpp
+97 −4 device/tt_soc_descriptor.cpp
+11 −0 device/wormhole/wormhole_implementation.cpp
+64 −0 scripts/iommu_detect.sh
+1 −0 tests/api/CMakeLists.txt
+13 −24 tests/api/test_cluster.cpp
+270 −0 tests/api/test_soc_descriptor.cpp
+1 −1 tests/blackhole/CMakeLists.txt
+15 −15 tests/blackhole/test_bh_common.h
+169 −169 tests/blackhole/test_cluster_bh.cpp
+3 −3 tests/galaxy/test_umd_concurrent_threads.cpp
+3 −3 tests/galaxy/test_umd_remote_api.cpp
+7 −7 tests/galaxy/test_umd_remote_api_stability.cpp
+1 −1 tests/grayskull/CMakeLists.txt
+109 −86 tests/grayskull/test_cluster_gs.cpp
+55 −0 tests/soc_descs/blackhole_simulation_1x2.yaml
+2 −2 tests/soc_descs/wormhole_b0_8x10.yaml
+18 −18 tests/test_utils/stimulus_generators.hpp
+1 −1 tests/wormhole/CMakeLists.txt
+162 −162 tests/wormhole/test_cluster_wh.cpp
+28 −28 tests/wormhole/test_umd_remote_api_stability.cpp
+15 −15 tests/wormhole/test_wh_common.h

0 comments on commit 5381e43

Please sign in to comment.