Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
c858f489
P
Paddle
项目概览
机器未来
/
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
c858f489
编写于
3月 26, 2018
作者:
T
Tao Luo
提交者:
GitHub
3月 26, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #8887 from luotao1/infer_mkl
add MKL for fluid static and shared library
上级
f765e59c
d573195d
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
13 addition
and
21 deletion
+13
-21
cmake/external/mklml.cmake
cmake/external/mklml.cmake
+2
-2
cmake/inference_lib.cmake
cmake/inference_lib.cmake
+6
-0
paddle/fluid/operators/math/math_function.h
paddle/fluid/operators/math/math_function.h
+0
-7
paddle/math/MathFunctions.cpp
paddle/math/MathFunctions.cpp
+4
-11
paddle/math/MathFunctions.h
paddle/math/MathFunctions.h
+1
-1
未找到文件。
cmake/external/mklml.cmake
浏览文件 @
c858f489
...
@@ -34,7 +34,7 @@ SET(MKLML_DOWNLOAD_DIR "${MKLML_SOURCE_DIR}/src/${MKLML_PROJECT}")
...
@@ -34,7 +34,7 @@ SET(MKLML_DOWNLOAD_DIR "${MKLML_SOURCE_DIR}/src/${MKLML_PROJECT}")
SET
(
MKLML_DST_DIR
"mklml"
)
SET
(
MKLML_DST_DIR
"mklml"
)
SET
(
MKLML_INSTALL_ROOT
"
${
THIRD_PARTY_PATH
}
/install"
)
SET
(
MKLML_INSTALL_ROOT
"
${
THIRD_PARTY_PATH
}
/install"
)
SET
(
MKLML_INSTALL_DIR
${
MKLML_INSTALL_ROOT
}
/
${
MKLML_DST_DIR
}
)
SET
(
MKLML_INSTALL_DIR
${
MKLML_INSTALL_ROOT
}
/
${
MKLML_DST_DIR
}
)
SET
(
MKLML_ROOT
${
MKLML_INSTALL_DIR
}
/
${
MKLML_VER
}
)
SET
(
MKLML_ROOT
${
MKLML_INSTALL_DIR
}
)
SET
(
MKLML_INC_DIR
${
MKLML_ROOT
}
/include
)
SET
(
MKLML_INC_DIR
${
MKLML_ROOT
}
/include
)
SET
(
MKLML_LIB_DIR
${
MKLML_ROOT
}
/lib
)
SET
(
MKLML_LIB_DIR
${
MKLML_ROOT
}
/lib
)
SET
(
MKLML_LIB
${
MKLML_LIB_DIR
}
/libmklml_intel.so
)
SET
(
MKLML_LIB
${
MKLML_LIB_DIR
}
/libmklml_intel.so
)
...
@@ -46,7 +46,7 @@ INCLUDE_DIRECTORIES(${MKLML_INC_DIR})
...
@@ -46,7 +46,7 @@ INCLUDE_DIRECTORIES(${MKLML_INC_DIR})
FILE
(
WRITE
${
MKLML_DOWNLOAD_DIR
}
/CMakeLists.txt
FILE
(
WRITE
${
MKLML_DOWNLOAD_DIR
}
/CMakeLists.txt
"PROJECT(MKLML)
\n
"
"PROJECT(MKLML)
\n
"
"cmake_minimum_required(VERSION 3.0)
\n
"
"cmake_minimum_required(VERSION 3.0)
\n
"
"install(DIRECTORY
${
MKLML_VER
}
\n
"
"install(DIRECTORY
${
MKLML_VER
}
/include
${
MKLML_VER
}
/lib
\n
"
" DESTINATION
${
MKLML_DST_DIR
}
)
\n
"
)
" DESTINATION
${
MKLML_DST_DIR
}
)
\n
"
)
ExternalProject_Add
(
ExternalProject_Add
(
...
...
cmake/inference_lib.cmake
浏览文件 @
c858f489
...
@@ -69,6 +69,12 @@ if(NOT CBLAS_FOUND)
...
@@ -69,6 +69,12 @@ if(NOT CBLAS_FOUND)
SRCS
${
CBLAS_INSTALL_DIR
}
/lib
${
CBLAS_INSTALL_DIR
}
/include
SRCS
${
CBLAS_INSTALL_DIR
}
/lib
${
CBLAS_INSTALL_DIR
}
/include
DSTS
${
dst_dir
}
${
dst_dir
}
DSTS
${
dst_dir
}
${
dst_dir
}
)
)
elseif
(
WITH_MKLML
)
set
(
dst_dir
"
${
CMAKE_INSTALL_PREFIX
}
/third_party/install/mklml"
)
copy
(
mklml_lib
SRCS
${
MKLML_LIB
}
${
MKLML_IOMP_LIB
}
${
MKLML_INC_DIR
}
DSTS
${
dst_dir
}
/lib
${
dst_dir
}
/lib
${
dst_dir
}
)
endif
()
endif
()
# paddle fluid module
# paddle fluid module
...
...
paddle/fluid/operators/math/math_function.h
浏览文件 @
c858f489
...
@@ -19,13 +19,6 @@ limitations under the License. */
...
@@ -19,13 +19,6 @@ limitations under the License. */
#include <mkl_vml_functions.h>
#include <mkl_vml_functions.h>
#endif
#endif
#ifdef PADDLE_USE_ATLAS
extern
"C"
{
#include <cblas.h>
#include <clapack.h>
}
#endif
#ifdef PADDLE_USE_OPENBLAS
#ifdef PADDLE_USE_OPENBLAS
#include <cblas.h>
#include <cblas.h>
#include <lapacke.h>
#include <lapacke.h>
...
...
paddle/math/MathFunctions.cpp
浏览文件 @
c858f489
...
@@ -59,17 +59,10 @@ void* lapack_dso_handle = nullptr;
...
@@ -59,17 +59,10 @@ void* lapack_dso_handle = nullptr;
} __name; // struct DynLoad__##__name
} __name; // struct DynLoad__##__name
#endif
#endif
#ifdef PADDLE_USE_ATLAS
#define PADDLE_SGETRF LAPACKE_sgetrf
#define PADDLE_SGETRF clapack_sgetrf
#define PADDLE_DGETRF LAPACKE_dgetrf
#define PADDLE_DGETRF clapack_dgetrf
#define PADDLE_SGETRI LAPACKE_sgetri
#define PADDLE_SGETRI clapack_sgetri
#define PADDLE_DGETRI LAPACKE_dgetri
#define PADDLE_DGETRI clapack_dgetri
#else
#define PADDLE_SGETRF LAPACKE_sgetrf
#define PADDLE_DGETRF LAPACKE_dgetrf
#define PADDLE_SGETRI LAPACKE_sgetri
#define PADDLE_DGETRI LAPACKE_dgetri
#endif
#define LAPACK_ROUTINE_EACH(__macro) \
#define LAPACK_ROUTINE_EACH(__macro) \
__macro(PADDLE_SGETRF) \
__macro(PADDLE_SGETRF) \
...
...
paddle/math/MathFunctions.h
浏览文件 @
c858f489
...
@@ -21,7 +21,7 @@ limitations under the License. */
...
@@ -21,7 +21,7 @@ limitations under the License. */
#include <mkl_vml_functions.h>
#include <mkl_vml_functions.h>
#endif
#endif
#if defined(PADDLE_USE_
ATLAS) || defined(PADDLE_USE_
VECLIB)
#if defined(PADDLE_USE_VECLIB)
extern
"C"
{
extern
"C"
{
#include <cblas.h>
#include <cblas.h>
#include <clapack.h>
#include <clapack.h>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录