Skip to content

Commit

Permalink
Fix MacOS CMake build
Browse files Browse the repository at this point in the history
Fix deps in extension_threadpool

Pull Request resolved: pytorch#5042
  • Loading branch information
kirklandsign authored Sep 3, 2024
1 parent e3cbeed commit 77df7b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion extension/llm/custom_ops/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ if(EXECUTORCH_BUILD_KERNELS_CUSTOM_AOT)
target_link_libraries(custom_ops_aot_lib PUBLIC executorch_no_prim_ops)
endif()

target_link_libraries(custom_ops_aot_lib PUBLIC cpublas torch)
target_link_libraries(
custom_ops_aot_lib PUBLIC cpublas torch extension_threadpool
)
if(WIN32)
# There is no direct replacement for libpthread.so on Windows. For the
# Windows build, link directly against pthreadpool and cpuinfo.
Expand Down
4 changes: 3 additions & 1 deletion extension/threadpool/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ if(NOT CMAKE_CXX_STANDARD)
endif()

add_library(extension_threadpool threadpool.cpp threadpool_guard.cpp cpuinfo_utils.cpp)
target_link_libraries(extension_threadpool PUBLIC executorch cpuinfo pthreadpool)
target_link_libraries(
extension_threadpool PUBLIC executorch_no_prim_ops cpuinfo pthreadpool
)
target_include_directories(extension_threadpool PUBLIC ${EXECUTORCH_ROOT}/..)
target_include_directories(
extension_threadpool
Expand Down

0 comments on commit 77df7b4

Please sign in to comment.