File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -614,6 +614,8 @@ if(BUILD_EXECUTORCH_PORTABLE_OPS)
614
614
endif ()
615
615
616
616
if (EXECUTORCH_BUILD_KERNELS_OPTIMIZED)
617
+ # find pytorch lib here to make it available to all sub-directories
618
+ find_package_torch_headers()
617
619
add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /kernels/optimized)
618
620
endif ()
619
621
Original file line number Diff line number Diff line change @@ -61,7 +61,6 @@ message("Generated files ${gen_command_sources}")
61
61
62
62
list (TRANSFORM _optimized_kernels__srcs PREPEND "${EXECUTORCH_ROOT} /" )
63
63
add_library (optimized_kernels ${_optimized_kernels__srcs} )
64
- find_package_torch_headers()
65
64
target_include_directories (optimized_kernels PRIVATE ${TORCH_INCLUDE_DIRS} "${EXECUTORCH_ROOT} /third-party/pocketfft" )
66
65
target_link_libraries (
67
66
optimized_kernels PRIVATE executorch_core cpublas extension_threadpool
You can’t perform that action at this time.
0 commit comments