Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
23290929
P
Paddle
项目概览
PaddlePaddle
/
Paddle
接近 2 年 前同步成功
通知
2323
Star
20933
Fork
5424
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
23290929
编写于
6月 09, 2021
作者:
L
Leo Chen
提交者:
GitHub
6月 09, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Check the installed openblas version in cmake (#33440)
上级
05b9ea50
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
17 addition
and
9 deletion
+17
-9
cmake/cblas.cmake
cmake/cblas.cmake
+15
-9
cmake/third_party.cmake
cmake/third_party.cmake
+2
-0
未找到文件。
cmake/cblas.cmake
浏览文件 @
23290929
...
@@ -69,15 +69,21 @@ if(NOT DEFINED CBLAS_PROVIDER)
...
@@ -69,15 +69,21 @@ if(NOT DEFINED CBLAS_PROVIDER)
PATHS
${
OPENBLAS_LIB_SEARCH_PATHS
}
)
PATHS
${
OPENBLAS_LIB_SEARCH_PATHS
}
)
if
(
OPENBLAS_LAPACKE_INC_DIR AND OPENBLAS_INC_DIR AND OPENBLAS_LIB
)
if
(
OPENBLAS_LAPACKE_INC_DIR AND OPENBLAS_INC_DIR AND OPENBLAS_LIB
)
set
(
CBLAS_PROVIDER OPENBLAS
)
file
(
READ
"
${
OPENBLAS_INC_DIR
}
/openblas_config.h"
config_file
)
set
(
CBLAS_INC_DIR
${
OPENBLAS_INC_DIR
}
${
OPENBLAS_LAPACKE_INC_DIR
}
)
string
(
REGEX MATCH
"OpenBLAS ([0-9]+\.[0-9]+\.[0-9]+)"
tmp
${
config_file
}
)
set
(
CBLAS_LIBRARIES
${
OPENBLAS_LIB
}
)
string
(
REGEX MATCH
"([0-9]+\.[0-9]+\.[0-9]+)"
ver
${
tmp
}
)
add_definitions
(
-DPADDLE_USE_OPENBLAS
)
if
(
${
ver
}
VERSION_EQUAL
"0.3.7"
)
add_definitions
(
-DLAPACK_FOUND
)
set
(
CBLAS_PROVIDER OPENBLAS
)
set
(
CBLAS_INC_DIR
${
OPENBLAS_INC_DIR
}
${
OPENBLAS_LAPACKE_INC_DIR
}
)
message
(
STATUS
"Found OpenBLAS (include:
${
OPENBLAS_INC_DIR
}
, library:
${
CBLAS_LIBRARIES
}
)"
)
set
(
CBLAS_LIBRARIES
${
OPENBLAS_LIB
}
)
message
(
STATUS
"Found lapack in OpenBLAS (include:
${
OPENBLAS_LAPACKE_INC_DIR
}
)"
)
add_definitions
(
-DPADDLE_USE_OPENBLAS
)
add_definitions
(
-DLAPACK_FOUND
)
message
(
STATUS
"Found OpenBLAS (include:
${
OPENBLAS_INC_DIR
}
, library:
${
CBLAS_LIBRARIES
}
)"
)
message
(
STATUS
"Found lapack in OpenBLAS (include:
${
OPENBLAS_LAPACKE_INC_DIR
}
)"
)
endif
()
endif
()
endif
()
endif
()
endif
()
...
...
cmake/third_party.cmake
浏览文件 @
23290929
...
@@ -215,6 +215,8 @@ list(APPEND third_party_deps extern_eigen3 extern_gflags extern_glog extern_boos
...
@@ -215,6 +215,8 @@ list(APPEND third_party_deps extern_eigen3 extern_gflags extern_glog extern_boos
list
(
APPEND third_party_deps extern_zlib extern_dlpack extern_warpctc extern_threadpool
)
list
(
APPEND third_party_deps extern_zlib extern_dlpack extern_warpctc extern_threadpool
)
include
(
cblas
)
# find first, then download, build, install openblas
include
(
cblas
)
# find first, then download, build, install openblas
message
(
STATUS
"CBLAS_PROVIDER:
${
CBLAS_PROVIDER
}
"
)
if
(
${
CBLAS_PROVIDER
}
STREQUAL MKLML
)
if
(
${
CBLAS_PROVIDER
}
STREQUAL MKLML
)
list
(
APPEND third_party_deps extern_mklml
)
list
(
APPEND third_party_deps extern_mklml
)
elseif
(
${
CBLAS_PROVIDER
}
STREQUAL EXTERN_OPENBLAS
)
elseif
(
${
CBLAS_PROVIDER
}
STREQUAL EXTERN_OPENBLAS
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录