From 554ff00963abb3f9f98877afd795c3727e44a322 Mon Sep 17 00:00:00 2001 From: Andrew Fuller Date: Wed, 20 Nov 2024 23:16:18 +0000 Subject: [PATCH 1/2] Place the public API in a special place with a canonical way of accessing them --- CMakeLists.txt | 1 + common/CMakeLists.txt | 13 +++++ common/assert.hpp | 2 +- common/logger.hpp | 2 +- device/CMakeLists.txt | 54 ++++++++++--------- .../umd/device}/architecture_implementation.h | 6 +-- .../umd/device}/blackhole_implementation.h | 4 +- device/{ => api/umd/device}/cluster.h | 16 +++--- .../{ => api/umd/device}/coordinate_manager.h | 4 +- .../{ => api/umd/device}/device_api_metal.h | 4 +- device/{ => api/umd/device}/driver_atomics.h | 0 .../umd/device}/grayskull_implementation.h | 4 +- device/{ => api/umd/device}/hugepage.h | 2 +- .../{pcie => api/umd/device}/pci_device.hpp | 9 ++-- device/{ => api/umd/device}/tlb.h | 0 device/{ => api/umd/device}/tt_arch_types.h | 0 .../umd/device}/tt_cluster_descriptor.h | 4 +- .../umd/device}/tt_cluster_descriptor_types.h | 0 device/{ => api/umd/device}/tt_io.hpp | 0 .../umd/device}/tt_silicon_driver_common.hpp | 0 .../umd/device}/tt_simulation_device.h | 4 +- .../umd/device}/tt_simulation_host.hpp | 2 +- .../{ => api/umd/device}/tt_soc_descriptor.h | 6 +-- device/{ => api/umd/device}/tt_xy_pair.h | 2 +- .../umd/device}/wormhole_implementation.h | 4 +- device/{ => api/umd/device}/xy_pair.h | 0 device/architecture_implementation.cpp | 8 +-- .../blackhole/blackhole_coordinate_manager.h | 2 +- device/blackhole/blackhole_implementation.cpp | 8 +-- device/cluster.cpp | 20 +++---- device/coordinate_manager.cpp | 10 ++-- device/cpuset_lib.cpp | 5 +- device/cpuset_lib.hpp | 2 +- .../grayskull/grayskull_coordinate_manager.h | 2 +- device/grayskull/grayskull_implementation.cpp | 8 +-- device/hugepage.cpp | 6 +-- device/mockup/tt_mockup_device.hpp | 4 +- device/pcie/pci_device.cpp | 16 +++--- device/simulation/tt_simulation_device.cpp | 10 ++-- device/simulation/tt_simulation_host.cpp | 6 +-- device/tlb.cpp | 2 +- device/tt_cluster_descriptor.cpp | 4 +- device/tt_silicon_driver_common.cpp | 7 ++- device/tt_soc_descriptor.cpp | 2 +- device/wormhole/wormhole_coordinate_manager.h | 2 +- device/wormhole/wormhole_implementation.cpp | 8 +-- device/xy_pair.cpp | 2 +- src/CMakeLists.txt | 1 + tests/CMakeLists.txt | 1 + tests/api/test_chip.cpp | 6 +-- tests/api/test_cluster.cpp | 4 +- tests/api/test_cluster_descriptor.cpp | 6 +-- tests/api/test_mockup_device.cpp | 2 +- tests/api/test_soc_descriptor_bh.cpp | 2 +- tests/api/test_soc_descriptor_gs.cpp | 2 +- tests/api/test_soc_descriptor_wh.cpp | 2 +- tests/blackhole/test_bh_common.h | 6 +-- tests/blackhole/test_silicon_driver_bh.cpp | 6 +-- tests/galaxy/test_galaxy_common.h | 4 +- tests/galaxy/test_umd_concurrent_threads.cpp | 4 +- tests/galaxy/test_umd_remote_api.cpp | 4 +- .../galaxy/test_umd_remote_api_stability.cpp | 6 +-- tests/grayskull/test_silicon_driver.cpp | 8 +-- tests/pcie/test_pcie_device.cpp | 2 +- tests/simulation/device_fixture.hpp | 2 +- tests/test_utils/device_test_utils.hpp | 2 +- tests/test_utils/stimulus_generators.hpp | 6 +-- tests/wormhole/test_silicon_driver_wh.cpp | 6 +-- .../test_umd_remote_api_stability.cpp | 6 +-- tests/wormhole/test_wh_common.h | 6 +-- 70 files changed, 193 insertions(+), 178 deletions(-) create mode 100644 common/CMakeLists.txt rename device/{ => api/umd/device}/architecture_implementation.h (97%) rename device/{blackhole => api/umd/device}/blackhole_implementation.h (99%) rename device/{ => api/umd/device}/cluster.h (99%) rename device/{ => api/umd/device}/coordinate_manager.h (97%) rename device/{ => api/umd/device}/device_api_metal.h (62%) rename device/{ => api/umd/device}/driver_atomics.h (100%) rename device/{grayskull => api/umd/device}/grayskull_implementation.h (99%) rename device/{ => api/umd/device}/hugepage.h (95%) rename device/{pcie => api/umd/device}/pci_device.hpp (98%) rename device/{ => api/umd/device}/tlb.h (100%) rename device/{ => api/umd/device}/tt_arch_types.h (100%) rename device/{ => api/umd/device}/tt_cluster_descriptor.h (98%) rename device/{ => api/umd/device}/tt_cluster_descriptor_types.h (100%) rename device/{ => api/umd/device}/tt_io.hpp (100%) rename device/{ => api/umd/device}/tt_silicon_driver_common.hpp (100%) rename device/{simulation => api/umd/device}/tt_simulation_device.h (97%) rename device/{simulation => api/umd/device}/tt_simulation_host.hpp (94%) rename device/{ => api/umd/device}/tt_soc_descriptor.h (98%) rename device/{ => api/umd/device}/tt_xy_pair.h (98%) rename device/{wormhole => api/umd/device}/wormhole_implementation.h (99%) rename device/{ => api/umd/device}/xy_pair.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e4f0088..5bf1dade 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,6 +53,7 @@ message(STATUS "UMD build type: ${CMAKE_BUILD_TYPE}") include(dependencies) +add_subdirectory(common) add_subdirectory(device) add_subdirectory(src) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt new file mode 100644 index 00000000..69a6eef6 --- /dev/null +++ b/common/CMakeLists.txt @@ -0,0 +1,13 @@ +add_library(umd_common INTERFACE) +add_library(${PROJECT_NAME}::Common ALIAS umd_common) + +target_sources( + umd_common + INTERFACE + assert.hpp + backtrace.hpp + gtest_initializer.hpp # FIXME: this should be tucked away with the tests + logger.hpp +) + +target_include_directories(umd_common INTERFACE .) diff --git a/common/assert.hpp b/common/assert.hpp index 3189cec3..66ad6686 100644 --- a/common/assert.hpp +++ b/common/assert.hpp @@ -13,7 +13,7 @@ #include #include -#include "common/logger.hpp" +#include "logger.hpp" namespace tt { template diff --git a/common/logger.hpp b/common/logger.hpp index 9529d162..942a5208 100644 --- a/common/logger.hpp +++ b/common/logger.hpp @@ -20,7 +20,7 @@ #include #endif -#include "common/backtrace.hpp" +#include "backtrace.hpp" #include "fmt/color.h" #include "fmt/core.h" #include "fmt/ostream.h" diff --git a/device/CMakeLists.txt b/device/CMakeLists.txt index 499e521e..9f0d0738 100644 --- a/device/CMakeLists.txt +++ b/device/CMakeLists.txt @@ -2,41 +2,41 @@ set(POSITION_INDEPENDENT_CODE ON) generate_fbs_header(${PROJECT_SOURCE_DIR}/device/simulation/tt_simulation_device.fbs) -set(UMD_DEVICE_SRCS - architecture_implementation.cpp - cpuset_lib.cpp - tlb.cpp - tt_cluster_descriptor.cpp - cluster.cpp - tt_silicon_driver_common.cpp - tt_soc_descriptor.cpp - xy_pair.cpp - simulation/tt_simulation_device.cpp - simulation/tt_simulation_host.cpp - blackhole/blackhole_implementation.cpp - grayskull/grayskull_implementation.cpp - wormhole/wormhole_implementation.cpp - coordinate_manager.cpp - blackhole/blackhole_coordinate_manager.cpp - wormhole/wormhole_coordinate_manager.cpp - pcie/pci_device.cpp - hugepage.cpp -) - -add_library(device SHARED ${UMD_DEVICE_SRCS}) +add_library(device SHARED) add_library(${PROJECT_NAME}::device ALIAS device) -add_library(${PROJECT_NAME}_device ALIAS device) # For legacy I guess -target_sources(device PRIVATE ${FBS_GENERATED_HEADER}) +target_sources( + device + PRIVATE + architecture_implementation.cpp + blackhole/blackhole_coordinate_manager.cpp + blackhole/blackhole_implementation.cpp + cluster.cpp + coordinate_manager.cpp + cpuset_lib.cpp + grayskull/grayskull_implementation.cpp + hugepage.cpp + pcie/pci_device.cpp + simulation/tt_simulation_device.cpp + simulation/tt_simulation_host.cpp + tlb.cpp + tt_cluster_descriptor.cpp + tt_silicon_driver_common.cpp + tt_soc_descriptor.cpp + wormhole/wormhole_coordinate_manager.cpp + wormhole/wormhole_implementation.cpp + xy_pair.cpp + ${FBS_GENERATED_HEADER} +) target_include_directories( device PUBLIC - $ - $ + $ $ $ PRIVATE + $ $ ) @@ -49,6 +49,8 @@ target_link_libraries( flatbuffers uv PRIVATE + umd::Common + umd::Firmware hwloc rt Boost::interprocess diff --git a/device/architecture_implementation.h b/device/api/umd/device/architecture_implementation.h similarity index 97% rename from device/architecture_implementation.h rename to device/api/umd/device/architecture_implementation.h index ffd92e4b..f157dc8e 100644 --- a/device/architecture_implementation.h +++ b/device/api/umd/device/architecture_implementation.h @@ -11,9 +11,9 @@ #include #include -#include "device/tlb.h" -#include "device/xy_pair.h" -#include "device/tt_arch_types.h" +#include "umd/device/tlb.h" +#include "umd/device/xy_pair.h" +#include "umd/device/tt_arch_types.h" struct tt_driver_host_address_params; struct tt_driver_eth_interface_params; diff --git a/device/blackhole/blackhole_implementation.h b/device/api/umd/device/blackhole_implementation.h similarity index 99% rename from device/blackhole/blackhole_implementation.h rename to device/api/umd/device/blackhole_implementation.h index 2cd3ee9e..9fdf819c 100644 --- a/device/blackhole/blackhole_implementation.h +++ b/device/api/umd/device/blackhole_implementation.h @@ -8,8 +8,8 @@ #include -#include "device/architecture_implementation.h" -#include "device/tlb.h" +#include "umd/device/architecture_implementation.h" +#include "umd/device/tlb.h" #include namespace tt::umd { diff --git a/device/cluster.h b/device/api/umd/device/cluster.h similarity index 99% rename from device/cluster.h rename to device/api/umd/device/cluster.h index f2cb6f94..b387ea15 100644 --- a/device/cluster.h +++ b/device/api/umd/device/cluster.h @@ -13,14 +13,14 @@ #include #include -#include "tt_soc_descriptor.h" -#include "tt_xy_pair.h" -#include "tt_silicon_driver_common.hpp" -#include "device/tt_cluster_descriptor_types.h" -#include "device/tlb.h" -#include "device/tt_io.hpp" - -#include "pcie/pci_device.hpp" +#include "umd/device/tt_soc_descriptor.h" +#include "umd/device/tt_xy_pair.h" +#include "umd/device/tt_silicon_driver_common.hpp" +#include "umd/device/tt_cluster_descriptor_types.h" +#include "umd/device/tlb.h" +#include "umd/device/tt_io.hpp" + +#include "umd/device/pci_device.hpp" #include "fmt/core.h" using TLB_DATA = tt::umd::tlb_data; diff --git a/device/coordinate_manager.h b/device/api/umd/device/coordinate_manager.h similarity index 97% rename from device/coordinate_manager.h rename to device/api/umd/device/coordinate_manager.h index a4786b66..e24e370b 100644 --- a/device/coordinate_manager.h +++ b/device/api/umd/device/coordinate_manager.h @@ -10,8 +10,8 @@ #include #include -#include "device/tt_xy_pair.h" -#include "device/tt_arch_types.h" +#include "umd/device/tt_xy_pair.h" +#include "umd/device/tt_arch_types.h" class CoordinateManager { diff --git a/device/device_api_metal.h b/device/api/umd/device/device_api_metal.h similarity index 62% rename from device/device_api_metal.h rename to device/api/umd/device/device_api_metal.h index 656397dc..a751d046 100644 --- a/device/device_api_metal.h +++ b/device/api/umd/device/device_api_metal.h @@ -5,5 +5,5 @@ */ #pragma once -#include "device/cluster.h" -#include "device/driver_atomics.h" +#include "umd/device/cluster.h" +#include "umd/device/driver_atomics.h" diff --git a/device/driver_atomics.h b/device/api/umd/device/driver_atomics.h similarity index 100% rename from device/driver_atomics.h rename to device/api/umd/device/driver_atomics.h diff --git a/device/grayskull/grayskull_implementation.h b/device/api/umd/device/grayskull_implementation.h similarity index 99% rename from device/grayskull/grayskull_implementation.h rename to device/api/umd/device/grayskull_implementation.h index 3f385801..8f476ade 100644 --- a/device/grayskull/grayskull_implementation.h +++ b/device/api/umd/device/grayskull_implementation.h @@ -8,8 +8,8 @@ #include -#include "device/architecture_implementation.h" -#include "device/tlb.h" +#include "architecture_implementation.h" +#include "umd/device/tlb.h" namespace tt::umd { diff --git a/device/hugepage.h b/device/api/umd/device/hugepage.h similarity index 95% rename from device/hugepage.h rename to device/api/umd/device/hugepage.h index d12b1396..18840ec5 100644 --- a/device/hugepage.h +++ b/device/api/umd/device/hugepage.h @@ -6,7 +6,7 @@ #pragma once -#include "device/tt_cluster_descriptor_types.h" +#include "umd/device/tt_cluster_descriptor_types.h" #include #include diff --git a/device/pcie/pci_device.hpp b/device/api/umd/device/pci_device.hpp similarity index 98% rename from device/pcie/pci_device.hpp rename to device/api/umd/device/pci_device.hpp index 2d6c2fa4..c0c2c20d 100644 --- a/device/pcie/pci_device.hpp +++ b/device/api/umd/device/pci_device.hpp @@ -12,10 +12,10 @@ #include #include -#include "device/tt_xy_pair.h" -#include "device/tt_arch_types.h" -#include "device/tt_cluster_descriptor_types.h" -#include "device/tlb.h" +#include "umd/device/tt_xy_pair.h" +#include "umd/device/tt_arch_types.h" +#include "umd/device/tt_cluster_descriptor_types.h" +#include "umd/device/tlb.h" // TODO: this is used up in cluster.cpp but that logic ought to be // lowered into the PCIDevice class since it is specific to PCIe cards. @@ -213,4 +213,3 @@ class PCIDevice { std::vector hugepage_mapping_per_channel; }; - diff --git a/device/tlb.h b/device/api/umd/device/tlb.h similarity index 100% rename from device/tlb.h rename to device/api/umd/device/tlb.h diff --git a/device/tt_arch_types.h b/device/api/umd/device/tt_arch_types.h similarity index 100% rename from device/tt_arch_types.h rename to device/api/umd/device/tt_arch_types.h diff --git a/device/tt_cluster_descriptor.h b/device/api/umd/device/tt_cluster_descriptor.h similarity index 98% rename from device/tt_cluster_descriptor.h rename to device/api/umd/device/tt_cluster_descriptor.h index 746a99dc..85d62c33 100644 --- a/device/tt_cluster_descriptor.h +++ b/device/api/umd/device/tt_cluster_descriptor.h @@ -7,7 +7,7 @@ #pragma once -#include "device/tt_xy_pair.h" +#include "umd/device/tt_xy_pair.h" #include #include @@ -18,7 +18,7 @@ #include #include #include -#include "device/tt_cluster_descriptor_types.h" +#include "umd/device/tt_cluster_descriptor_types.h" namespace YAML { class Node; } diff --git a/device/tt_cluster_descriptor_types.h b/device/api/umd/device/tt_cluster_descriptor_types.h similarity index 100% rename from device/tt_cluster_descriptor_types.h rename to device/api/umd/device/tt_cluster_descriptor_types.h diff --git a/device/tt_io.hpp b/device/api/umd/device/tt_io.hpp similarity index 100% rename from device/tt_io.hpp rename to device/api/umd/device/tt_io.hpp diff --git a/device/tt_silicon_driver_common.hpp b/device/api/umd/device/tt_silicon_driver_common.hpp similarity index 100% rename from device/tt_silicon_driver_common.hpp rename to device/api/umd/device/tt_silicon_driver_common.hpp diff --git a/device/simulation/tt_simulation_device.h b/device/api/umd/device/tt_simulation_device.h similarity index 97% rename from device/simulation/tt_simulation_device.h rename to device/api/umd/device/tt_simulation_device.h index 16dd47d7..955dd288 100644 --- a/device/simulation/tt_simulation_device.h +++ b/device/api/umd/device/tt_simulation_device.h @@ -10,8 +10,8 @@ #include #include -#include "device/cluster.h" -#include "device/simulation/tt_simulation_host.hpp" +#include "umd/device/cluster.h" +#include "umd/device/tt_simulation_host.hpp" class tt_SimulationDevice: public tt_device { public: diff --git a/device/simulation/tt_simulation_host.hpp b/device/api/umd/device/tt_simulation_host.hpp similarity index 94% rename from device/simulation/tt_simulation_host.hpp rename to device/api/umd/device/tt_simulation_host.hpp index 6de18a04..636c51e8 100644 --- a/device/simulation/tt_simulation_host.hpp +++ b/device/api/umd/device/tt_simulation_host.hpp @@ -5,7 +5,7 @@ #include #include -#include "device/tt_xy_pair.h" +#include "umd/device/tt_xy_pair.h" #define NNG_SOCKET_PREFIX "ipc:///tmp/" diff --git a/device/tt_soc_descriptor.h b/device/api/umd/device/tt_soc_descriptor.h similarity index 98% rename from device/tt_soc_descriptor.h rename to device/api/umd/device/tt_soc_descriptor.h index 372d0a29..3a284d0a 100644 --- a/device/tt_soc_descriptor.h +++ b/device/api/umd/device/tt_soc_descriptor.h @@ -16,10 +16,10 @@ #include #include -#include "tt_xy_pair.h" -#include "device/tt_arch_types.h" +#include "umd/device/tt_xy_pair.h" +#include "umd/device/tt_arch_types.h" -#include "device/coordinate_manager.h" +#include "umd/device/coordinate_manager.h" #include "fmt/core.h" diff --git a/device/tt_xy_pair.h b/device/api/umd/device/tt_xy_pair.h similarity index 98% rename from device/tt_xy_pair.h rename to device/api/umd/device/tt_xy_pair.h index fde3b457..b86d568e 100644 --- a/device/tt_xy_pair.h +++ b/device/api/umd/device/tt_xy_pair.h @@ -8,7 +8,7 @@ #include -#include "device/xy_pair.h" +#include "umd/device/xy_pair.h" using tt_xy_pair = tt::umd::xy_pair; using tt_cxy_pair = tt::umd::cxy_pair; diff --git a/device/wormhole/wormhole_implementation.h b/device/api/umd/device/wormhole_implementation.h similarity index 99% rename from device/wormhole/wormhole_implementation.h rename to device/api/umd/device/wormhole_implementation.h index 2346185a..7bef1e9e 100644 --- a/device/wormhole/wormhole_implementation.h +++ b/device/api/umd/device/wormhole_implementation.h @@ -8,8 +8,8 @@ #include -#include "device/architecture_implementation.h" -#include "device/tlb.h" +#include "architecture_implementation.h" +#include "umd/device/tlb.h" namespace tt::umd { diff --git a/device/xy_pair.h b/device/api/umd/device/xy_pair.h similarity index 100% rename from device/xy_pair.h rename to device/api/umd/device/xy_pair.h diff --git a/device/architecture_implementation.cpp b/device/architecture_implementation.cpp index 7cd1dac8..4b7b7faf 100644 --- a/device/architecture_implementation.cpp +++ b/device/architecture_implementation.cpp @@ -2,11 +2,11 @@ // // SPDX-License-Identifier: Apache-2.0 -#include "device/architecture_implementation.h" +#include "umd/device/architecture_implementation.h" -#include "device/blackhole/blackhole_implementation.h" -#include "device/grayskull/grayskull_implementation.h" -#include "device/wormhole/wormhole_implementation.h" +#include "umd/device/blackhole_implementation.h" +#include "umd/device/grayskull_implementation.h" +#include "umd/device/wormhole_implementation.h" namespace tt::umd { diff --git a/device/blackhole/blackhole_coordinate_manager.h b/device/blackhole/blackhole_coordinate_manager.h index 6eef92eb..7491f272 100644 --- a/device/blackhole/blackhole_coordinate_manager.h +++ b/device/blackhole/blackhole_coordinate_manager.h @@ -6,7 +6,7 @@ #pragma once -#include "device/coordinate_manager.h" +#include "umd/device/coordinate_manager.h" class BlackholeCoordinateManager : public CoordinateManager { diff --git a/device/blackhole/blackhole_implementation.cpp b/device/blackhole/blackhole_implementation.cpp index bf6ef553..0421e2d1 100644 --- a/device/blackhole/blackhole_implementation.cpp +++ b/device/blackhole/blackhole_implementation.cpp @@ -2,12 +2,12 @@ // // SPDX-License-Identifier: Apache-2.0 -#include "blackhole_implementation.h" +#include "umd/device/blackhole_implementation.h" -#include "src/firmware/riscv/blackhole/host_mem_address_map.h" -#include "src/firmware/riscv/blackhole/eth_interface.h" +#include "blackhole/host_mem_address_map.h" +#include "blackhole/eth_interface.h" -#include "device/cluster.h" +#include "umd/device/cluster.h" constexpr std::uint32_t NOC_ADDR_LOCAL_BITS = 36; // source: noc_parameters.h, common for WH && BH constexpr std::uint32_t NOC_ADDR_NODE_ID_BITS = 6; // source: noc_parameters.h, common for WH && BH diff --git a/device/cluster.cpp b/device/cluster.cpp index 041d7e7b..be574bfe 100644 --- a/device/cluster.cpp +++ b/device/cluster.cpp @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: (c) 2023 Tenstorrent Inc. // // SPDX-License-Identifier: Apache-2.0 -#include "cluster.h" +#include "umd/device/cluster.h" #include #include @@ -38,14 +38,14 @@ #include #include "yaml-cpp/yaml.h" -#include "common/logger.hpp" +#include "logger.hpp" -#include "device/tt_cluster_descriptor.h" -#include "device/driver_atomics.h" -#include "device/hugepage.h" -#include "device/architecture_implementation.h" -#include "device/tlb.h" -#include "device/tt_arch_types.h" +#include "umd/device/tt_cluster_descriptor.h" +#include "umd/device/driver_atomics.h" +#include "umd/device/hugepage.h" +#include "umd/device/architecture_implementation.h" +#include "umd/device/tlb.h" +#include "umd/device/tt_arch_types.h" using namespace boost::interprocess; using namespace tt; @@ -117,8 +117,8 @@ const tt_SocDescriptor& tt_device::get_soc_descriptor(chip_id_t chip_id) const { // -------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------- -#include "tt_silicon_driver_common.hpp" -#include "tt_xy_pair.h" +#include "umd/device/tt_silicon_driver_common.hpp" +#include "umd/device/tt_xy_pair.h" #include #include #include diff --git a/device/coordinate_manager.cpp b/device/coordinate_manager.cpp index 32406693..330eb864 100644 --- a/device/coordinate_manager.cpp +++ b/device/coordinate_manager.cpp @@ -3,9 +3,9 @@ * * SPDX-License-Identifier: Apache-2.0 */ -#include "device/coordinate_manager.h" +#include "umd/device/coordinate_manager.h" #include -#include "coordinate_manager.h" +#include "umd/device/coordinate_manager.h" #include "grayskull/grayskull_coordinate_manager.h" tt_physical_coords CoordinateManager::to_physical_coords(tt_logical_coords logical_coords) { @@ -167,9 +167,9 @@ void CoordinateManager::fill_logical_to_virtual_mapping(const std::set& } } -#include "device/blackhole/blackhole_coordinate_manager.h" -#include "device/grayskull/grayskull_coordinate_manager.h" -#include "device/wormhole/wormhole_coordinate_manager.h" +#include "blackhole/blackhole_coordinate_manager.h" +#include "grayskull/grayskull_coordinate_manager.h" +#include "wormhole/wormhole_coordinate_manager.h" std::unique_ptr CoordinateManager::get_coordinate_manager( tt::ARCH arch, diff --git a/device/cpuset_lib.cpp b/device/cpuset_lib.cpp index 0f1c4e5d..b51a26cc 100644 --- a/device/cpuset_lib.cpp +++ b/device/cpuset_lib.cpp @@ -5,9 +5,9 @@ #include #include "cpuset_lib.hpp" -#include "common/logger.hpp" +#include "logger.hpp" #include -#include "device/cluster.h" +#include "umd/device/cluster.h" #include #include "fmt/core.h" namespace tt { @@ -519,4 +519,3 @@ void tt_cpuset_allocator::print_hwloc_object(hwloc_obj_t &obj, int depth, bool v } // namespace cpuset } // namespace tt - diff --git a/device/cpuset_lib.hpp b/device/cpuset_lib.hpp index a14a4f33..a08bc7cc 100644 --- a/device/cpuset_lib.hpp +++ b/device/cpuset_lib.hpp @@ -14,7 +14,7 @@ #include #include -#include "device/tt_cluster_descriptor.h" // For chip_id_t +#include "umd/device/tt_cluster_descriptor.h" // For chip_id_t #include "hwloc.h" diff --git a/device/grayskull/grayskull_coordinate_manager.h b/device/grayskull/grayskull_coordinate_manager.h index ac6ee60d..acecbf22 100644 --- a/device/grayskull/grayskull_coordinate_manager.h +++ b/device/grayskull/grayskull_coordinate_manager.h @@ -6,7 +6,7 @@ #pragma once -#include "device/coordinate_manager.h" +#include "umd/device/coordinate_manager.h" class GrayskullCoordinateManager : public CoordinateManager { diff --git a/device/grayskull/grayskull_implementation.cpp b/device/grayskull/grayskull_implementation.cpp index 7cdb72e5..b7199873 100644 --- a/device/grayskull/grayskull_implementation.cpp +++ b/device/grayskull/grayskull_implementation.cpp @@ -2,12 +2,12 @@ // // SPDX-License-Identifier: Apache-2.0 -#include "grayskull_implementation.h" +#include "umd/device/grayskull_implementation.h" -#include "src/firmware/riscv/grayskull/host_mem_address_map.h" -#include "src/firmware/riscv/grayskull/eth_interface.h" +#include "grayskull/host_mem_address_map.h" +#include "grayskull/eth_interface.h" -#include "device/cluster.h" +#include "umd/device/cluster.h" constexpr std::uint32_t NOC_ADDR_LOCAL_BITS = 32; // source: noc_parameters.h, unique for GS constexpr std::uint32_t NOC_ADDR_NODE_ID_BITS = 6; // source: noc_parameters.h, common for GS && WH && BH diff --git a/device/hugepage.cpp b/device/hugepage.cpp index b4695c21..e9c45d63 100644 --- a/device/hugepage.cpp +++ b/device/hugepage.cpp @@ -4,13 +4,13 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "hugepage.h" +#include "umd/device/hugepage.h" #include // for umask #include // for O_RDWR and other constants -#include "common/logger.hpp" -#include "device/cpuset_lib.hpp" +#include "logger.hpp" +#include "cpuset_lib.hpp" const uint32_t g_MAX_HOST_MEM_CHANNELS = 4; diff --git a/device/mockup/tt_mockup_device.hpp b/device/mockup/tt_mockup_device.hpp index 2d888d93..25985407 100644 --- a/device/mockup/tt_mockup_device.hpp +++ b/device/mockup/tt_mockup_device.hpp @@ -9,8 +9,8 @@ #include #include -#include "device/tt_cluster_descriptor.h" -#include "device/cluster.h" +#include "umd/device/tt_cluster_descriptor.h" +#include "umd/device/cluster.h" class tt_MockupDevice : public tt_device { public: diff --git a/device/pcie/pci_device.cpp b/device/pcie/pci_device.cpp index 95baa27c..433fe4bf 100644 --- a/device/pcie/pci_device.cpp +++ b/device/pcie/pci_device.cpp @@ -14,17 +14,17 @@ #include // for fstat #include // for PCI_SLOT, PCI_FUNC -#include "pci_device.hpp" +#include "umd/device/pci_device.hpp" #include "ioctl.h" #include "ioctl.h" -#include "device/tt_arch_types.h" -#include "device/driver_atomics.h" -#include "device/architecture_implementation.h" -#include "device/cpuset_lib.hpp" -#include "device/hugepage.h" -#include "common/assert.hpp" -#include "common/logger.hpp" +#include "umd/device/tt_arch_types.h" +#include "umd/device/driver_atomics.h" +#include "umd/device/architecture_implementation.h" +#include "cpuset_lib.hpp" +#include "umd/device/hugepage.h" +#include "assert.hpp" +#include "logger.hpp" static const uint16_t GS_PCIE_DEVICE_ID = 0xfaca; static const uint16_t WH_PCIE_DEVICE_ID = 0x401e; diff --git a/device/simulation/tt_simulation_device.cpp b/device/simulation/tt_simulation_device.cpp index e3909ecc..61cd55ac 100644 --- a/device/simulation/tt_simulation_device.cpp +++ b/device/simulation/tt_simulation_device.cpp @@ -12,12 +12,12 @@ #include #include -#include "common/logger.hpp" -#include "common/assert.hpp" -#include "device/driver_atomics.h" -#include "device/tt_cluster_descriptor.h" +#include "logger.hpp" +#include "assert.hpp" +#include "umd/device/driver_atomics.h" +#include "umd/device/tt_cluster_descriptor.h" -#include "tt_simulation_device.h" +#include "umd/device/tt_simulation_device.h" #include "tt_simulation_device_generated.h" flatbuffers::FlatBufferBuilder create_flatbuffer(DEVICE_COMMAND rw, std::vector vec, tt_cxy_pair core_, uint64_t addr, uint64_t size_=0){ diff --git a/device/simulation/tt_simulation_host.cpp b/device/simulation/tt_simulation_host.cpp index ed9cf7e9..eeee8110 100644 --- a/device/simulation/tt_simulation_host.cpp +++ b/device/simulation/tt_simulation_host.cpp @@ -12,9 +12,9 @@ #include #include -#include "common/logger.hpp" -#include "common/assert.hpp" -#include "tt_simulation_host.hpp" +#include "logger.hpp" +#include "assert.hpp" +#include "umd/device/tt_simulation_host.hpp" tt_SimulationHost::tt_SimulationHost() { // Initialize socket and dialer diff --git a/device/tlb.cpp b/device/tlb.cpp index 22d0a3c9..b4423e05 100644 --- a/device/tlb.cpp +++ b/device/tlb.cpp @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: Apache-2.0 -#include "device/tlb.h" +#include "umd/device/tlb.h" namespace tt::umd { diff --git a/device/tt_cluster_descriptor.cpp b/device/tt_cluster_descriptor.cpp index 97c5a711..203a7a0c 100644 --- a/device/tt_cluster_descriptor.cpp +++ b/device/tt_cluster_descriptor.cpp @@ -3,14 +3,14 @@ // SPDX-License-Identifier: Apache-2.0 -#include "tt_cluster_descriptor.h" +#include "umd/device/tt_cluster_descriptor.h" #include "libs/create_ethernet_map.h" #include #include #include -#include "common/logger.hpp" +#include "logger.hpp" #include "yaml-cpp/yaml.h" #include "fmt/core.h" diff --git a/device/tt_silicon_driver_common.cpp b/device/tt_silicon_driver_common.cpp index 26360be6..0b42f5a3 100644 --- a/device/tt_silicon_driver_common.cpp +++ b/device/tt_silicon_driver_common.cpp @@ -2,9 +2,9 @@ // // SPDX-License-Identifier: Apache-2.0 -#include "device/tt_silicon_driver_common.hpp" -#include "tt_xy_pair.h" -#include "cluster.h" +#include "umd/device/tt_silicon_driver_common.hpp" +#include "umd/device/tt_xy_pair.h" +#include "umd/device/cluster.h" std::string TensixSoftResetOptionsToString(TensixSoftResetOptions value) { std::string output; @@ -36,4 +36,3 @@ std::string TensixSoftResetOptionsToString(TensixSoftResetOptions value) { return output; } - diff --git a/device/tt_soc_descriptor.cpp b/device/tt_soc_descriptor.cpp index 9a572420..6d84a2b7 100644 --- a/device/tt_soc_descriptor.cpp +++ b/device/tt_soc_descriptor.cpp @@ -3,7 +3,7 @@ // SPDX-License-Identifier: Apache-2.0 #include "yaml-cpp/yaml.h" -#include "tt_soc_descriptor.h" +#include "umd/device/tt_soc_descriptor.h" #include #include diff --git a/device/wormhole/wormhole_coordinate_manager.h b/device/wormhole/wormhole_coordinate_manager.h index 9eca9fd1..0c06d119 100644 --- a/device/wormhole/wormhole_coordinate_manager.h +++ b/device/wormhole/wormhole_coordinate_manager.h @@ -6,7 +6,7 @@ #pragma once -#include "device/coordinate_manager.h" +#include "umd/device/coordinate_manager.h" class WormholeCoordinateManager : public CoordinateManager { diff --git a/device/wormhole/wormhole_implementation.cpp b/device/wormhole/wormhole_implementation.cpp index 247a5eaa..c19e59fd 100644 --- a/device/wormhole/wormhole_implementation.cpp +++ b/device/wormhole/wormhole_implementation.cpp @@ -2,12 +2,12 @@ // // SPDX-License-Identifier: Apache-2.0 -#include "wormhole_implementation.h" +#include "umd/device/wormhole_implementation.h" -#include "src/firmware/riscv/wormhole/host_mem_address_map.h" -#include "src/firmware/riscv/wormhole/eth_interface.h" +#include "wormhole/host_mem_address_map.h" +#include "wormhole/eth_interface.h" -#include "device/cluster.h" +#include "umd/device/cluster.h" constexpr std::uint32_t NOC_ADDR_LOCAL_BITS = 36; // source: noc_parameters.h, common for WH && BH constexpr std::uint32_t NOC_ADDR_NODE_ID_BITS = 6; // source: noc_parameters.h, common for WH && BH diff --git a/device/xy_pair.cpp b/device/xy_pair.cpp index 0c3c9e20..0559f31c 100644 --- a/device/xy_pair.cpp +++ b/device/xy_pair.cpp @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include "xy_pair.h" +#include "umd/device/xy_pair.h" #include diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 44ca9f2f..cb81fef1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -7,4 +7,5 @@ target_include_directories( $<$:${CMAKE_CURRENT_SOURCE_DIR}/firmware/riscv/wormhole> $<$:${CMAKE_CURRENT_SOURCE_DIR}/firmware/riscv/grayskull> $<$:${CMAKE_CURRENT_SOURCE_DIR}/firmware/riscv/blackhole> + firmware/riscv ) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 6829c91b..b11a8711 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -19,6 +19,7 @@ target_include_directories( INTERFACE ${PROJECT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR} + "$" ) # Download noc_parameters.h for tests diff --git a/tests/api/test_chip.cpp b/tests/api/test_chip.cpp index caea4245..d15ff66d 100644 --- a/tests/api/test_chip.cpp +++ b/tests/api/test_chip.cpp @@ -15,9 +15,9 @@ #include "tests/test_utils/generate_cluster_desc.hpp" // TODO: change to tt_cluster -#include "device/cluster.h" -#include "device/tt_cluster_descriptor.h" -#include "device/architecture_implementation.h" +#include "umd/device/cluster.h" +#include "umd/device/tt_cluster_descriptor.h" +#include "umd/device/architecture_implementation.h" using namespace tt::umd; diff --git a/tests/api/test_cluster.cpp b/tests/api/test_cluster.cpp index bc9c4a4c..c6f1285a 100644 --- a/tests/api/test_cluster.cpp +++ b/tests/api/test_cluster.cpp @@ -14,8 +14,8 @@ #include "fmt/xchar.h" #include "tests/test_utils/generate_cluster_desc.hpp" -#include "device/tt_cluster_descriptor.h" -#include "device/cluster.h" +#include "umd/device/tt_cluster_descriptor.h" +#include "umd/device/cluster.h" // TODO: obviously we need some other way to set this up #include "src/firmware/riscv/wormhole/eth_l1_address_map.h" diff --git a/tests/api/test_cluster_descriptor.cpp b/tests/api/test_cluster_descriptor.cpp index 51755c2f..867388ae 100644 --- a/tests/api/test_cluster_descriptor.cpp +++ b/tests/api/test_cluster_descriptor.cpp @@ -10,11 +10,11 @@ #include "tests/test_utils/generate_cluster_desc.hpp" -#include "device/pcie/pci_device.hpp" -#include "device/tt_cluster_descriptor.h" +#include "umd/device/pci_device.hpp" +#include "umd/device/tt_cluster_descriptor.h" // TODO: Needed for detect_arch, remove when it is part of cluster descriptor. -#include "device/cluster.h" +#include "umd/device/cluster.h" inline std::unique_ptr get_cluster_desc() { diff --git a/tests/api/test_mockup_device.cpp b/tests/api/test_mockup_device.cpp index f41b5aea..d687075e 100644 --- a/tests/api/test_mockup_device.cpp +++ b/tests/api/test_mockup_device.cpp @@ -11,7 +11,7 @@ #include #include "device/mockup/tt_mockup_device.hpp" -#include "device/tt_arch_types.h" +#include "umd/device/tt_arch_types.h" #include "tests/test_utils/generate_cluster_desc.hpp" namespace test::mockup_device { diff --git a/tests/api/test_soc_descriptor_bh.cpp b/tests/api/test_soc_descriptor_bh.cpp index 8032d02c..5234a7c0 100644 --- a/tests/api/test_soc_descriptor_bh.cpp +++ b/tests/api/test_soc_descriptor_bh.cpp @@ -5,7 +5,7 @@ */ #include "gtest/gtest.h" -#include "device/tt_soc_descriptor.h" +#include "umd/device/tt_soc_descriptor.h" #include "tests/test_utils/generate_cluster_desc.hpp" #include "tests/test_utils/soc_desc_test_utils.hpp" diff --git a/tests/api/test_soc_descriptor_gs.cpp b/tests/api/test_soc_descriptor_gs.cpp index 1c72449b..c697a59d 100644 --- a/tests/api/test_soc_descriptor_gs.cpp +++ b/tests/api/test_soc_descriptor_gs.cpp @@ -5,7 +5,7 @@ */ #include "gtest/gtest.h" -#include "device/tt_soc_descriptor.h" +#include "umd/device/tt_soc_descriptor.h" #include "tests/test_utils/generate_cluster_desc.hpp" #include "tests/test_utils/soc_desc_test_utils.hpp" diff --git a/tests/api/test_soc_descriptor_wh.cpp b/tests/api/test_soc_descriptor_wh.cpp index 37923210..2e8f5367 100644 --- a/tests/api/test_soc_descriptor_wh.cpp +++ b/tests/api/test_soc_descriptor_wh.cpp @@ -5,7 +5,7 @@ */ #include "gtest/gtest.h" -#include "device/tt_soc_descriptor.h" +#include "umd/device/tt_soc_descriptor.h" #include "tests/test_utils/generate_cluster_desc.hpp" #include "tests/test_utils/soc_desc_test_utils.hpp" diff --git a/tests/blackhole/test_bh_common.h b/tests/blackhole/test_bh_common.h index 57fdf25c..a84b2cdd 100644 --- a/tests/blackhole/test_bh_common.h +++ b/tests/blackhole/test_bh_common.h @@ -3,9 +3,9 @@ // SPDX-License-Identifier: Apache-2.0 #pragma once -#include "tt_xy_pair.h" -#include "tt_cluster_descriptor.h" -#include "cluster.h" +#include "umd/device/tt_xy_pair.h" +#include "umd/device/tt_cluster_descriptor.h" +#include "umd/device/cluster.h" #include "tests/test_utils/stimulus_generators.hpp" #include "eth_l1_address_map.h" diff --git a/tests/blackhole/test_silicon_driver_bh.cpp b/tests/blackhole/test_silicon_driver_bh.cpp index abaff80a..1ac75e65 100644 --- a/tests/blackhole/test_silicon_driver_bh.cpp +++ b/tests/blackhole/test_silicon_driver_bh.cpp @@ -3,15 +3,15 @@ // SPDX-License-Identifier: Apache-2.0 #include "gtest/gtest.h" -#include +#include #include "eth_l1_address_map.h" #include "l1_address_map.h" #include "host_mem_address_map.h" #include #include -#include "device/blackhole/blackhole_implementation.h" -#include "device/tt_cluster_descriptor.h" +#include "umd/device/blackhole_implementation.h" +#include "umd/device/tt_cluster_descriptor.h" #include "tests/test_utils/generate_cluster_desc.hpp" #include "tests/test_utils/device_test_utils.hpp" diff --git a/tests/galaxy/test_galaxy_common.h b/tests/galaxy/test_galaxy_common.h index 321b33fd..1198d0a4 100644 --- a/tests/galaxy/test_galaxy_common.h +++ b/tests/galaxy/test_galaxy_common.h @@ -13,8 +13,8 @@ #include #include -#include "device/cluster.h" -#include "device/tt_xy_pair.h" +#include "umd/device/cluster.h" +#include "umd/device/tt_xy_pair.h" #include "fmt/core.h" diff --git a/tests/galaxy/test_umd_concurrent_threads.cpp b/tests/galaxy/test_umd_concurrent_threads.cpp index 3c9eb092..2c4f6d42 100644 --- a/tests/galaxy/test_umd_concurrent_threads.cpp +++ b/tests/galaxy/test_umd_concurrent_threads.cpp @@ -8,8 +8,8 @@ #include "gtest/gtest.h" #include "common/logger.hpp" -#include "tt_cluster_descriptor.h" -#include "cluster.h" +#include "umd/device/tt_cluster_descriptor.h" +#include "umd/device/cluster.h" #include "eth_interface.h" #include "host_mem_address_map.h" #include "l1_address_map.h" diff --git a/tests/galaxy/test_umd_remote_api.cpp b/tests/galaxy/test_umd_remote_api.cpp index 4e8130b5..535607b5 100644 --- a/tests/galaxy/test_umd_remote_api.cpp +++ b/tests/galaxy/test_umd_remote_api.cpp @@ -7,8 +7,8 @@ #include "gtest/gtest.h" #include "common/logger.hpp" -#include "tt_cluster_descriptor.h" -#include "cluster.h" +#include "umd/device/tt_cluster_descriptor.h" +#include "umd/device/cluster.h" #include "eth_interface.h" #include "host_mem_address_map.h" #include "l1_address_map.h" diff --git a/tests/galaxy/test_umd_remote_api_stability.cpp b/tests/galaxy/test_umd_remote_api_stability.cpp index a91dccce..ae2f8094 100644 --- a/tests/galaxy/test_umd_remote_api_stability.cpp +++ b/tests/galaxy/test_umd_remote_api_stability.cpp @@ -7,8 +7,8 @@ #include #include -#include "tt_cluster_descriptor.h" -#include "cluster.h" +#include "umd/device/tt_cluster_descriptor.h" +#include "umd/device/cluster.h" #include "common/logger.hpp" #include "eth_interface.h" @@ -16,7 +16,7 @@ #include "gtest/gtest.h" #include "host_mem_address_map.h" #include "l1_address_map.h" -#include "tt_soc_descriptor.h" +#include "umd/device/tt_soc_descriptor.h" #include "tests/test_utils/stimulus_generators.hpp" #include "tests/test_utils/generate_cluster_desc.hpp" diff --git a/tests/grayskull/test_silicon_driver.cpp b/tests/grayskull/test_silicon_driver.cpp index c4854848..b2e34c70 100644 --- a/tests/grayskull/test_silicon_driver.cpp +++ b/tests/grayskull/test_silicon_driver.cpp @@ -5,10 +5,10 @@ #include #include "gtest/gtest.h" -#include "cluster.h" -#include "device/tt_soc_descriptor.h" -#include "device/tt_cluster_descriptor.h" -#include "device/wormhole/wormhole_implementation.h" +#include "umd/device/cluster.h" +#include "umd/device/tt_soc_descriptor.h" +#include "umd/device/tt_cluster_descriptor.h" +#include "umd/device/wormhole_implementation.h" #include "l1_address_map.h" #include "tests/test_utils/generate_cluster_desc.hpp" #include "tests/test_utils/device_test_utils.hpp" diff --git a/tests/pcie/test_pcie_device.cpp b/tests/pcie/test_pcie_device.cpp index 942ad074..b12d835e 100644 --- a/tests/pcie/test_pcie_device.cpp +++ b/tests/pcie/test_pcie_device.cpp @@ -12,7 +12,7 @@ #include #include -#include "device/pcie/pci_device.hpp" +#include "umd/device/pci_device.hpp" TEST(PcieDeviceTest, Numa) { diff --git a/tests/simulation/device_fixture.hpp b/tests/simulation/device_fixture.hpp index 3cba1b98..115d3ac1 100644 --- a/tests/simulation/device_fixture.hpp +++ b/tests/simulation/device_fixture.hpp @@ -6,7 +6,7 @@ #include -#include "tt_simulation_device.h" +#include "umd/device/tt_simulation_device.h" #include "common/logger.hpp" #include "tests/test_utils/generate_cluster_desc.hpp" diff --git a/tests/test_utils/device_test_utils.hpp b/tests/test_utils/device_test_utils.hpp index f7a78948..136c6c5e 100644 --- a/tests/test_utils/device_test_utils.hpp +++ b/tests/test_utils/device_test_utils.hpp @@ -9,7 +9,7 @@ #include #include -#include "cluster.h" +#include "umd/device/cluster.h" namespace test_utils { diff --git a/tests/test_utils/stimulus_generators.hpp b/tests/test_utils/stimulus_generators.hpp index b831f0a2..3773d7de 100644 --- a/tests/test_utils/stimulus_generators.hpp +++ b/tests/test_utils/stimulus_generators.hpp @@ -4,9 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ #pragma once -#include "tt_xy_pair.h" -#include "tt_cluster_descriptor.h" -#include "cluster.h" +#include "umd/device/tt_xy_pair.h" +#include "umd/device/tt_cluster_descriptor.h" +#include "umd/device/cluster.h" #include diff --git a/tests/wormhole/test_silicon_driver_wh.cpp b/tests/wormhole/test_silicon_driver_wh.cpp index c425ce83..791586c9 100644 --- a/tests/wormhole/test_silicon_driver_wh.cpp +++ b/tests/wormhole/test_silicon_driver_wh.cpp @@ -6,13 +6,13 @@ #include #include "gtest/gtest.h" -#include "cluster.h" +#include "umd/device/cluster.h" #include "eth_l1_address_map.h" #include "l1_address_map.h" #include "host_mem_address_map.h" -#include "device/tt_cluster_descriptor.h" -#include "device/wormhole/wormhole_implementation.h" +#include "umd/device/tt_cluster_descriptor.h" +#include "umd/device/wormhole_implementation.h" #include "tests/test_utils/generate_cluster_desc.hpp" #include "tests/test_utils/device_test_utils.hpp" diff --git a/tests/wormhole/test_umd_remote_api_stability.cpp b/tests/wormhole/test_umd_remote_api_stability.cpp index dbc648f3..16f1d101 100644 --- a/tests/wormhole/test_umd_remote_api_stability.cpp +++ b/tests/wormhole/test_umd_remote_api_stability.cpp @@ -7,8 +7,8 @@ #include #include -#include "tt_cluster_descriptor.h" -#include "cluster.h" +#include "umd/device/tt_cluster_descriptor.h" +#include "umd/device/cluster.h" #include "common/logger.hpp" #include "eth_interface.h" @@ -16,7 +16,7 @@ #include "gtest/gtest.h" #include "host_mem_address_map.h" #include "l1_address_map.h" -#include "tt_soc_descriptor.h" +#include "umd/device/tt_soc_descriptor.h" #include "tests/test_utils/stimulus_generators.hpp" #include "tests/test_utils/generate_cluster_desc.hpp" diff --git a/tests/wormhole/test_wh_common.h b/tests/wormhole/test_wh_common.h index 98cdf8ad..e96ad803 100644 --- a/tests/wormhole/test_wh_common.h +++ b/tests/wormhole/test_wh_common.h @@ -5,9 +5,9 @@ */ #pragma once -#include "tt_cluster_descriptor.h" -#include "cluster.h" -#include "tt_xy_pair.h" +#include "umd/device/tt_cluster_descriptor.h" +#include "umd/device/cluster.h" +#include "umd/device/tt_xy_pair.h" #include "eth_l1_address_map.h" #include "tests/test_utils/stimulus_generators.hpp" From 6bdc44fcbd75bf5e13d39865de35ef1cc34485a9 Mon Sep 17 00:00:00 2001 From: Andrew Fuller Date: Thu, 21 Nov 2024 20:13:00 +0000 Subject: [PATCH 2/2] I don't understand why this would change, but the path is clearly wrong on my PR --- common/utils.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/utils.hpp b/common/utils.hpp index b8cba9f5..f8e8cbef 100644 --- a/common/utils.hpp +++ b/common/utils.hpp @@ -18,10 +18,10 @@ std::string get_abs_path(std::string path) { std::filesystem::path current_file_path = std::filesystem::path(__FILE__); std::filesystem::path umd_root; if (current_file_path.is_absolute()) { - umd_root = current_file_path.parent_path().parent_path(); + umd_root = current_file_path.parent_path().parent_path().parent_path(); } else { std::filesystem::path umd_root_relative = - std::filesystem::relative(std::filesystem::path(__FILE__).parent_path().parent_path(), "../"); + std::filesystem::relative(std::filesystem::path(__FILE__).parent_path().parent_path().parent_path(), "../"); umd_root = std::filesystem::canonical(umd_root_relative); } std::filesystem::path abs_path = umd_root / path;