File tree 5 files changed +21
-27
lines changed
5 files changed +21
-27
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,21 @@ deps = [
58
58
" executorch_core" ,
59
59
]
60
60
61
+ # HACK: prevent reduce_util from also showing up in custom_ops. The
62
+ # actual medium-term fix is to stop using Buck to drive our CMake
63
+ # builds.
64
+ [targets .reduce_util ]
65
+ buck_targets = [
66
+ " //kernels/portable/cpu/util:reduce_util" ,
67
+ ]
68
+ filters = [
69
+ " .cpp$" ,
70
+ ]
71
+ deps = [
72
+ " executorch" ,
73
+ " executorch_core" ,
74
+ ]
75
+
61
76
[targets .optimized_kernels ]
62
77
buck_targets = [
63
78
" //kernels/optimized:generated_lib" ,
@@ -414,6 +429,7 @@ deps = [
414
429
" optimized_kernels" ,
415
430
" extension_parallel" ,
416
431
" extension_threadpool" ,
432
+ " reduce_util" ,
417
433
" xnnpack_backend" ,
418
434
]
419
435
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ set(lib_list
65
65
neuron_backend
66
66
qnn_executorch_backend
67
67
portable_ops_lib
68
+ custom_ops
68
69
extension_module
69
70
extension_module_static
70
71
extension_parallel
Original file line number Diff line number Diff line change 15
15
# ~~~
16
16
# It should also be cmake-lint clean.
17
17
#
18
- cmake_minimum_required (VERSION 3.19)
18
+ cmake_minimum_required (VERSION 3.24) # 3.24 is required for WHOLE_ARCHIVE
19
19
project (llama_runner)
20
20
21
21
# Duplicating options as root CMakeLists.txt
@@ -84,14 +84,6 @@ if(CMAKE_TOOLCHAIN_IOS OR ANDROID)
84
84
target_link_options_shared_lib(executorch)
85
85
endif ()
86
86
87
- # custom ops library
88
- if (EXECUTORCH_BUILD_KERNELS_CUSTOM)
89
- add_subdirectory (
90
- ${CMAKE_CURRENT_SOURCE_DIR} /../../../extension/llm/custom_ops
91
- ${CMAKE_CURRENT_BINARY_DIR} /../../../extension/llm/custom_ops
92
- )
93
- endif ()
94
-
95
87
# llama_runner library
96
88
add_subdirectory (runner)
97
89
@@ -119,8 +111,7 @@ target_link_options_shared_lib(quantized_ops_lib)
119
111
list (APPEND link_libraries quantized_kernels quantized_ops_lib)
120
112
121
113
if (EXECUTORCH_BUILD_KERNELS_CUSTOM)
122
- target_link_options_shared_lib(custom_ops)
123
- list (APPEND link_libraries custom_ops)
114
+ list (APPEND link_libraries $<LINK_LIBRARY:WHOLE_ARCHIVE,custom_ops>)
124
115
endif ()
125
116
126
117
if (EXECUTORCH_BUILD_TORCHAO)
Original file line number Diff line number Diff line change @@ -93,14 +93,6 @@ if(CMAKE_TOOLCHAIN_IOS OR ANDROID)
93
93
target_link_options_shared_lib(executorch)
94
94
endif ()
95
95
96
- # custom ops library
97
- if (EXECUTORCH_BUILD_KERNELS_CUSTOM)
98
- add_subdirectory (
99
- ${EXECUTORCH_ROOT} /extension/llm/custom_ops
100
- ${CMAKE_CURRENT_BINARY_DIR} /../../../extension/llm/custom_ops
101
- )
102
- endif ()
103
-
104
96
# llava_runner library
105
97
add_subdirectory (runner)
106
98
@@ -132,7 +124,6 @@ target_link_options_shared_lib(quantized_ops_lib)
132
124
list (APPEND link_libraries quantized_kernels quantized_ops_lib)
133
125
134
126
if (EXECUTORCH_BUILD_KERNELS_CUSTOM)
135
- target_link_options_shared_lib(custom_ops)
136
127
list (APPEND link_libraries custom_ops)
137
128
endif ()
138
129
Original file line number Diff line number Diff line change 4
4
# This source code is licensed under the BSD-style license found in the
5
5
# LICENSE file in the root directory of this source tree.
6
6
7
- cmake_minimum_required (VERSION 3.19)
7
+ cmake_minimum_required (VERSION 3.24) # 3.24 is required for WHOLE_ARCHIVE
8
8
9
9
project (executorch_jni)
10
10
@@ -115,12 +115,7 @@ if(TARGET vulkan_backend)
115
115
endif ()
116
116
117
117
if (EXECUTORCH_BUILD_KERNELS_CUSTOM)
118
- add_subdirectory (
119
- ${EXECUTORCH_ROOT} /extension/llm/custom_ops
120
- ${CMAKE_CURRENT_BINARY_DIR} /../../extension/llm/custom_ops
121
- )
122
- list (APPEND link_libraries custom_ops)
123
- target_link_options_shared_lib(custom_ops)
118
+ list (APPEND link_libraries $<LINK_LIBRARY:WHOLE_ARCHIVE,custom_ops>)
124
119
endif ()
125
120
126
121
if (TARGET pthreadpool)
You can’t perform that action at this time.
0 commit comments