mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Remove outdated CMake code (#129851)
Fixes #ISSUE_NUMBER Pull Request resolved: https://github.com/pytorch/pytorch/pull/129851 Approved by: https://github.com/ezyang
This commit is contained in:
parent
7e4329c258
commit
46366888d7
|
|
@ -773,7 +773,6 @@ torch_compile_options(torch_cpu) # see cmake/public/utils.cmake
|
||||||
|
|
||||||
# Ignore Wdeprecated-XXX errors from third-party libraries
|
# Ignore Wdeprecated-XXX errors from third-party libraries
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
set_source_files_properties(${PROJECT_SOURCE_DIR}/aten/src/ATen/native/QuantizedLinear.cpp PROPERTIES COMPILE_OPTIONS "-Wno-error=deprecated")
|
|
||||||
set_source_files_properties(${PROJECT_SOURCE_DIR}/torch/csrc/distributed/c10d/socket.cpp PROPERTIES COMPILE_OPTIONS "-Wno-error=deprecated")
|
set_source_files_properties(${PROJECT_SOURCE_DIR}/torch/csrc/distributed/c10d/socket.cpp PROPERTIES COMPILE_OPTIONS "-Wno-error=deprecated")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
@ -1018,7 +1017,6 @@ endif()
|
||||||
if(USE_XPU)
|
if(USE_XPU)
|
||||||
add_library(torch_xpu ${Caffe2_XPU_SRCS})
|
add_library(torch_xpu ${Caffe2_XPU_SRCS})
|
||||||
torch_compile_options(torch_xpu) # see cmake/public/utils.cmake
|
torch_compile_options(torch_xpu) # see cmake/public/utils.cmake
|
||||||
target_compile_options_if_supported(torch_xpu "-Wno-deprecated-copy") # see cmake/public/utils.cmake
|
|
||||||
target_compile_definitions(torch_xpu PRIVATE USE_XPU)
|
target_compile_definitions(torch_xpu PRIVATE USE_XPU)
|
||||||
|
|
||||||
# ATen XPU implementation
|
# ATen XPU implementation
|
||||||
|
|
|
||||||
|
|
@ -1300,10 +1300,6 @@ if(CAFFE2_CMAKE_BUILDING_WITH_MAIN_REPO AND NOT INTERN_DISABLE_ONNX)
|
||||||
caffe2_interface_library(onnx onnx_library)
|
caffe2_interface_library(onnx onnx_library)
|
||||||
endif()
|
endif()
|
||||||
list(APPEND Caffe2_DEPENDENCY_WHOLE_LINK_LIBS onnx_library)
|
list(APPEND Caffe2_DEPENDENCY_WHOLE_LINK_LIBS onnx_library)
|
||||||
# TODO: Delete this line once https://github.com/pytorch/pytorch/pull/55889 lands
|
|
||||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|
||||||
target_compile_options(onnx PRIVATE -Wno-deprecated-declarations)
|
|
||||||
endif()
|
|
||||||
else()
|
else()
|
||||||
add_library(onnx SHARED IMPORTED)
|
add_library(onnx SHARED IMPORTED)
|
||||||
find_library(ONNX_LIBRARY onnx)
|
find_library(ONNX_LIBRARY onnx)
|
||||||
|
|
|
||||||
|
|
@ -282,11 +282,6 @@ if(USE_NCCL AND NOT WIN32)
|
||||||
list(APPEND TORCH_PYTHON_COMPILE_DEFINITIONS USE_NCCL)
|
list(APPEND TORCH_PYTHON_COMPILE_DEFINITIONS USE_NCCL)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|
||||||
# Workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80947 in EmbeddingBag.cpp
|
|
||||||
set_source_files_properties(${TORCH_SRC_DIR}/csrc/utils/throughput_benchmark.cpp PROPERTIES COMPILE_FLAGS -Wno-attributes)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
# cudaProfilerInitialize must go away
|
# cudaProfilerInitialize must go away
|
||||||
set_source_files_properties(${TORCH_SRC_DIR}/csrc/cuda/shared/cudart.cpp PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations")
|
set_source_files_properties(${TORCH_SRC_DIR}/csrc/cuda/shared/cudart.cpp PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user