Skip to content

Commit 070f57d

Browse files
committed
up
1 parent 22da391 commit 070f57d

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ endif()
839839
if(EXECUTORCH_BUILD_TORCHAO)
840840
add_compile_options("-frtti")
841841
set(EXECUTORCH_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/..)
842-
set(EXECUTORCH_LIBRARIES executorch extension_threadpool cpuinfo pthreadpool)
842+
set(EXECUTORCH_LIBRARIES executorch extension_threadpool) # cpuinfo pthreadpool)
843843
set(TORCHAO_BUILD_EXECUTORCH_OPS ON)
844844
add_subdirectory(third-party/ao/torchao/experimental)
845845
endif()

examples/models/llama/CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,12 @@ if(EXECUTORCH_BUILD_KERNELS_CUSTOM)
122122
endif()
123123

124124
if(EXECUTORCH_BUILD_TORCHAO)
125-
list(APPEND link_libraries "$<LINK_LIBRARY:WHOLE_ARCHIVE,${CMAKE_CURRENT_BINARY_DIR}/../../../lib/libtorchao_ops_executorch.a>")
126-
list(APPEND link_libraries "${CMAKE_CURRENT_BINARY_DIR}/../../../lib/libtorchao_kernels_aarch64.a")
125+
set(torchao_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../../lib/cmake/torchao)
126+
find_package(torchao REQUIRED)
127+
target_link_options_shared_lib(torchao::torchao_ops_executorch)
128+
list(APPEND link_libraries torchao::torchao_ops_executorch)
129+
# list(APPEND link_libraries "$<LINK_LIBRARY:WHOLE_ARCHIVE,${CMAKE_CURRENT_BINARY_DIR}/../../../lib/libtorchao_ops_executorch.a>")
130+
# list(APPEND link_libraries "${CMAKE_CURRENT_BINARY_DIR}/../../../lib/libtorchao_kernels_aarch64.a")
127131
endif()
128132

129133
set(XNNPACK_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../../backends/xnnpack)

0 commit comments

Comments
 (0)