Skip to content

Commit

Permalink
#0: fix cmake linking numa
Browse files Browse the repository at this point in the history
  • Loading branch information
vtangTT authored and tt-asaigal committed May 21, 2024
1 parent 3dc0ff7 commit 248b259
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ project(tt-metal
find_package(Boost REQUIRED COMPONENTS thread filesystem system regex)
find_package(GTest REQUIRED)
find_package (Python3 COMPONENTS Interpreter Development)
find_library(NUMA_LIBRARY NAMES numa)
if (NOT NUMA_LIBRARY)
message(FATAL_ERROR "NUMA library not found")
endif()

############################################
# Setting build type flags
Expand Down Expand Up @@ -64,7 +68,7 @@ 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
dl z pthread atomic stdc++ numa # system libraries
Boost::thread Boost::filesystem Boost::system Boost::regex hwloc # hwloc has no cmake support, find_package won't find it
)

Expand Down
2 changes: 1 addition & 1 deletion tt_metal/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set(TT_METAL_OBJECTS

add_library(tt_metal ${TT_METAL_OBJECTS})
if(BUILD_SHARED_LIBS)
target_link_libraries(tt_metal PUBLIC device)
target_link_libraries(tt_metal PUBLIC device metal_common_libs)
add_dependencies(tt_metal umd_device)
else()
target_link_libraries(tt_metal PUBLIC ${UMD_STATIC_LIB} metal_common_libs)
Expand Down

0 comments on commit 248b259

Please sign in to comment.