Skip to content

Commit 49ca418

Browse files
committed
Fix build gating on optimized_portable_kernels
If we don't need optimized kernels, we don't need optimized portable kernels. ghstack-source-id: 84cef23 ghstack-comment-id: 2755985472 Pull-Request-resolved: pytorch/executorch#9665 ghstack-source-id: 84cef23 ghstack-comment-id: 2771179663 Pull Request resolved: pytorch/executorch#9825
1 parent 37465d2 commit 49ca418

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

kernels/portable/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
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)