Skip to content

Commit e23ddf6

Browse files
authored
status (#12764)
1 parent d04ef27 commit e23ddf6

File tree

12 files changed

+64
-21
lines changed

12 files changed

+64
-21
lines changed

cmake/flags.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ set(COMMON_FLAGS
102102
-fno-omit-frame-pointer
103103
-Wall
104104
-Wextra
105-
-Werror
106105
-Wnon-virtual-dtor
107106
-Wdelete-non-virtual-dtor
108107
-Wno-unused-parameter
@@ -115,6 +114,11 @@ set(COMMON_FLAGS
115114
-Wno-error=terminate # Warning in PADDLE_ENFORCE
116115
)
117116

117+
# https://github.com/PaddlePaddle/Paddle/issues/12773
118+
if (NOT WIN32)
119+
list(APPEND COMMON_FLAGS -Werror)
120+
endif()
121+
118122
set(GPU_COMMON_FLAGS
119123
-fPIC
120124
-fno-omit-frame-pointer

paddle/fluid/operators/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ function(op_library TARGET)
99
# op_library is a function to create op library. The interface is same as
1010
# cc_library. But it handle split GPU/CPU code and link some common library
1111
# for ops.
12-
set(OP_LIBRARY ${TARGET} ${OP_LIBRARY} PARENT_SCOPE)
1312
set(cc_srcs)
1413
set(cu_srcs)
1514
set(hip_cu_srcs)
@@ -92,6 +91,7 @@ function(op_library TARGET)
9291
endif()
9392
endforeach()
9493
endif(WIN32)
94+
set(OP_LIBRARY ${TARGET} ${OP_LIBRARY} PARENT_SCOPE)
9595

9696
list(LENGTH op_library_DEPS op_library_DEPS_len)
9797
if (${op_library_DEPS_len} GREATER 0)

paddle/fluid/platform/dynload/cublas.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
#include <cublasXt.h>
1818
#include <cublas_v2.h>
1919
#include <cuda.h>
20-
#include <dlfcn.h>
2120
#include <mutex> // NOLINT
2221
#include <type_traits>
2322
#include "paddle/fluid/platform/dynload/dynamic_loader.h"
23+
#include "paddle/fluid/platform/port.h"
2424

2525
namespace paddle {
2626
namespace platform {

paddle/fluid/platform/dynload/cudnn.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ limitations under the License. */
1515
#pragma once
1616

1717
#include <cudnn.h>
18-
#include <dlfcn.h>
1918
#include <mutex> // NOLINT
2019
#include "paddle/fluid/platform/dynload/dynamic_loader.h"
20+
#include "paddle/fluid/platform/port.h"
2121

2222
namespace paddle {
2323
namespace platform {

paddle/fluid/platform/dynload/cupti.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ limitations under the License. */
1717

1818
#include <cuda.h>
1919
#include <cupti.h>
20-
#include <dlfcn.h>
2120
#include <mutex> // NOLINT
2221

2322
#include "paddle/fluid/platform/dynload/dynamic_loader.h"
23+
#include "paddle/fluid/platform/port.h"
2424

2525
namespace paddle {
2626
namespace platform {

paddle/fluid/platform/dynload/curand.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ limitations under the License. */
1414
#pragma once
1515

1616
#include <curand.h>
17-
#include <dlfcn.h>
1817

1918
#include <mutex> // NOLINT
19+
#include "paddle/fluid/platform/port.h"
2020

2121
#include "paddle/fluid/platform/dynload/dynamic_loader.h"
2222

paddle/fluid/platform/dynload/mklml.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ limitations under the License. */
1414

1515
#pragma once
1616

17-
#include <dlfcn.h>
1817
#include <mkl.h>
1918
#include <mutex> // NOLINT
2019
#include "paddle/fluid/platform/dynload/dynamic_loader.h"
20+
#include "paddle/fluid/platform/port.h"
2121

2222
namespace paddle {
2323
namespace platform {

paddle/fluid/platform/dynload/nccl.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,11 @@ See the License for the specific language governing permissions and
1313
limitations under the License. */
1414
#pragma once
1515

16-
#include <dlfcn.h>
1716
#include <nccl.h>
1817

1918
#include <mutex> // NOLINT
20-
2119
#include "paddle/fluid/platform/dynload/dynamic_loader.h"
20+
#include "paddle/fluid/platform/port.h"
2221

2322
namespace paddle {
2423
namespace platform {

paddle/fluid/platform/dynload/warpctc.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@ limitations under the License. */
1414

1515
#pragma once
1616

17-
#include <dlfcn.h>
1817
#include <mutex> // NOLINT
19-
2018
#include "paddle/fluid/platform/dynload/dynamic_loader.h"
19+
#include "paddle/fluid/platform/port.h"
2120
#include "warpctc/include/ctc.h"
2221

2322
namespace paddle {

paddle/fluid/platform/enforce.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ limitations under the License. */
1414

1515
#pragma once
1616

17-
#include <dlfcn.h> // for dladdr
18-
#include <execinfo.h> // for backtrace
19-
2017
#ifdef __GNUC__
2118
#include <cxxabi.h> // for __cxa_demangle
2219
#endif // __GNUC__
@@ -37,6 +34,7 @@ limitations under the License. */
3734

3835
#include "glog/logging.h"
3936
#include "paddle/fluid/platform/macros.h"
37+
#include "paddle/fluid/platform/port.h"
4038
#include "paddle/fluid/string/printf.h"
4139
#include "paddle/fluid/string/to_string.h"
4240

@@ -75,7 +73,7 @@ struct EnforceNotMet : public std::exception {
7573

7674
sout << string::Sprintf("%s at [%s:%d]", exp.what(), f, l) << std::endl;
7775
sout << "PaddlePaddle Call Stacks: " << std::endl;
78-
76+
#if !defined(_WIN32)
7977
void* call_stack[TRACE_STACK_LIMIT];
8078
auto size = backtrace(call_stack, TRACE_STACK_LIMIT);
8179
auto symbols = backtrace_symbols(call_stack, size);
@@ -95,6 +93,9 @@ struct EnforceNotMet : public std::exception {
9593
}
9694
}
9795
free(symbols);
96+
#else
97+
sout << "Windows not support stack backtrace yet.";
98+
#endif
9899
err_str_ = sout.str();
99100
}
100101
}

0 commit comments

Comments
 (0)