@@ -33,14 +33,14 @@ if(NOT PYTHON_EXECUTABLE)
33
33
resolve_python_executable()
34
34
endif ()
35
35
36
- # NB: Enabling this will serialize execution of delegate instances
37
- # Keeping this OFF by default to maintain existing behavior, to be revisited.
36
+ # NB: Enabling this will serialize execution of delegate instances Keeping this
37
+ # OFF by default to maintain existing behavior, to be revisited.
38
38
option (EXECUTORCH_XNNPACK_SHARED_WORKSPACE
39
- "Enable workspace sharing across different delegate instances" ON )
40
- # Keeping this OFF by default due to regressions in decode
41
- # and model load with kleidi kernels
42
- option (EXECUTORCH_XNNPACK_ENABLE_KLEIDI
43
- "Enable Arm Kleidi kernels" OFF )
39
+ "Enable workspace sharing across different delegate instances" ON
40
+ )
41
+ # Keeping this OFF by default due to regressions in decode and model load with
42
+ # kleidi kernels
43
+ option (EXECUTORCH_XNNPACK_ENABLE_KLEIDI "Enable Arm Kleidi kernels" OFF )
44
44
if (EXECUTORCH_XNNPACK_SHARED_WORKSPACE)
45
45
add_definitions (-DENABLE_XNNPACK_SHARED_WORKSPACE)
46
46
endif ()
@@ -100,8 +100,7 @@ include(cmake/Dependencies.cmake)
100
100
list (TRANSFORM _xnnpack_backend__srcs PREPEND "${EXECUTORCH_ROOT} /" )
101
101
add_library (xnnpack_backend STATIC ${_xnnpack_backend__srcs} )
102
102
target_link_libraries (
103
- xnnpack_backend PRIVATE ${xnnpack_third_party} executorch_core
104
- xnnpack_schema
103
+ xnnpack_backend PRIVATE ${xnnpack_third_party} executorch_core xnnpack_schema
105
104
)
106
105
107
106
target_include_directories (
@@ -119,6 +118,12 @@ target_include_directories(
119
118
target_compile_options (xnnpack_backend PUBLIC ${_common_compile_options} )
120
119
target_link_options_shared_lib(xnnpack_backend)
121
120
121
+ if (EXECUTORCH_BUILD_KERNELS_OPTIMIZED)
122
+ list (APPEND xnn_executor_runner_libs optimized_native_cpu_ops_lib)
123
+ else ()
124
+ list (APPEND xnn_executor_runner_libs portable_ops_lib)
125
+ endif ()
126
+
122
127
list (APPEND xnn_executor_runner_libs xnnpack_backend executorch)
123
128
124
129
# ios can only build library but not binary
@@ -134,13 +139,14 @@ if(NOT CMAKE_TOOLCHAIN_FILE MATCHES ".*(iOS|ios\.toolchain)\.cmake$")
134
139
if (EXECUTORCH_BUILD_DEVTOOLS)
135
140
list (APPEND xnn_executor_runner_libs etdump)
136
141
else ()
137
- message (SEND_ERROR "Use of 'EXECUTORCH_ENABLE_EVENT_TRACER' requires 'EXECUTORCH_BUILD_DEVTOOLS' to be enabled." )
142
+ message (
143
+ SEND_ERROR
144
+ "Use of 'EXECUTORCH_ENABLE_EVENT_TRACER' requires 'EXECUTORCH_BUILD_DEVTOOLS' to be enabled."
145
+ )
138
146
endif ()
139
147
endif ()
140
148
141
- target_link_libraries (
142
- xnn_executor_runner gflags optimized_native_cpu_ops_lib ${xnn_executor_runner_libs}
143
- )
149
+ target_link_libraries (xnn_executor_runner gflags ${xnn_executor_runner_libs} )
144
150
target_compile_options (xnn_executor_runner PUBLIC ${_common_compile_options} )
145
151
if (EXECUTORCH_BUILD_PTHREADPOOL)
146
152
target_link_libraries (xnn_executor_runner extension_threadpool pthreadpool)
0 commit comments