Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion configurations/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ if(EXECUTORCH_BUILD_KERNELS_OPTIMIZED)
optimized_kernels
${_optimized_native_cpu_ops_lib_portable_kernels_lib}
DEPS
executorch
executorch_core
)

install(TARGETS optimized_native_cpu_ops_lib DESTINATION lib)
Expand Down
10 changes: 2 additions & 8 deletions examples/models/llama/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,12 @@ find_package(gflags REQUIRED)
# find `executorch` libraries Same as for gflags
set(executorch_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../../lib/cmake/ExecuTorch)
find_package(executorch CONFIG REQUIRED)
if(CMAKE_TOOLCHAIN_IOS OR ANDROID)
target_link_options_shared_lib(executorch)
endif()
target_link_options_shared_lib(executorch)

# llama_runner library
add_subdirectory(runner)

set(link_libraries gflags)
set(link_libraries executorch gflags)
set(_srcs main.cpp)

if(EXECUTORCH_BUILD_KERNELS_OPTIMIZED)
Expand Down Expand Up @@ -225,9 +223,5 @@ target_include_directories(
target_link_libraries(llama_main PUBLIC llama_runner ${link_libraries})
target_compile_options(llama_main PUBLIC ${_common_compile_options})

if(APPLE)
target_link_options_shared_lib(executorch)
endif()

# Print all summary
executorch_print_configuration_summary()
2 changes: 1 addition & 1 deletion examples/models/llama/runner/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ else()
add_library(llama_runner SHARED ${_llama_runner__srcs})
endif()

set(llama_runner_deps executorch extension_data_loader extension_module
set(llama_runner_deps executorch_core extension_data_loader extension_module
extension_tensor
)

Expand Down
10 changes: 2 additions & 8 deletions examples/models/llava/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,12 @@ endif()
# find `executorch` libraries Same as for gflags
set(executorch_DIR ${CMAKE_CURRENT_BINARY_DIR}/../../../lib/cmake/ExecuTorch)
find_package(executorch CONFIG REQUIRED)
if(CMAKE_TOOLCHAIN_IOS OR ANDROID)
target_link_options_shared_lib(executorch)
endif()
target_link_options_shared_lib(executorch)

# llava_runner library
add_subdirectory(runner)

set(LINK_LIBS gflags)
set(LINK_LIBS executorch gflags)
if(NOT LLAVA_RUNNER_NO_TORCH_DUMMY_IMAGE)
list(APPEND LINK_LIBS torch)
endif()
Expand Down Expand Up @@ -212,9 +210,5 @@ target_include_directories(llava_main PUBLIC ${_common_include_directories})
target_link_libraries(llava_main PUBLIC llava_runner ${link_libraries})
target_compile_options(llava_main PUBLIC ${_common_compile_options})

if(APPLE)
target_link_options_shared_lib(executorch)
endif()

# Print all summary
executorch_print_configuration_summary()
2 changes: 1 addition & 1 deletion examples/models/llava/runner/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ add_subdirectory(

add_library(llava_runner STATIC ${_llava_runner__srcs})

set(llava_runner_deps executorch extension_data_loader extension_llm_runner
set(llava_runner_deps executorch_core extension_data_loader extension_llm_runner
extension_module extension_tensor
)

Expand Down
2 changes: 1 addition & 1 deletion extension/flat_tensor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ endif()

list(TRANSFORM _extension_flat_tensor__srcs PREPEND "${EXECUTORCH_ROOT}/")
add_library(extension_flat_tensor ${_extension_flat_tensor__srcs})
target_link_libraries(extension_flat_tensor executorch extension_data_loader)
target_link_libraries(extension_flat_tensor executorch_core)
target_include_directories(
extension_flat_tensor
PUBLIC ${EXECUTORCH_ROOT}/..
Expand Down
2 changes: 1 addition & 1 deletion kernels/optimized/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ target_compile_options(optimized_kernels PUBLIC ${_common_compile_options})
#
# optimized_ops_lib: Register optimized ops kernels into Executorch runtime
gen_operators_lib(
LIB_NAME "optimized_ops_lib" KERNEL_LIBS optimized_kernels DEPS executorch
LIB_NAME "optimized_ops_lib" KERNEL_LIBS optimized_kernels DEPS executorch_core
)

install(
Expand Down
4 changes: 2 additions & 2 deletions kernels/quantized/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,13 @@ if(NOT CMAKE_GENERATOR STREQUAL "Xcode"
endif()

add_library(quantized_kernels ${_quantized_kernels__srcs})
target_link_libraries(quantized_kernels PRIVATE executorch)
target_link_libraries(quantized_kernels PRIVATE executorch_core)
target_compile_options(quantized_kernels PUBLIC ${_common_compile_options})
# Build a library for _quantized_kernels_srcs
#
# quantized_ops_lib: Register quantized ops kernels into Executorch runtime
gen_operators_lib(
LIB_NAME "quantized_ops_lib" KERNEL_LIBS quantized_kernels DEPS executorch
LIB_NAME "quantized_ops_lib" KERNEL_LIBS quantized_kernels DEPS executorch_core
)

install(
Expand Down
Loading