Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
1d5d9da9
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看板
提交
1d5d9da9
编写于
5月 09, 2017
作者:
L
liaogang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refine cblas.cmake
上级
f3eb6e91
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
28 addition
and
8 deletion
+28
-8
cmake/cblas.cmake
cmake/cblas.cmake
+2
-1
cmake/external/openblas.cmake
cmake/external/openblas.cmake
+1
-1
paddle/math/MathFunctions.h
paddle/math/MathFunctions.h
+24
-5
paddle/math/tests/test_matrixCompare.cpp
paddle/math/tests/test_matrixCompare.cpp
+1
-1
未找到文件。
cmake/cblas.cmake
浏览文件 @
1d5d9da9
...
...
@@ -110,6 +110,7 @@ if(OPENBLAS_LAPACKE_INC_DIR AND OPENBLAS_INC_DIR AND OPENBLAS_LIB)
set
(
CBLAS_INC_DIR
${
OPENBLAS_INC_DIR
}
${
OPENBLAS_LAPACKE_INC_DIR
}
)
set
(
CBLAS_LIBRARIES
${
OPENBLAS_LIB
}
)
add_definitions
(
-DPADDLE_USE_OPENBLAS
)
add_definitions
(
-DLAPACK_FOUND
)
message
(
STATUS
"Found OpenBLAS (include:
${
OPENBLAS_INC_DIR
}
, library:
${
CBLAS_LIBRARIES
}
)"
)
...
...
@@ -146,6 +147,6 @@ if (REFERENCE_CBLAS_INCLUDE_DIR AND REFERENCE_CBLAS_LIBRARY)
set
(
CBLAS_PROVIDER REFERENCE
)
set
(
CBLAS_INC_DIR
${
REFERENCE_CBLAS_INCLUDE_DIR
}
)
set
(
CBLAS_LIBRARIES
${
REFERENCE_CBLAS_LIBRARY
}
)
add_definitions
(
-DPADDLE_USE_REFERENCE_CBLAS
)
message
(
STATUS
"Found reference-cblas (include:
${
CBLAS_INC_DIR
}
, library:
${
CBLAS_LIBRARIES
}
)"
)
endif
()
cmake/external/openblas.cmake
浏览文件 @
1d5d9da9
...
...
@@ -36,7 +36,7 @@ IF(NOT ${CBLAS_FOUND})
INSTALL_DIR
${
CBLAS_INSTALL_DIR
}
BUILD_IN_SOURCE 1
BUILD_COMMAND
${
CMAKE_MAKE_PROGRAM
}
FC=
${
CMAKE_Fortran_COMPILER
}
CC=
${
CMAKE_C_COMPILER
}
HOSTCC=
${
CMAKE_C_COMPILER
}
NO_LAPACK=1 DYNAMIC_ARCH=1 NO_SHARED=1 libs netlib
INSTALL_COMMAND
${
CMAKE_MAKE_PROGRAM
}
install NO_SHARED=1 PREFIX=<INSTALL_DIR>
INSTALL_COMMAND
${
CMAKE_MAKE_PROGRAM
}
install NO_SHARED=1
NO_LAPACK=1
PREFIX=<INSTALL_DIR>
UPDATE_COMMAND
""
CONFIGURE_COMMAND
""
)
...
...
paddle/math/MathFunctions.h
浏览文件 @
1d5d9da9
...
...
@@ -18,17 +18,36 @@ limitations under the License. */
#ifdef PADDLE_USE_MKL
#include <mkl.h>
#include <mkl_lapacke.h>
#else
extern
"C"
{
#include <cblas.h>
}
#endif
#ifdef PADDLE_USE_ATLAS
extern
"C"
{
#include <cblas.h>
#include <clapack.h>
}
#else
#endif
#ifdef PADDLE_USE_OPENBLAS
#include <cblas.h>
#include <lapacke.h>
#endif
#ifdef PADDLE_USE_REFERENCE_CBLAS
extern
"C"
{
#include <cblas.h>
}
#endif
#ifndef LAPACK_FOUND
extern
"C"
{
int
LAPACKE_sgetrf
(
int
matrix_layout
,
int
m
,
int
n
,
int
LAPACKE_dgetrf
(
int
matrix_layout
,
int
m
,
int
n
,
double
*
a
,
int
lda
,
int
*
ipiv
);
int
LAPACKE_sgetri
(
int
matrix_layout
,
int
n
,
float
*
a
,
int
lda
,
const
int
*
ipiv
);
int
LAPACKE_dgetri
(
int
matrix_layout
,
int
n
,
double
*
a
,
int
lda
,
const
int
*
ipiv
);
}
#endif
#include <cmath>
...
...
paddle/math/tests/test_matrixCompare.cpp
浏览文件 @
1d5d9da9
...
...
@@ -247,7 +247,7 @@ TEST(Matrix, unary) {
<<
"1. Simply issue `sudo apt-get install liblapacke-dev` to "
"avoid re-build source code.
\n
"
<<
"2. Install MKL/Openblas/ATLAS and re-build PaddlePaddle "
"source code."
"source code."
;
#endif
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录