From 15aa73df927e05f1b6ac7aa5ca6b4c9f1c1168f4 Mon Sep 17 00:00:00 2001 From: Galaxy1458 <55453380+Galaxy1458@users.noreply.github.com> Date: Tue, 4 Apr 2023 16:56:31 +0800 Subject: [PATCH] delete [-Wno-error=terminate], test=develop (#52490) * delete [-Wno-error=terminate], test=develop * remove GPUps[-Wterminate],test=develop --- cmake/flags.cmake | 1 - paddle/fluid/framework/fleet/heter_ps/heter_resource.cc | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cmake/flags.cmake b/cmake/flags.cmake index 5363b1758720d..516f306f72836 100644 --- a/cmake/flags.cmake +++ b/cmake/flags.cmake @@ -151,7 +151,6 @@ if(NOT WIN32) -Wno-error=literal-suffix -Wno-error=array-bounds #Warning in Eigen, gcc 12.2 -Wno-error=ignored-attributes # Warnings in Eigen, gcc 6.3 - -Wno-error=terminate # Warning in PADDLE_ENFORCE -Wno-error=int-in-bool-context # Warning in Eigen gcc 7.2 -Wimplicit-fallthrough=0 # Warning in tinyformat.h ${fsanitize}) diff --git a/paddle/fluid/framework/fleet/heter_ps/heter_resource.cc b/paddle/fluid/framework/fleet/heter_ps/heter_resource.cc index fa72b5c99d599..63e9226fcc095 100644 --- a/paddle/fluid/framework/fleet/heter_ps/heter_resource.cc +++ b/paddle/fluid/framework/fleet/heter_ps/heter_resource.cc @@ -55,13 +55,13 @@ GPUResource::GPUResource(std::vector &dev_ids, int index) { GPUResource::~GPUResource() { platform::CUDADeviceGuard guard(dev_id_); for (size_t i = 0; i < local_streams_.size(); ++i) { - PADDLE_ENFORCE_GPU_SUCCESS(cudaStreamDestroy(local_streams_[i])); + PADDLE_WARN_GPU_SUCCESS(cudaStreamDestroy(local_streams_[i])); } for (size_t i = 0; i < comm_streams_.size(); ++i) { - PADDLE_ENFORCE_GPU_SUCCESS(cudaStreamDestroy(comm_streams_[i])); + PADDLE_WARN_GPU_SUCCESS(cudaStreamDestroy(comm_streams_[i])); } for (size_t i = 0; i < remote_streams_.size(); ++i) { - PADDLE_ENFORCE_GPU_SUCCESS(cudaStreamDestroy(remote_streams_[i])); + PADDLE_WARN_GPU_SUCCESS(cudaStreamDestroy(remote_streams_[i])); } }