Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
2e12aebf
P
Paddle
项目概览
Crayon鑫
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
2e12aebf
编写于
9月 17, 2020
作者:
C
chenzhiyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix missed with_musl macro control
上级
dec3371c
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
15 addition
and
9 deletion
+15
-9
cmake/configure.cmake
cmake/configure.cmake
+2
-2
paddle/fluid/platform/enforce.h
paddle/fluid/platform/enforce.h
+8
-3
paddle/fluid/platform/macros.h
paddle/fluid/platform/macros.h
+5
-3
paddle/fluid/platform/port.h
paddle/fluid/platform/port.h
+0
-1
未找到文件。
cmake/configure.cmake
浏览文件 @
2e12aebf
...
@@ -54,10 +54,10 @@ endif(WIN32)
...
@@ -54,10 +54,10 @@ endif(WIN32)
if
(
WITH_MUSL
)
if
(
WITH_MUSL
)
add_definitions
(
-DPADDLE_WITH_MUSL
)
add_definitions
(
-DPADDLE_WITH_MUSL
)
message
(
STATUS,
"
WITH_MKL=OFF,
when WITH_MUSL=ON"
)
message
(
STATUS,
"
Set compile option WITH_MKL=OFF
when WITH_MUSL=ON"
)
SET
(
WITH_MKL OFF
)
SET
(
WITH_MKL OFF
)
message
(
STATUS,
"
WITH_GPU=OFF,
when WITH_MUSL=ON"
)
message
(
STATUS,
"
Set compile option WITH_GPU=OFF
when WITH_MUSL=ON"
)
SET
(
WITH_GPU OFF
)
SET
(
WITH_GPU OFF
)
endif
()
endif
()
...
...
paddle/fluid/platform/enforce.h
浏览文件 @
2e12aebf
...
@@ -47,6 +47,10 @@ limitations under the License. */
...
@@ -47,6 +47,10 @@ limitations under the License. */
#include <type_traits>
#include <type_traits>
#include <utility>
#include <utility>
#ifndef PADDLE_WITH_MUSL
#include <execinfo.h>
#endif
#define GLOG_NO_ABBREVIATED_SEVERITIES // msvc conflict logging with windows.h
#define GLOG_NO_ABBREVIATED_SEVERITIES // msvc conflict logging with windows.h
#include "glog/logging.h"
#include "glog/logging.h"
#include "paddle/fluid/platform/errors.h"
#include "paddle/fluid/platform/errors.h"
...
@@ -230,13 +234,14 @@ inline std::string SimplifyDemangleStr(std::string str) {
...
@@ -230,13 +234,14 @@ inline std::string SimplifyDemangleStr(std::string str) {
}
}
inline
std
::
string
GetCurrentTraceBackString
()
{
inline
std
::
string
GetCurrentTraceBackString
()
{
//static constexpr int TRACE_STACK_LIMIT = 100;
std
::
ostringstream
sout
;
std
::
ostringstream
sout
;
sout
<<
"
\n\n
--------------------------------------
\n
"
;
sout
<<
"
\n\n
--------------------------------------
\n
"
;
sout
<<
"C++ Traceback (most recent call last):"
;
sout
<<
"C++ Traceback (most recent call last):"
;
sout
<<
"
\n
--------------------------------------
\n
"
;
sout
<<
"
\n
--------------------------------------
\n
"
;
#if !defined(_WIN32) && 0
#if !defined(_WIN32) && !defined(PADDLE_WITH_MUSL)
static
constexpr
int
TRACE_STACK_LIMIT
=
100
;
void
*
call_stack
[
TRACE_STACK_LIMIT
];
void
*
call_stack
[
TRACE_STACK_LIMIT
];
auto
size
=
backtrace
(
call_stack
,
TRACE_STACK_LIMIT
);
auto
size
=
backtrace
(
call_stack
,
TRACE_STACK_LIMIT
);
auto
symbols
=
backtrace_symbols
(
call_stack
,
size
);
auto
symbols
=
backtrace_symbols
(
call_stack
,
size
);
...
@@ -255,7 +260,7 @@ inline std::string GetCurrentTraceBackString() {
...
@@ -255,7 +260,7 @@ inline std::string GetCurrentTraceBackString() {
}
}
free
(
symbols
);
free
(
symbols
);
#else
#else
sout
<<
"
Windows n
ot support stack backtrace yet.
\n
"
;
sout
<<
"
N
ot support stack backtrace yet.
\n
"
;
#endif
#endif
return
sout
.
str
();
return
sout
.
str
();
}
}
...
...
paddle/fluid/platform/macros.h
浏览文件 @
2e12aebf
...
@@ -25,6 +25,8 @@ limitations under the License. */
...
@@ -25,6 +25,8 @@ limitations under the License. */
classname& operator=(classname&&) = delete
classname& operator=(classname&&) = delete
#endif
#endif
//#if defined(__FLT_MAX__)
#ifndef PADDLE_WITH_MUSL
//#define FLT_MAX __FLT_MAX__
#if defined(__FLT_MAX__)
//#endif // __FLT_MAX__
#define FLT_MAX __FLT_MAX__
#endif // __FLT_MAX__
#endif
paddle/fluid/platform/port.h
浏览文件 @
2e12aebf
...
@@ -26,7 +26,6 @@
...
@@ -26,7 +26,6 @@
#if !defined(_WIN32)
#if !defined(_WIN32)
#include <dlfcn.h> // dladdr
#include <dlfcn.h> // dladdr
//#include <execinfo.h> // backtrace
#include <sys/stat.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/time.h>
#include <algorithm> // std::accumulate
#include <algorithm> // std::accumulate
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录