Skip to content

Commit ab0558b

Browse files
authored
Fix build gating on optimized_portable_kernels (#9838)
If we don't need optimized kernels, we don't need optimized portable kernels.
1 parent bd98b5e commit ab0558b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

kernels/portable/CMakeLists.txt

+1-3
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,7 @@ gen_operators_lib(
6666
# Portable kernels support optional parallelization (and, in the
6767
# future, perhaps other performance features). If support is present,
6868
# produce an optimized version.
69-
set(BUILD_OPTIMIZED_PORTABLE_KERNELS EXECUTORCH_BUILD_PTHREADPOOL)
70-
71-
if(BUILD_OPTIMIZED_PORTABLE_KERNELS)
69+
if(EXECUTORCH_BUILD_PTHREADPOOL AND EXECUTORCH_BUILD_KERNELS_OPTIMIZED)
7270
add_library(optimized_portable_kernels ${_portable_kernels__srcs})
7371
target_link_libraries(optimized_portable_kernels PRIVATE executorch)
7472
target_link_libraries(optimized_portable_kernels PUBLIC extension_threadpool)

0 commit comments

Comments
 (0)