Add pocketfft as submodule (#62841)

Summary:
Using https://github.com/mreineck/pocketfft

Also delete explicit installation of pocketfft during the build as it will be available via submodule

Limit PocketFFT support to cmake-3.10 or newer, as `set_source_files_properties` does not seem to work as expected with cmake-3.5

Partially addresses https://github.com/pytorch/pytorch/issues/62821

Pull Request resolved: https://github.com/pytorch/pytorch/pull/62841

Reviewed By: seemethere

Differential Revision: D30140441

Pulled By: malfet

fbshipit-source-id: d1a1cf1b43375321f5ec5b3d0b538f58082f7825
This commit is contained in:
Nikita Shulga 2021-08-17 15:28:45 -07:00 committed by Facebook GitHub Bot
parent 078dcc4e97
commit 6e5d065b2b
5 changed files with 10 additions and 9 deletions

3
.gitmodules vendored
View File

@ -136,3 +136,6 @@
[submodule "third_party/kineto"]
path = third_party/kineto
url = https://github.com/pytorch/kineto
[submodule "third_party/pocketfft"]
path = third_party/pocketfft
url = https://github.com/mreineck/pocketfft

View File

@ -30,10 +30,6 @@ fi
if [ -z "${CROSS_COMPILE_ARM64}" ]; then
USE_DISTRIBUTED=1 python setup.py install
else
pushd "${HOME}"
git clone https://github.com/malfet/pocketfft --depth 1 --branch cpp
popd
export POCKETFFT_HOME="${HOME}/pocketfft"
export MACOSX_DEPLOYMENT_TARGET=11.0
USE_DISTRIBUTED=1 CMAKE_OSX_ARCHITECTURES=arm64 USE_MKLDNN=OFF USE_NNPACK=OFF USE_QNNPACK=OFF BUILD_TEST=OFF python setup.py bdist_wheel
fi

View File

@ -243,11 +243,12 @@ endif()
# --- [ PocketFFT
set(AT_POCKETFFT_ENABLED 0)
if(NOT MKL_FOUND)
find_path(POCKETFFT_INCLUDE_DIR NAMES pocketfft_hdronly.h
PATHS /usr/local/include
PATHS $ENV{POCKETFFT_HOME}
find_path(POCKETFFT_INCLUDE_DIR NAMES pocketfft_hdronly.h PATHS
/usr/local/include
"$ENV{POCKETFFT_HOME}"
"${PROJECT_SOURCE_DIR}/third_party/pocketfft"
)
if(POCKETFFT_INCLUDE_DIR)
if(POCKETFFT_INCLUDE_DIR AND CMAKE_VERSION VERSION_GREATER "3.9")
set(AT_POCKETFFT_ENABLED 1)
endif()
endif()

View File

@ -348,7 +348,7 @@ def check_submodules():
print('Please run:\n\tgit submodule update --init --recursive --jobs 0')
sys.exit(1)
for folder in folders:
check_for_files(folder, ["CMakeLists.txt", "Makefile", "setup.py", "LICENSE", "LICENSE.txt"])
check_for_files(folder, ["CMakeLists.txt", "Makefile", "setup.py", "LICENSE", "LICENSE.md", "LICENSE.txt"])
check_for_files(os.path.join(third_party_path, 'fbgemm', 'third_party',
'asmjit'), ['CMakeLists.txt'])
check_for_files(os.path.join(third_party_path, 'onnx', 'third_party',

1
third_party/pocketfft vendored Submodule

@ -0,0 +1 @@
Subproject commit ea778e37710c07723435b1be58235996d1d43a5a