Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
bba5e083
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看板
未验证
提交
bba5e083
编写于
5月 09, 2022
作者:
Q
Qi Li
提交者:
GitHub
5月 09, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[ROCm] fix rocksdb on ROCm version 40020496, test=develop (#42563)
上级
1cddcd70
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
34 addition
and
2 deletion
+34
-2
CMakeLists.txt
CMakeLists.txt
+5
-0
cmake/hip.cmake
cmake/hip.cmake
+27
-0
cmake/inference_lib.cmake
cmake/inference_lib.cmake
+1
-1
cmake/third_party.cmake
cmake/third_party.cmake
+1
-1
未找到文件。
CMakeLists.txt
浏览文件 @
bba5e083
...
...
@@ -395,6 +395,11 @@ if(WITH_DISTRIBUTE)
MESSAGE
(
WARNING
"Disable WITH_PSCORE when compiling with NPU. Force WITH_PSCORE=OFF."
)
set
(
WITH_PSCORE OFF CACHE BOOL
"Disable WITH_PSCORE when compiling with NPU"
FORCE
)
endif
()
if
(
WITH_ROCM AND HIP_VERSION LESS_EQUAL 40020496
)
# TODO(qili93): third-party rocksdb throw Illegal instruction with HIP version 40020496
MESSAGE
(
WARNING
"Disable WITH_PSCORE when HIP_VERSION is less than or equal 40020496. Force WITH_PSCORE=OFF."
)
set
(
WITH_PSCORE OFF CACHE BOOL
"Disable WITH_PSCORE when HIP_VERSION is less than or equal 40020496"
FORCE
)
endif
()
endif
()
include
(
third_party
)
# download, build, install third_party, Contains about 20+ dependencies
...
...
cmake/hip.cmake
浏览文件 @
bba5e083
...
...
@@ -18,6 +18,33 @@ include_directories(${ROCM_PATH}/include)
message
(
STATUS
"HIP version:
${
HIP_VERSION
}
"
)
message
(
STATUS
"HIP_CLANG_PATH:
${
HIP_CLANG_PATH
}
"
)
macro
(
find_hip_version hip_header_file
)
file
(
READ
${
hip_header_file
}
HIP_VERSION_FILE_CONTENTS
)
string
(
REGEX MATCH
"define HIP_VERSION_MAJOR +([0-9]+)"
HIP_MAJOR_VERSION
"
${
HIP_VERSION_FILE_CONTENTS
}
"
)
string
(
REGEX REPLACE
"define HIP_VERSION_MAJOR +([0-9]+)"
"
\\
1"
HIP_MAJOR_VERSION
"
${
HIP_MAJOR_VERSION
}
"
)
string
(
REGEX MATCH
"define HIP_VERSION_MINOR +([0-9]+)"
HIP_MINOR_VERSION
"
${
HIP_VERSION_FILE_CONTENTS
}
"
)
string
(
REGEX REPLACE
"define HIP_VERSION_MINOR +([0-9]+)"
"
\\
1"
HIP_MINOR_VERSION
"
${
HIP_MINOR_VERSION
}
"
)
string
(
REGEX MATCH
"define HIP_VERSION_PATCH +([0-9]+)"
HIP_PATCH_VERSION
"
${
HIP_VERSION_FILE_CONTENTS
}
"
)
string
(
REGEX REPLACE
"define HIP_VERSION_PATCH +([0-9]+)"
"
\\
1"
HIP_PATCH_VERSION
"
${
HIP_PATCH_VERSION
}
"
)
if
(
NOT HIP_MAJOR_VERSION
)
set
(
HIP_VERSION
"???"
)
message
(
WARNING
"Cannot find HIP version in
${
HIP_PATH
}
/include/hip/hip_version.h"
)
else
()
math
(
EXPR HIP_VERSION
"
${
HIP_MAJOR_VERSION
}
* 10000000 +
${
HIP_MINOR_VERSION
}
* 100000 +
${
HIP_PATCH_VERSION
}
"
)
message
(
STATUS
"Current HIP header is
${
HIP_PATH
}
/include/hip/hip_version.h "
"Current HIP version is v
${
HIP_MAJOR_VERSION
}
.
${
HIP_MINOR_VERSION
}
.
${
HIP_PATCH_VERSION
}
. "
)
endif
()
endmacro
()
find_hip_version
(
${
HIP_PATH
}
/include/hip/hip_version.h
)
macro
(
find_package_and_include PACKAGE_NAME
)
find_package
(
"
${
PACKAGE_NAME
}
"
REQUIRED
)
include_directories
(
"
${
ROCM_PATH
}
/
${
PACKAGE_NAME
}
/include"
)
...
...
cmake/inference_lib.cmake
浏览文件 @
bba5e083
...
...
@@ -416,7 +416,7 @@ function(version version_file)
endif
()
if
(
WITH_ROCM
)
file
(
APPEND
${
version_file
}
"HIP version:
${
HIP
_VERSION
}
\n
"
"HIP version:
v
${
HIP_MAJOR_VERSION
}
.
${
HIP_MINOR
_VERSION
}
\n
"
"MIOpen version: v
${
MIOPEN_MAJOR_VERSION
}
.
${
MIOPEN_MINOR_VERSION
}
\n
"
)
endif
()
if
(
WITH_ASCEND_CL
)
...
...
cmake/third_party.cmake
浏览文件 @
bba5e083
...
...
@@ -357,7 +357,7 @@ if (WITH_PSCORE)
include
(
external/libmct
)
# download, build, install libmct
list
(
APPEND third_party_deps extern_libmct
)
include
(
external/rocksdb
)
# download, build, install
libmct
include
(
external/rocksdb
)
# download, build, install
rocksdb
list
(
APPEND third_party_deps extern_rocksdb
)
endif
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录