Skip to content

Commit 2c10b96

Browse files
committed
extra tweak from @huydhn
1 parent 57f2265 commit 2c10b96

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,8 @@ if(BUILD_EXECUTORCH_PORTABLE_OPS)
614614
endif()
615615

616616
if(EXECUTORCH_BUILD_KERNELS_OPTIMIZED)
617+
# find pytorch lib here to make it available to all sub-directories
618+
find_package_torch_headers()
617619
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/kernels/optimized)
618620
endif()
619621

kernels/optimized/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ message("Generated files ${gen_command_sources}")
6161

6262
list(TRANSFORM _optimized_kernels__srcs PREPEND "${EXECUTORCH_ROOT}/")
6363
add_library(optimized_kernels ${_optimized_kernels__srcs})
64-
find_package_torch_headers()
6564
target_include_directories(optimized_kernels PRIVATE ${TORCH_INCLUDE_DIRS} "${EXECUTORCH_ROOT}/third-party/pocketfft")
6665
target_link_libraries(
6766
optimized_kernels PRIVATE executorch_core cpublas extension_threadpool

0 commit comments

Comments
 (0)