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)
614614endif ()
615615
616616if (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)
618620endif ()
619621
Original file line number Diff line number Diff line change @@ -61,7 +61,6 @@ message("Generated files ${gen_command_sources}")
6161
6262list (TRANSFORM _optimized_kernels__srcs PREPEND "${EXECUTORCH_ROOT} /" )
6363add_library (optimized_kernels ${_optimized_kernels__srcs} )
64- find_package_torch_headers()
6564target_include_directories (optimized_kernels PRIVATE ${TORCH_INCLUDE_DIRS} "${EXECUTORCH_ROOT} /third-party/pocketfft" )
6665target_link_libraries (
6766 optimized_kernels PRIVATE executorch_core cpublas extension_threadpool
You can’t perform that action at this time.
0 commit comments