From 464e04bf4e225eeda1ba836e0f62715530835aa3 Mon Sep 17 00:00:00 2001 From: Vincent Tang Date: Wed, 29 May 2024 03:54:53 +0000 Subject: [PATCH] #4252: boost 1.84.0 as submodules --- .gitmodules | 75 ++++++++++++++++++++++ CMakeLists.txt | 8 ++- cmake/umd_device.cmake | 4 +- tt_metal/third_party/boost/CMakeLists.txt | 34 ++++++++++ tt_metal/third_party/boost/align | 1 + tt_metal/third_party/boost/assert | 1 + tt_metal/third_party/boost/config | 1 + tt_metal/third_party/boost/container | 1 + tt_metal/third_party/boost/container_hash | 1 + tt_metal/third_party/boost/core | 1 + tt_metal/third_party/boost/describe | 1 + tt_metal/third_party/boost/detail | 1 + tt_metal/third_party/boost/dummy.cpp | 3 + tt_metal/third_party/boost/format | 1 + tt_metal/third_party/boost/integer | 1 + tt_metal/third_party/boost/interprocess | 1 + tt_metal/third_party/boost/intrusive | 1 + tt_metal/third_party/boost/io | 1 + tt_metal/third_party/boost/move | 1 + tt_metal/third_party/boost/mp11 | 1 + tt_metal/third_party/boost/optional | 1 + tt_metal/third_party/boost/predef | 1 + tt_metal/third_party/boost/preprocessor | 1 + tt_metal/third_party/boost/smart_ptr | 1 + tt_metal/third_party/boost/static_assert | 1 + tt_metal/third_party/boost/throw_exception | 1 + tt_metal/third_party/boost/type_traits | 1 + tt_metal/third_party/boost/unordered | 1 + tt_metal/third_party/boost/utility | 1 + tt_metal/third_party/boost/winapi | 1 + 30 files changed, 145 insertions(+), 4 deletions(-) create mode 100644 tt_metal/third_party/boost/CMakeLists.txt create mode 160000 tt_metal/third_party/boost/align create mode 160000 tt_metal/third_party/boost/assert create mode 160000 tt_metal/third_party/boost/config create mode 160000 tt_metal/third_party/boost/container create mode 160000 tt_metal/third_party/boost/container_hash create mode 160000 tt_metal/third_party/boost/core create mode 160000 tt_metal/third_party/boost/describe create mode 160000 tt_metal/third_party/boost/detail create mode 100644 tt_metal/third_party/boost/dummy.cpp create mode 160000 tt_metal/third_party/boost/format create mode 160000 tt_metal/third_party/boost/integer create mode 160000 tt_metal/third_party/boost/interprocess create mode 160000 tt_metal/third_party/boost/intrusive create mode 160000 tt_metal/third_party/boost/io create mode 160000 tt_metal/third_party/boost/move create mode 160000 tt_metal/third_party/boost/mp11 create mode 160000 tt_metal/third_party/boost/optional create mode 160000 tt_metal/third_party/boost/predef create mode 160000 tt_metal/third_party/boost/preprocessor create mode 160000 tt_metal/third_party/boost/smart_ptr create mode 160000 tt_metal/third_party/boost/static_assert create mode 160000 tt_metal/third_party/boost/throw_exception create mode 160000 tt_metal/third_party/boost/type_traits create mode 160000 tt_metal/third_party/boost/unordered create mode 160000 tt_metal/third_party/boost/utility create mode 160000 tt_metal/third_party/boost/winapi diff --git a/.gitmodules b/.gitmodules index d6505a621d0..0f274726941 100644 --- a/.gitmodules +++ b/.gitmodules @@ -28,3 +28,78 @@ [submodule "tt_metal/third_party/tt_llk_blackhole"] path = tt_metal/third_party/tt_llk_blackhole url = https://github.com/tenstorrent/tt-llk-bh.git +[submodule "tt_metal/third_party/boost/interprocess"] + path = tt_metal/third_party/boost/interprocess + url = https://github.com/boostorg/interprocess.git +[submodule "tt_metal/third_party/boost/core"] + path = tt_metal/third_party/boost/core + url = https://github.com/boostorg/core.git +[submodule "tt_metal/third_party/boost/format"] + path = tt_metal/third_party/boost/format + url = https://github.com/boostorg/format.git +[submodule "tt_metal/third_party/boost/align"] + path = tt_metal/third_party/boost/align + url = https://github.com/boostorg/align.git +[submodule "tt_metal/third_party/boost/container_hash"] + path = tt_metal/third_party/boost/container_hash + url = https://github.com/boostorg/container_hash.git +[submodule "tt_metal/third_party/boost/assert"] + path = tt_metal/third_party/boost/assert + url = https://github.com/boostorg/assert.git +[submodule "tt_metal/third_party/boost/config"] + path = tt_metal/third_party/boost/config + url = https://github.com/boostorg/config.git +[submodule "tt_metal/third_party/boost/detail"] + path = tt_metal/third_party/boost/detail + url = https://github.com/boostorg/detail.git +[submodule "tt_metal/third_party/boost/integer"] + path = tt_metal/third_party/boost/integer + url = https://github.com/boostorg/integer.git +[submodule "tt_metal/third_party/boost/intrusive"] + path = tt_metal/third_party/boost/intrusive + url = https://github.com/boostorg/intrusive.git +[submodule "tt_metal/third_party/boost/move"] + path = tt_metal/third_party/boost/move + url = https://github.com/boostorg/move.git +[submodule "tt_metal/third_party/boost/optional"] + path = tt_metal/third_party/boost/optional + url = https://github.com/boostorg/optional.git +[submodule "tt_metal/third_party/boost/smart_ptr"] + path = tt_metal/third_party/boost/smart_ptr + url = https://github.com/boostorg/smart_ptr.git +[submodule "tt_metal/third_party/boost/static_assert"] + path = tt_metal/third_party/boost/static_assert + url = https://github.com/boostorg/static_assert.git +[submodule "tt_metal/third_party/boost/throw_exception"] + path = tt_metal/third_party/boost/throw_exception + url = https://github.com/boostorg/throw_exception.git +[submodule "tt_metal/third_party/boost/type_traits"] + path = tt_metal/third_party/boost/type_traits + url = https://github.com/boostorg/type_traits.git +[submodule "tt_metal/third_party/boost/unordered"] + path = tt_metal/third_party/boost/unordered + url = https://github.com/boostorg/unordered.git +[submodule "tt_metal/third_party/boost/utility"] + path = tt_metal/third_party/boost/utility + url = https://github.com/boostorg/utility.git +[submodule "tt_metal/third_party/boost/winapi"] + path = tt_metal/third_party/boost/winapi + url = https://github.com/boostorg/winapi.git +[submodule "tt_metal/third_party/boost/predef"] + path = tt_metal/third_party/boost/predef + url = https://github.com/boostorg/predef.git +[submodule "tt_metal/third_party/boost/mp11"] + path = tt_metal/third_party/boost/mp11 + url = https://github.com/boostorg/mp11.git +[submodule "tt_metal/third_party/boost/io"] + path = tt_metal/third_party/boost/io + url = https://github.com/boostorg/io.git +[submodule "tt_metal/third_party/boost/preprocessor"] + path = tt_metal/third_party/boost/preprocessor + url = https://github.com/boostorg/preprocessor.git +[submodule "tt_metal/third_party/boost/describe"] + path = tt_metal/third_party/boost/describe + url = https://github.com/boostorg/describe.git +[submodule "tt_metal/third_party/boost/container"] + path = tt_metal/third_party/boost/container + url = https://github.com/boostorg/container.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ac4c4aaf72..41fb0b2481e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,7 +31,7 @@ CHECK_COMPILERS() ############################################################################################################################ # Find all required libraries to build ############################################################################################################################ -find_package(Boost REQUIRED COMPONENTS thread filesystem system regex) +# find_package(Boost REQUIRED COMPONENTS thread filesystem system regex) find_package(GTest REQUIRED) find_package (Python3 COMPONENTS Interpreter Development) @@ -85,8 +85,8 @@ set(CMAKE_INSTALL_DATAROOTDIR "${CMAKE_BINARY_DIR}/tmp/share") ############################################################################################################################ add_library(metal_common_libs INTERFACE) target_link_libraries(metal_common_libs INTERFACE - dl z pthread atomic stdc++ # system libraries - Boost::thread Boost::filesystem Boost::system Boost::regex hwloc # hwloc has no cmake support, find_package won't find it + dl z pthread atomic stdc++ hwloc # system libraries; hwloc has no cmake support, find_package won't find it + Boost::interprocess Boost::format Boost::core Boost::container_hash Boost::align ) # Note on flags: @@ -146,6 +146,8 @@ target_precompile_headers(pch_pybinds INTERFACE ############################################################################################################################ # Build subdirectories ############################################################################################################################ +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/tt_metal/third_party/boost) + if($ENV{ENABLE_TRACY}) include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/tracy.cmake) endif() diff --git a/cmake/umd_device.cmake b/cmake/umd_device.cmake index 7f3ca5c3bdd..cb472563e14 100644 --- a/cmake/umd_device.cmake +++ b/cmake/umd_device.cmake @@ -22,7 +22,8 @@ if($ENV{ENABLE_TRACY}) endif() # MUST have the RPATH set, or else can't find the tracy lib -set(LDFLAGS_ "-L${CMAKE_BINARY_DIR}/lib -L/usr/local/lib -Wl,-rpath,${CMAKE_BINARY_DIR}/lib -Wl,-rpath,/usr/local/lib ${CONFIG_LDFLAGS} -ldl -lz -lboost_thread -lboost_filesystem -lboost_system -lboost_regex -lpthread -latomic -lhwloc -lstdc++") +# set(LDFLAGS_ "-L${CMAKE_BINARY_DIR}/lib -L/usr/local/lib -Wl,-rpath,${CMAKE_BINARY_DIR}/lib -Wl,-rpath,/usr/local/lib ${CONFIG_LDFLAGS} -ldl -lz -lboost_thread -lboost_filesystem -lboost_system -lboost_regex -lpthread -latomic -lhwloc -lstdc++") +set(LDFLAGS_ "-L${CMAKE_BINARY_DIR}/lib -L/usr/local/lib -Wl,-rpath,${CMAKE_BINARY_DIR}/lib -Wl,-rpath,/usr/local/lib ${CONFIG_LDFLAGS} -ldl -lz -lumd_boost -lpthread -latomic -lhwloc -lstdc++") set(SHARED_LIB_FLAGS_ "-shared -fPIC") set(STATIC_LIB_FLAGS_ "-fPIC") @@ -56,6 +57,7 @@ ExternalProject_Add( LDFLAGS=${LDFLAGS_} CXXFLAGS=${CMAKE_CXX_FLAGS_} ) +add_dependencies(umd_device umd_boost) if($ENV{ENABLE_TRACY}) add_dependencies(umd_device TracyClient) endif() diff --git a/tt_metal/third_party/boost/CMakeLists.txt b/tt_metal/third_party/boost/CMakeLists.txt new file mode 100644 index 00000000000..608167b446f --- /dev/null +++ b/tt_metal/third_party/boost/CMakeLists.txt @@ -0,0 +1,34 @@ +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/align) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/assert) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/config) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/container) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/container_hash) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/core) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/describe) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/detail) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/format) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/integer) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/interprocess) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/intrusive) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/io) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/move) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/mp11) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/optional) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/predef) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/preprocessor) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/smart_ptr) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/static_assert) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/throw_exception) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/type_traits) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/unordered) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/utility) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/winapi) + +add_library(umd_boost SHARED ${CMAKE_CURRENT_SOURCE_DIR}/dummy.cpp) +target_link_libraries(umd_boost PUBLIC boost_interprocess) +set_target_properties(umd_boost PROPERTIES + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib +) +set_target_properties(boost_container PROPERTIES + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib +) diff --git a/tt_metal/third_party/boost/align b/tt_metal/third_party/boost/align new file mode 160000 index 00000000000..5ad7df63cd7 --- /dev/null +++ b/tt_metal/third_party/boost/align @@ -0,0 +1 @@ +Subproject commit 5ad7df63cd792fbdb801d600b93cad1a432f0151 diff --git a/tt_metal/third_party/boost/assert b/tt_metal/third_party/boost/assert new file mode 160000 index 00000000000..9067f0987bb --- /dev/null +++ b/tt_metal/third_party/boost/assert @@ -0,0 +1 @@ +Subproject commit 9067f0987bb952d8ff266529d03e39aa1af3ffee diff --git a/tt_metal/third_party/boost/config b/tt_metal/third_party/boost/config new file mode 160000 index 00000000000..cbeca533d21 --- /dev/null +++ b/tt_metal/third_party/boost/config @@ -0,0 +1 @@ +Subproject commit cbeca533d2113efbcffa84326111ad15a6a1f57a diff --git a/tt_metal/third_party/boost/container b/tt_metal/third_party/boost/container new file mode 160000 index 00000000000..22357b34b7a --- /dev/null +++ b/tt_metal/third_party/boost/container @@ -0,0 +1 @@ +Subproject commit 22357b34b7a5ad94a307fb0df69ff5a1f05f0c83 diff --git a/tt_metal/third_party/boost/container_hash b/tt_metal/third_party/boost/container_hash new file mode 160000 index 00000000000..48a306dcf23 --- /dev/null +++ b/tt_metal/third_party/boost/container_hash @@ -0,0 +1 @@ +Subproject commit 48a306dcf236ae460d9ba55648d449ed7bea1dee diff --git a/tt_metal/third_party/boost/core b/tt_metal/third_party/boost/core new file mode 160000 index 00000000000..7cbbb08e7be --- /dev/null +++ b/tt_metal/third_party/boost/core @@ -0,0 +1 @@ +Subproject commit 7cbbb08e7be8114d4285e15634fc6b5ae23c17f6 diff --git a/tt_metal/third_party/boost/describe b/tt_metal/third_party/boost/describe new file mode 160000 index 00000000000..c89e4dd3db8 --- /dev/null +++ b/tt_metal/third_party/boost/describe @@ -0,0 +1 @@ +Subproject commit c89e4dd3db81eb4f2867b2bc965d161f51cc316c diff --git a/tt_metal/third_party/boost/detail b/tt_metal/third_party/boost/detail new file mode 160000 index 00000000000..845567f026b --- /dev/null +++ b/tt_metal/third_party/boost/detail @@ -0,0 +1 @@ +Subproject commit 845567f026b6e7606b237c92aa8337a1457b672b diff --git a/tt_metal/third_party/boost/dummy.cpp b/tt_metal/third_party/boost/dummy.cpp new file mode 100644 index 00000000000..87b14df9cfe --- /dev/null +++ b/tt_metal/third_party/boost/dummy.cpp @@ -0,0 +1,3 @@ +// SPDX-FileCopyrightText: © 2023 Tenstorrent Inc. +// +// SPDX-License-Identifier: Apache-2.0 diff --git a/tt_metal/third_party/boost/format b/tt_metal/third_party/boost/format new file mode 160000 index 00000000000..78ef371d2d9 --- /dev/null +++ b/tt_metal/third_party/boost/format @@ -0,0 +1 @@ +Subproject commit 78ef371d2d90462671b90c3af407fae07820b193 diff --git a/tt_metal/third_party/boost/integer b/tt_metal/third_party/boost/integer new file mode 160000 index 00000000000..e7ed9918c16 --- /dev/null +++ b/tt_metal/third_party/boost/integer @@ -0,0 +1 @@ +Subproject commit e7ed9918c16f11a9b885b043f7aa7994b3e21582 diff --git a/tt_metal/third_party/boost/interprocess b/tt_metal/third_party/boost/interprocess new file mode 160000 index 00000000000..a0c5a8ff176 --- /dev/null +++ b/tt_metal/third_party/boost/interprocess @@ -0,0 +1 @@ +Subproject commit a0c5a8ff176434c9024d4540ce092a2eebb8c5c3 diff --git a/tt_metal/third_party/boost/intrusive b/tt_metal/third_party/boost/intrusive new file mode 160000 index 00000000000..1014e97fb28 --- /dev/null +++ b/tt_metal/third_party/boost/intrusive @@ -0,0 +1 @@ +Subproject commit 1014e97fb28ec0b512cb875579fd43c9189a3ec3 diff --git a/tt_metal/third_party/boost/io b/tt_metal/third_party/boost/io new file mode 160000 index 00000000000..342e4c6d10d --- /dev/null +++ b/tt_metal/third_party/boost/io @@ -0,0 +1 @@ +Subproject commit 342e4c6d10d586058818daa84201a2d301357a53 diff --git a/tt_metal/third_party/boost/move b/tt_metal/third_party/boost/move new file mode 160000 index 00000000000..f1fbb451340 --- /dev/null +++ b/tt_metal/third_party/boost/move @@ -0,0 +1 @@ +Subproject commit f1fbb45134065deebe95249c616a967d4b66c809 diff --git a/tt_metal/third_party/boost/mp11 b/tt_metal/third_party/boost/mp11 new file mode 160000 index 00000000000..391e23ae716 --- /dev/null +++ b/tt_metal/third_party/boost/mp11 @@ -0,0 +1 @@ +Subproject commit 391e23ae716aec4d59f6c7272e49e1dd8c01dcdb diff --git a/tt_metal/third_party/boost/optional b/tt_metal/third_party/boost/optional new file mode 160000 index 00000000000..c60db27762f --- /dev/null +++ b/tt_metal/third_party/boost/optional @@ -0,0 +1 @@ +Subproject commit c60db27762ff9cc16529e069c3c15f2fa898f994 diff --git a/tt_metal/third_party/boost/predef b/tt_metal/third_party/boost/predef new file mode 160000 index 00000000000..0fdfb49c3a6 --- /dev/null +++ b/tt_metal/third_party/boost/predef @@ -0,0 +1 @@ +Subproject commit 0fdfb49c3a6789e50169a44e88a07cc889001106 diff --git a/tt_metal/third_party/boost/preprocessor b/tt_metal/third_party/boost/preprocessor new file mode 160000 index 00000000000..667e87b3392 --- /dev/null +++ b/tt_metal/third_party/boost/preprocessor @@ -0,0 +1 @@ +Subproject commit 667e87b3392db338a919cbe0213979713aca52e3 diff --git a/tt_metal/third_party/boost/smart_ptr b/tt_metal/third_party/boost/smart_ptr new file mode 160000 index 00000000000..763c7f56cde --- /dev/null +++ b/tt_metal/third_party/boost/smart_ptr @@ -0,0 +1 @@ +Subproject commit 763c7f56cde9d029233cb03d574bc7e2b9e8864d diff --git a/tt_metal/third_party/boost/static_assert b/tt_metal/third_party/boost/static_assert new file mode 160000 index 00000000000..ba72d3340f3 --- /dev/null +++ b/tt_metal/third_party/boost/static_assert @@ -0,0 +1 @@ +Subproject commit ba72d3340f3dc6e773868107f35902292f84b07e diff --git a/tt_metal/third_party/boost/throw_exception b/tt_metal/third_party/boost/throw_exception new file mode 160000 index 00000000000..152b36e86fd --- /dev/null +++ b/tt_metal/third_party/boost/throw_exception @@ -0,0 +1 @@ +Subproject commit 152b36e86fd1e24fd5ced47697522d5947d69020 diff --git a/tt_metal/third_party/boost/type_traits b/tt_metal/third_party/boost/type_traits new file mode 160000 index 00000000000..89f5011b4a7 --- /dev/null +++ b/tt_metal/third_party/boost/type_traits @@ -0,0 +1 @@ +Subproject commit 89f5011b4a79d91e42735670e39f72cb25c86c72 diff --git a/tt_metal/third_party/boost/unordered b/tt_metal/third_party/boost/unordered new file mode 160000 index 00000000000..f493603f5cd --- /dev/null +++ b/tt_metal/third_party/boost/unordered @@ -0,0 +1 @@ +Subproject commit f493603f5cd2bd090be440cacfcaa95f2566059b diff --git a/tt_metal/third_party/boost/utility b/tt_metal/third_party/boost/utility new file mode 160000 index 00000000000..217f7346f63 --- /dev/null +++ b/tt_metal/third_party/boost/utility @@ -0,0 +1 @@ +Subproject commit 217f7346f63d189d2ba1093c42bf3db810a0550c diff --git a/tt_metal/third_party/boost/winapi b/tt_metal/third_party/boost/winapi new file mode 160000 index 00000000000..39396bd7825 --- /dev/null +++ b/tt_metal/third_party/boost/winapi @@ -0,0 +1 @@ +Subproject commit 39396bd78254053f3137510478e8f956bd2b83d4