set_source_files_properties(${TORCH_SRC_DIR}/csrc/jit/tensorexpr/llvm_codegen.cpp PROPERTIES COMPILE_FLAGS -Wno-init-list-lifetime)
endif()
- # Pass path to PocketFFT
- if(AT_POCKETFFT_ENABLED)
- set_source_files_properties(${CMAKE_CURRENT_LIST_DIR}/../aten/src/ATen/native/mkl/SpectralOps.cpp PROPERTIES INCLUDE_DIRECTORIES "${POCKETFFT_INCLUDE_DIR}")
- endif()
-
if(NOT INTERN_DISABLE_MOBILE_INTERP)
set(MOBILE_SRCS
${TORCH_SRC_DIR}/csrc/jit/mobile/function.cpp
PROPERTIES SKIP_PRECOMPILE_HEADERS ON)
endif()
+# Pass path to PocketFFT
+if(AT_POCKETFFT_ENABLED)
+ if(CMAKE_VERSION VERSION_LESS "3.11")
+ target_include_directories(torch_cpu PRIVATE "${POCKETFFT_INCLUDE_DIR}")
+ else()
+ set_source_files_properties(
+ "${PROJECT_SOURCE_DIR}/aten/src/ATen/native/mkl/SpectralOps.cpp"
+ PROPERTIES INCLUDE_DIRECTORIES "${POCKETFFT_INCLUDE_DIR}")
+ endif()
+endif()
+
if(CMAKE_COMPILER_IS_GNUCXX AND BUILD_LIBTORCH_CPU_WITH_DEBUG)
# To enable debug fission we need to build libtorch_cpu with debug info on,
# but this increases link time and peak memory usage if we use the
# --- [ PocketFFT
set(AT_POCKETFFT_ENABLED 0)
-if(NOT MKL_FOUND)
+if(NOT AT_MKL_ENABLED)
find_path(POCKETFFT_INCLUDE_DIR NAMES pocketfft_hdronly.h PATHS
/usr/local/include
- "$ENV{POCKETFFT_HOME}"
+ ENV POCKETFFT_HOME
"${PROJECT_SOURCE_DIR}/third_party/pocketfft"
)
- if(POCKETFFT_INCLUDE_DIR AND CMAKE_VERSION VERSION_GREATER "3.9")
+ if(POCKETFFT_INCLUDE_DIR)
set(AT_POCKETFFT_ENABLED 1)
+ message(STATUS "Using pocketfft in directory: ${POCKETFFT_INCLUDE_DIR}")
endif()
endif()