Skip to content

Commit 96850fe

Browse files
committed
updated cmake and framework build
TODO move some of these to the apple build framework
1 parent 338aff1 commit 96850fe

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,13 +246,24 @@ if(EXECUTORCH_BUILD_KERNELS_TORCHAO)
246246
set(TORCHAO_BUILD_EXECUTORCH_OPS ON)
247247
set(TORCHAO_BUILD_CPU_AARCH64 ON)
248248
set(TORCHAO_ENABLE_ARM_NEON_DOT ON)
249+
set(TORCHAO_BUILD_ATEN_OPS OFF)
249250

250251
# Set ExecuTorch headers and core library so TorchAO can register ops against them
251252
set(EXECUTORCH_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/..)
252253
set(EXECUTORCH_LIBRARIES executorch)
254+
253255
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third-party/ao/torchao/experimental)
256+
257+
# Ensure torchao_ops_executorch can find and link pthreadpool
258+
target_include_directories(torchao_ops_executorch PRIVATE ${PTHREADPOOL_SOURCE_DIR}/include)
259+
target_link_libraries(torchao_ops_executorch PRIVATE pthreadpool)
260+
261+
# Only call this on torchao_ops_executorch — pthreadpool is not a shared lib
254262
target_link_options_shared_lib(torchao_ops_executorch)
263+
264+
# Ensure pthreadpool is included in the packaged framework
255265
list(APPEND _dep_libs torchao_ops_executorch)
266+
list(APPEND _dep_libs pthreadpool)
256267
endif()
257268

258269
if(EXECUTORCH_BUILD_TESTS)

scripts/build_apple_frameworks.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ cmake_build() {
163163
-DCMAKE_BUILD_TYPE="$mode" \
164164
-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO \
165165
-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=NO \
166+
-DEXECUTORCH_BUILD_PTHREADPOOL=ON \
166167
-DCMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY="" \
167168
-DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN" \
168169
-DCMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD="c++17" \

0 commit comments

Comments
 (0)