From dc9b5b2298793a15ef6f3c89b1eb871cdc767c22 Mon Sep 17 00:00:00 2001 From: Hansong Zhang Date: Tue, 3 Sep 2024 13:29:58 -0700 Subject: [PATCH 1/2] Fix MacOS build --- extension/llm/custom_ops/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extension/llm/custom_ops/CMakeLists.txt b/extension/llm/custom_ops/CMakeLists.txt index 1d9cf1e1f24..41c8c0ee160 100644 --- a/extension/llm/custom_ops/CMakeLists.txt +++ b/extension/llm/custom_ops/CMakeLists.txt @@ -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. From cd019b5a425b8c1a80bde1edf53a60eda19a39a1 Mon Sep 17 00:00:00 2001 From: Hansong Zhang Date: Tue, 3 Sep 2024 15:56:15 -0700 Subject: [PATCH 2/2] Use executorch_no_prim_ops --- extension/threadpool/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extension/threadpool/CMakeLists.txt b/extension/threadpool/CMakeLists.txt index 674d3136e1a..a82afc045a3 100644 --- a/extension/threadpool/CMakeLists.txt +++ b/extension/threadpool/CMakeLists.txt @@ -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