Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
PaddleDetection
提交
2ec589a2
P
PaddleDetection
项目概览
s920243400
/
PaddleDetection
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleDetection
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleDetection
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
2ec589a2
编写于
8月 26, 2018
作者:
D
dzhwinter
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
float.h fixed
上级
7dceb8a0
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
23 addition
and
12 deletion
+23
-12
paddle/fluid/operators/math/CMakeLists.txt
paddle/fluid/operators/math/CMakeLists.txt
+8
-1
paddle/fluid/platform/macros.h
paddle/fluid/platform/macros.h
+1
-3
paddle/fluid/platform/port.h
paddle/fluid/platform/port.h
+14
-8
未找到文件。
paddle/fluid/operators/math/CMakeLists.txt
浏览文件 @
2ec589a2
...
@@ -40,9 +40,16 @@ math_library(context_project DEPS im2col math_function)
...
@@ -40,9 +40,16 @@ math_library(context_project DEPS im2col math_function)
math_library
(
cross_entropy
)
math_library
(
cross_entropy
)
math_library
(
cos_sim_functor
)
math_library
(
cos_sim_functor
)
math_library
(
depthwise_conv
)
math_library
(
depthwise_conv
)
math_library
(
gru_compute DEPS activation_functions math_function
)
math_library
(
im2col
)
math_library
(
im2col
)
if
(
NOT WIN32
)
math_library
(
gru_compute DEPS activation_functions math_function
)
math_library
(
lstm_compute DEPS activation_functions
)
math_library
(
lstm_compute DEPS activation_functions
)
else
()
# windows do not support avx functions yet.
math_library
(
gru_compute DEPS math_function
)
math_library
(
lstm_compute DEPS math_function
)
endif
(
NOT WIN32
)
cc_library
(
blas SRCS blas.cc DEPS cblas framework_proto device_context
)
cc_library
(
blas SRCS blas.cc DEPS cblas framework_proto device_context
)
math_library
(
math_function DEPS blas
)
math_library
(
math_function DEPS blas
)
math_library
(
maxouting
)
math_library
(
maxouting
)
...
...
paddle/fluid/platform/macros.h
浏览文件 @
2ec589a2
...
@@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
...
@@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License. */
limitations under the License. */
#pragma once
#pragma once
#include <
limits
>
#include <
cfloat
>
// Disable the copy and assignment operator for a class.
// Disable the copy and assignment operator for a class.
#ifndef DISABLE_COPY_AND_ASSIGN
#ifndef DISABLE_COPY_AND_ASSIGN
...
@@ -27,6 +27,4 @@ limitations under the License. */
...
@@ -27,6 +27,4 @@ limitations under the License. */
#if defined(__FLT_MAX__)
#if defined(__FLT_MAX__)
#define FLT_MAX __FLT_MAX__
#define FLT_MAX __FLT_MAX__
#else
#define FLT_MAX std::numeric_limits<float>::max()
#endif // __FLT_MAX__
#endif // __FLT_MAX__
paddle/fluid/platform/port.h
浏览文件 @
2ec589a2
...
@@ -19,23 +19,23 @@
...
@@ -19,23 +19,23 @@
#include <string>
#include <string>
#define GLOG_NO_ABBREVIATED_SEVERITIES // msvc conflict logging with windows.h
#include "glog/logging.h"
#if !defined(_WIN32)
#if !defined(_WIN32)
#define UNUSED __attribute__((unused))
#define UNUSED __attribute__((unused))
#include <dlfcn.h> // for dladdr
#include <dlfcn.h> // for dladdr
#include <execinfo.h> // for backtrace
#include <execinfo.h> // for backtrace
#include <sys/stat.h>
#include <sys/stat.h>
#else
#else
#include <io.h> // _popen, _pclose
#include <io.h> // _popen, _pclose
#include <windows.h>
#include <windows.h>
// windows version of __attribute__((unused))
// windows version of __attribute__((unused))
#define UNUSED __pragma(warning(suppress : 4100))
#define UNUSED __pragma(warning(suppress : 4100))
#ifndef S_ISDIR // windows port for sys/stat.h
#ifndef S_ISDIR // windows port for sys/stat.h
#define S_ISDIR(mode) (((mode)&S_IFMT) == S_IFDIR)
#define S_ISDIR(mode) (((mode)&S_IFMT) == S_IFDIR)
#endif
#endif
// S_ISDIR
static
void
*
dlsym
(
void
*
handle
,
const
char
*
symbol_name
)
{
static
void
*
dlsym
(
void
*
handle
,
const
char
*
symbol_name
)
{
FARPROC
found_symbol
;
FARPROC
found_symbol
;
...
@@ -49,8 +49,8 @@ static void *dlsym(void *handle, const char *symbol_name) {
...
@@ -49,8 +49,8 @@ static void *dlsym(void *handle, const char *symbol_name) {
static
void
*
dlopen
(
const
char
*
filename
,
int
flag
)
{
static
void
*
dlopen
(
const
char
*
filename
,
int
flag
)
{
std
::
string
file_name
(
filename
);
std
::
string
file_name
(
filename
);
std
::
replace
(
file_name
.
begin
(),
file_name
.
end
()
,
'/'
,
'\\'
);
file_name
.
replace
(
0
,
file_name
.
size
()
-
1
,
'/'
,
'\\'
);
HMODULE
hModule
=
LoadLibrary
(
file_name
);
HMODULE
hModule
=
LoadLibrary
(
file_name
.
c_str
()
);
if
(
!
hModule
)
{
if
(
!
hModule
)
{
throw
std
::
runtime_error
(
file_name
+
" not found."
);
throw
std
::
runtime_error
(
file_name
+
" not found."
);
}
}
...
@@ -123,14 +123,20 @@ static std::string DirName(const std::string &filepath) {
...
@@ -123,14 +123,20 @@ static std::string DirName(const std::string &filepath) {
}
}
static
void
MkDir
(
const
char
*
path
)
{
static
void
MkDir
(
const
char
*
path
)
{
std
::
string
path_error
(
path
);
path_error
+=
" mkdir failed!"
;
#if !defined(_WIN32)
#if !defined(_WIN32)
if
(
mkdir
(
path
,
0755
))
{
if
(
mkdir
(
path
,
0755
))
{
PADDLE_ENFORCE_EQ
(
errno
,
EEXIST
,
"%s mkdir failed!"
,
path
);
if
(
errno
!=
EEXIST
)
{
throw
std
::
runtime_error
(
path_error
);
}
}
}
#else
#else
CreateDirectory
(
path
,
NULL
);
CreateDirectory
(
path
,
NULL
);
auto
errorno
=
GetLastError
();
auto
errorno
=
GetLastError
();
PADDLE_ENFORCE_EQ
(
errorno
,
ERROR_ALREADY_EXISTS
,
"%s mkdir failed!"
,
path
);
if
(
errorno
!=
ERROR_ALREADY_EXISTS
)
{
throw
std
::
runtime_error
(
path_error
);
}
#endif // !_WIN32
#endif // !_WIN32
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录