mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
Remove unused build system checks and definitions (#109711)
Remove some outdated checks. Pull Request resolved: https://github.com/pytorch/pytorch/pull/109711 Approved by: https://github.com/ezyang
This commit is contained in:
@ -20,7 +20,6 @@ COMMON_COPTS = [
|
||||
"-DHAVE_SHM_OPEN=1",
|
||||
"-DHAVE_SHM_UNLINK=1",
|
||||
"-D_FILE_OFFSET_BITS=64",
|
||||
"-DTH_HAVE_THREAD",
|
||||
"-DUSE_FBGEMM",
|
||||
"-DUSE_DISTRIBUTED",
|
||||
"-DAT_PER_OPERATOR_HEADERS",
|
||||
@ -268,7 +267,6 @@ header_template_rule(
|
||||
"@AT_MKLDNN_ACL_ENABLED@": "0",
|
||||
"@AT_MKL_ENABLED@": "1",
|
||||
"@AT_MKL_SEQUENTIAL@": "0",
|
||||
"@AT_FFTW_ENABLED@": "0",
|
||||
"@AT_POCKETFFT_ENABLED@": "0",
|
||||
"@AT_NNPACK_ENABLED@": "0",
|
||||
"@CAFFE2_STATIC_LINK_CUDA_INT@": "0",
|
||||
@ -1471,7 +1469,6 @@ cu_library(
|
||||
)
|
||||
|
||||
PERF_COPTS = [
|
||||
"-DTH_HAVE_THREAD",
|
||||
"-DHAVE_AVX_CPU_DEFINITION",
|
||||
"-DHAVE_AVX2_CPU_DEFINITION",
|
||||
"-DENABLE_ALIAS=1",
|
||||
|
@ -10,7 +10,6 @@
|
||||
#define AT_MKLDNN_ACL_ENABLED() @AT_MKLDNN_ACL_ENABLED@
|
||||
#define AT_MKL_ENABLED() @AT_MKL_ENABLED@
|
||||
#define AT_MKL_SEQUENTIAL() @AT_MKL_SEQUENTIAL@
|
||||
#define AT_FFTW_ENABLED() @AT_FFTW_ENABLED@
|
||||
#define AT_POCKETFFT_ENABLED() @AT_POCKETFFT_ENABLED@
|
||||
#define AT_NNPACK_ENABLED() @AT_NNPACK_ENABLED@
|
||||
#define CAFFE2_STATIC_LINK_CUDA() @CAFFE2_STATIC_LINK_CUDA_INT@
|
||||
|
@ -1050,9 +1050,6 @@ def define_buck_targets(
|
||||
"@AT_MKL_SEQUENTIAL@",
|
||||
"ATEN_MKL_SEQUENTIAL_FBXPLAT",
|
||||
"--replace",
|
||||
"@AT_FFTW_ENABLED@",
|
||||
"0",
|
||||
"--replace",
|
||||
"@AT_POCKETFFT_ENABLED@",
|
||||
"1",
|
||||
"--replace",
|
||||
|
@ -281,21 +281,6 @@ elseif(INTERN_USE_EIGEN_BLAS)
|
||||
list(APPEND Caffe2_DEPENDENCY_LIBS eigen_blas)
|
||||
endif()
|
||||
|
||||
# ---[ FFTW
|
||||
set(AT_FFTW_ENABLED 0)
|
||||
set(USE_FFTW OFF)
|
||||
if(USE_FFTW OR NOT MKL_FOUND)
|
||||
find_library(LIBFFTW3 fftw3)
|
||||
if(LIBFFTW3)
|
||||
find_path(FFTW3_INCLUDE_DIR NAMES fftw3.h ONLY_CMAKE_FIND_ROOT_PATH)
|
||||
if(FFTW3_INCLUDE_DIR)
|
||||
SET(AT_FFTW_ENABLED 1)
|
||||
SET(USE_FFTW ON)
|
||||
include_directories(${FFTW3_INCLUDE_DIR})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# --- [ PocketFFT
|
||||
set(AT_POCKETFFT_ENABLED 0)
|
||||
if(NOT AT_MKL_ENABLED)
|
||||
@ -1814,18 +1799,6 @@ if(NOT INTERN_BUILD_MOBILE)
|
||||
add_definitions(-DUSE_EXTERNAL_MZCRC)
|
||||
add_definitions(-DMINIZ_DISABLE_ZIP_READER_CRC32_CHECKS)
|
||||
|
||||
# Is __thread supported?
|
||||
if(NOT MSVC)
|
||||
CHECK_C_SOURCE_COMPILES("static __thread int x = 1; int main() { return x; }" C_HAS_THREAD)
|
||||
else(NOT MSVC)
|
||||
CHECK_C_SOURCE_COMPILES("static __declspec( thread ) int x = 1; int main() { return x; }" C_HAS_THREAD)
|
||||
endif(NOT MSVC)
|
||||
if(NOT C_HAS_THREAD)
|
||||
message(STATUS "Warning: __thread is not supported, generating thread-unsafe code")
|
||||
else(NOT C_HAS_THREAD)
|
||||
add_compile_options(-DTH_HAVE_THREAD)
|
||||
endif(NOT C_HAS_THREAD)
|
||||
|
||||
find_package(ZVECTOR) # s390x simd support
|
||||
endif()
|
||||
|
||||
|
@ -141,7 +141,6 @@ function(caffe2_print_configuration_summary)
|
||||
message(STATUS " USE_PYTORCH_METAL : ${USE_PYTORCH_METAL}")
|
||||
message(STATUS " USE_PYTORCH_METAL_EXPORT : ${USE_PYTORCH_METAL_EXPORT}")
|
||||
message(STATUS " USE_MPS : ${USE_MPS}")
|
||||
message(STATUS " USE_FFTW : ${USE_FFTW}")
|
||||
message(STATUS " USE_MKL : ${CAFFE2_USE_MKL}")
|
||||
message(STATUS " USE_MKLDNN : ${USE_MKLDNN}")
|
||||
if(${USE_MKLDNN})
|
||||
|
Reference in New Issue
Block a user