[pocket fft] turning on pocketfft flag (#81670)

Summary:
enabling AT_POCKETFFT_ENABLED@ flag and adding the appropriate dependencies to aten-cpu

moved mkl files from
`aten_cpu_source_non_codegen_list` to
`aten_native_source_non_codegen_list`

Test Plan:
After building testing binaries for both android and ios targets

### iOS
`fbcode/aibench/specifications/frameworks/pytorch/ios/build.sh`

Submitted benchmarks with the new binaries supporting pocketfft here:
https://www.internalfb.com/intern/aibench/details/245253003946591

### Android
`fbcode/aibench/specifications/frameworks/pytorch/android/arm64/build.sh`

Submitted Benchmarks with the new binaries supporting pocket fft here:
https://www.internalfb.com/intern/aibench/details/406253690682941

### Build Size Impact

Success: igios-pika on D37790257-V7

☷[pocket fft] turning on pocketfft flag☷
Diff: https://fburl.com/diff/exkploof
Unigraph Explorer: https://fburl.com/mbex/aipdzaqo

Changes for variation [arm64 + 3x assets]:
```Compressed  : -473 B (-0.00%) => 86.69 MiB
Uncompressed: +2.4 KiB (+0.00%) => 187.71 MiB
```

Reviewed By: kimishpatel

Differential Revision: D37790257

Pull Request resolved: https://github.com/pytorch/pytorch/pull/81670
Approved by: https://github.com/kit1980
This commit is contained in:
Max Ren
2022-07-21 02:45:20 +00:00
committed by PyTorch MergeBot
parent 5b88a2078b
commit 0b3a239e85
3 changed files with 17 additions and 5 deletions

View File

@ -134,6 +134,7 @@ THIRD_PARTY_LIBS = {
"kineto": ["//xplat/kineto/libkineto:libkineto", "//third_party:libkineto"],
"libkineto_headers": ["//xplat/kineto/libkineto:libkineto_headers", "//third_party:libkineto_headers"],
"omp": ["//xplat/third-party/linker_lib:omp", "//third_party:no-op"],
"pocketfft": ["//third-party/pocket_fft:pocketfft", "//third_party:pocketfft_header"],
"psimd": ["//xplat/third-party/psimd:psimd", "//third_party:psimd"],
"pthreadpool": ["//xplat/third-party/pthreadpool:pthreadpool", "//third_party:pthreadpool"],
"pthreadpool_header": ["//xplat/third-party/pthreadpool:pthreadpool_header", "//third_party:pthreadpool_header"],
@ -1022,7 +1023,7 @@ def define_buck_targets(
"0",
"--replace",
"@AT_POCKETFFT_ENABLED@",
"0",
"1",
"--replace",
"@AT_NNPACK_ENABLED@",
"ATEN_NNPACK_ENABLED_FBXPLAT",
@ -1880,6 +1881,7 @@ def define_buck_targets(
third_party("cpuinfo"),
third_party("glog"),
third_party("XNNPACK"),
third_party("pocketfft"),
],
compiler_flags = get_aten_compiler_flags(),
exported_preprocessor_flags = get_aten_preprocessor_flags(),

View File

@ -1062,10 +1062,6 @@ aten_cpu_source_non_codegen_list = [
"aten/src/ATen/native/AutogradComposite.cpp",
"aten/src/ATen/native/DispatchStub.cpp",
"aten/src/ATen/native/UpSample.cpp",
"aten/src/ATen/native/mkl/LinearAlgebra.cpp",
"aten/src/ATen/native/mkl/SparseBlasImpl.cpp",
"aten/src/ATen/native/mkl/SparseCsrLinearAlgebra.cpp",
"aten/src/ATen/native/mkl/SpectralOps.cpp",
"aten/src/ATen/native/mkldnn/BinaryOps.cpp",
"aten/src/ATen/native/mkldnn/Conv.cpp",
"aten/src/ATen/native/mkldnn/Copy.cpp",
@ -1361,6 +1357,10 @@ aten_native_source_non_codegen_list = [
"aten/src/ATen/native/WeightNorm.cpp",
"aten/src/ATen/native/group_norm.cpp",
"aten/src/ATen/native/layer_norm.cpp",
"aten/src/ATen/native/mkl/LinearAlgebra.cpp",
"aten/src/ATen/native/mkl/SparseBlasImpl.cpp",
"aten/src/ATen/native/mkl/SparseCsrLinearAlgebra.cpp",
"aten/src/ATen/native/mkl/SpectralOps.cpp",
"aten/src/ATen/native/nested/NestedTensorMath.cpp",
"aten/src/ATen/native/nested/NestedTensorTransformerFunctions.cpp",
"aten/src/ATen/native/sparse/ParamUtils.cpp",

10
third_party/BUCK.oss vendored
View File

@ -75,6 +75,16 @@ cxx_library(
visibility = ["PUBLIC"],
)
cxx_library(
name = "pocketfft_header",
header_namespace = "",
exported_headers = {
"pocketfft_hdronly.h": "pocketfft/pocketfft_hdronly.h",
},
reexport_all_header_dependencies = True,
visibility = ["PUBLIC"],
)
cxx_library(
name = "FXdiv",
header_namespace = "",