Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
7835d493
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看板
提交
7835d493
编写于
11月 09, 2017
作者:
L
Luo Tao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove PADDLE_USE_MKL
上级
5a5b7297
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
4 addition
and
57 deletion
+4
-57
cmake/cblas.cmake
cmake/cblas.cmake
+2
-7
cmake/external/openblas.cmake
cmake/external/openblas.cmake
+1
-5
paddle/math/MathFunctions.cpp
paddle/math/MathFunctions.cpp
+1
-35
paddle/math/MathFunctions.h
paddle/math/MathFunctions.h
+0
-5
paddle/operators/math/math_function.h
paddle/operators/math/math_function.h
+0
-5
未找到文件。
cmake/cblas.cmake
浏览文件 @
7835d493
# Find the CBlas and lapack libraries
# Find the CBlas and lapack libraries
#
#
# It will search MKL, atlas, OpenBlas, reference-cblas in order.
# It will search MKL
ML
, atlas, OpenBlas, reference-cblas in order.
#
#
# If any cblas implementation found, the following variable will be set.
# If any cblas implementation found, the following variable will be set.
# CBLAS_PROVIDER # one of MKL, ATLAS, OPENBLAS, REFERENCE
# CBLAS_PROVIDER # one of MKL
ML
, ATLAS, OPENBLAS, REFERENCE
# CBLAS_INC_DIR # the include directory for cblas.
# CBLAS_INC_DIR # the include directory for cblas.
# CBLAS_LIBS # a list of libraries should be linked by paddle.
# CBLAS_LIBS # a list of libraries should be linked by paddle.
# # Each library should be full path to object file.
# # Each library should be full path to object file.
#
# User should set one of MKL_ROOT, ATLAS_ROOT, OPENBLAS_ROOT, REFERENCE_CBLAS_ROOT
# during cmake. If none of them set, it will try to find cblas implementation in
# system paths.
#
set
(
CBLAS_FOUND OFF
)
set
(
CBLAS_FOUND OFF
)
...
...
cmake/external/openblas.cmake
浏览文件 @
7835d493
...
@@ -115,11 +115,7 @@ INCLUDE_DIRECTORIES(${CBLAS_INC_DIR})
...
@@ -115,11 +115,7 @@ INCLUDE_DIRECTORIES(${CBLAS_INC_DIR})
# linear algebra libraries for cc_library(xxx SRCS xxx.c DEPS cblas)
# linear algebra libraries for cc_library(xxx SRCS xxx.c DEPS cblas)
SET
(
dummyfile
${
CMAKE_CURRENT_BINARY_DIR
}
/cblas_dummy.c
)
SET
(
dummyfile
${
CMAKE_CURRENT_BINARY_DIR
}
/cblas_dummy.c
)
FILE
(
WRITE
${
dummyfile
}
"const char * dummy =
\"
${
dummyfile
}
\"
;"
)
FILE
(
WRITE
${
dummyfile
}
"const char * dummy =
\"
${
dummyfile
}
\"
;"
)
IF
(
${
CBLAS_PROVIDER
}
MATCHES MKL
)
ADD_LIBRARY
(
cblas STATIC
${
dummyfile
}
)
ADD_LIBRARY
(
cblas SHARED
${
dummyfile
}
)
ELSE
()
ADD_LIBRARY
(
cblas STATIC
${
dummyfile
}
)
ENDIF
()
TARGET_LINK_LIBRARIES
(
cblas
${
CBLAS_LIBRARIES
}
)
TARGET_LINK_LIBRARIES
(
cblas
${
CBLAS_LIBRARIES
}
)
IF
(
NOT
${
CBLAS_FOUND
}
)
IF
(
NOT
${
CBLAS_FOUND
}
)
...
...
paddle/math/MathFunctions.cpp
浏览文件 @
7835d493
...
@@ -206,7 +206,7 @@ double dotProduct<double>(const int n, const double* x, const double* y) {
...
@@ -206,7 +206,7 @@ double dotProduct<double>(const int n, const double* x, const double* y) {
}
}
#endif
#endif
#if defined(PADDLE_USE_MKL
) || defined(PADDLE_USE_MKL
ML)
#if defined(PADDLE_USE_MKLML)
template
<
>
template
<
>
void
vExp
<
float
>
(
const
int
n
,
const
float
*
a
,
float
*
r
)
{
void
vExp
<
float
>
(
const
int
n
,
const
float
*
a
,
float
*
r
)
{
...
@@ -295,38 +295,6 @@ template void vAdd(const int n, const double* a, const double* b, double* r);
...
@@ -295,38 +295,6 @@ template void vAdd(const int n, const double* a, const double* b, double* r);
#endif
#endif
#ifdef PADDLE_USE_MKL
template
<
>
void
vInvSqrt
<
float
>
(
const
int
n
,
const
float
*
a
,
float
*
r
)
{
vsInvSqrt
(
n
,
a
,
r
);
}
template
<
>
void
vInvSqrt
<
double
>
(
const
int
n
,
const
double
*
a
,
double
*
r
)
{
vdInvSqrt
(
n
,
a
,
r
);
}
template
<
>
void
vLog1p
<
float
>
(
const
int
n
,
const
float
*
a
,
float
*
r
)
{
vsLog1p
(
n
,
a
,
r
);
}
template
<
>
void
vLog1p
<
double
>
(
const
int
n
,
const
double
*
a
,
double
*
r
)
{
vdLog1p
(
n
,
a
,
r
);
}
template
<
>
void
vTanh
<
float
>
(
const
int
n
,
const
float
*
a
,
float
*
r
)
{
vsTanh
(
n
,
a
,
r
);
}
template
<
>
void
vTanh
<
double
>
(
const
int
n
,
const
double
*
a
,
double
*
r
)
{
vdTanh
(
n
,
a
,
r
);
}
#else
DEFINE_MATRIX_BINARY_OP
(
vInvSqrt
,
b
=
1.0
f
/
std
::
sqrt
(
a
));
DEFINE_MATRIX_BINARY_OP
(
vInvSqrt
,
b
=
1.0
f
/
std
::
sqrt
(
a
));
template
<
class
T
>
template
<
class
T
>
void
vInvSqrt
(
const
int
n
,
const
T
*
a
,
T
*
r
)
{
void
vInvSqrt
(
const
int
n
,
const
T
*
a
,
T
*
r
)
{
...
@@ -357,6 +325,4 @@ template void vLog1p(const int n, const double* a, double* r);
...
@@ -357,6 +325,4 @@ template void vLog1p(const int n, const double* a, double* r);
template
void
vTanh
(
const
int
n
,
const
float
*
a
,
float
*
r
);
template
void
vTanh
(
const
int
n
,
const
float
*
a
,
float
*
r
);
template
void
vTanh
(
const
int
n
,
const
double
*
a
,
double
*
r
);
template
void
vTanh
(
const
int
n
,
const
double
*
a
,
double
*
r
);
#endif
}
// namespace paddle
}
// namespace paddle
paddle/math/MathFunctions.h
浏览文件 @
7835d493
...
@@ -21,11 +21,6 @@ limitations under the License. */
...
@@ -21,11 +21,6 @@ limitations under the License. */
#include <mkl_vml_functions.h>
#include <mkl_vml_functions.h>
#endif
#endif
#ifdef PADDLE_USE_MKL
#include <mkl.h>
#include <mkl_lapacke.h>
#endif
#if defined(PADDLE_USE_ATLAS) || defined(PADDLE_USE_VECLIB)
#if defined(PADDLE_USE_ATLAS) || defined(PADDLE_USE_VECLIB)
extern
"C"
{
extern
"C"
{
#include <cblas.h>
#include <cblas.h>
...
...
paddle/operators/math/math_function.h
浏览文件 @
7835d493
...
@@ -19,11 +19,6 @@ limitations under the License. */
...
@@ -19,11 +19,6 @@ limitations under the License. */
#include <mkl_vml_functions.h>
#include <mkl_vml_functions.h>
#endif
#endif
#ifdef PADDLE_USE_MKL
#include <mkl.h>
#include <mkl_lapacke.h>
#endif
#ifdef PADDLE_USE_ATLAS
#ifdef PADDLE_USE_ATLAS
extern
"C"
{
extern
"C"
{
#include <cblas.h>
#include <cblas.h>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录