diff --git a/caffe2/CMakeLists.txt b/caffe2/CMakeLists.txt index 3738af188ca..2bc16268874 100644 --- a/caffe2/CMakeLists.txt +++ b/caffe2/CMakeLists.txt @@ -773,7 +773,6 @@ torch_compile_options(torch_cpu) # see cmake/public/utils.cmake # Ignore Wdeprecated-XXX errors from third-party libraries 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") endif() @@ -1018,7 +1017,6 @@ endif() if(USE_XPU) add_library(torch_xpu ${Caffe2_XPU_SRCS}) 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) # ATen XPU implementation diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake index b4f959632de..7ac05b7547b 100644 --- a/cmake/Dependencies.cmake +++ b/cmake/Dependencies.cmake @@ -1300,10 +1300,6 @@ if(CAFFE2_CMAKE_BUILDING_WITH_MAIN_REPO AND NOT INTERN_DISABLE_ONNX) caffe2_interface_library(onnx onnx_library) endif() 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() add_library(onnx SHARED IMPORTED) find_library(ONNX_LIBRARY onnx) diff --git a/torch/CMakeLists.txt b/torch/CMakeLists.txt index 182147463aa..8e9c627089c 100644 --- a/torch/CMakeLists.txt +++ b/torch/CMakeLists.txt @@ -282,11 +282,6 @@ if(USE_NCCL AND NOT WIN32) list(APPEND TORCH_PYTHON_COMPILE_DEFINITIONS USE_NCCL) 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) # cudaProfilerInitialize must go away set_source_files_properties(${TORCH_SRC_DIR}/csrc/cuda/shared/cudart.cpp PROPERTIES COMPILE_FLAGS "-Wno-deprecated-declarations")