Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
BERT_migraphx
Commits
12de133e
"git@developer.sourcefind.cn:OpenDAS/torchaudio.git" did not exist on "c82a7f9c49613117221fb844c4d04e1f628cbced"
Commit
12de133e
authored
Jun 19, 2023
by
liucong
Browse files
完善文档
parent
7cc64e61
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
20 deletions
+4
-20
CMakeLists.txt
CMakeLists.txt
+1
-4
README.md
README.md
+3
-16
No files found.
CMakeLists.txt
View file @
12de133e
...
@@ -22,10 +22,7 @@ set(LIBRARY_PATH ${CMAKE_CURRENT_SOURCE_DIR}/depend/lib64/
...
@@ -22,10 +22,7 @@ set(LIBRARY_PATH ${CMAKE_CURRENT_SOURCE_DIR}/depend/lib64/
link_directories
(
${
LIBRARY_PATH
}
)
link_directories
(
${
LIBRARY_PATH
}
)
# 添加依赖库
# 添加依赖库
set
(
LIBRARY migraphx_ref
set
(
LIBRARY migraphx
migraphx
migraphx_c
migraphx_device
migraphx_gpu
migraphx_gpu
migraphx_onnx
)
migraphx_onnx
)
link_libraries
(
${
LIBRARY
}
)
link_libraries
(
${
LIBRARY
}
)
...
...
README.md
View file @
12de133e
...
@@ -31,7 +31,7 @@ export PYTHONPATH=/opt/dtk/lib:$PYTHONPATH
...
@@ -31,7 +31,7 @@ export PYTHONPATH=/opt/dtk/lib:$PYTHONPATH
cd
<
path_to_bert_migraphx
>
cd
<
path_to_bert_migraphx
>
# 进入示例程序目录
# 进入示例程序目录
cd
.
/
Python
/
cd
Python
/
# 安装依赖
# 安装依赖
pip
install
-
r
requirements
.
txt
pip
install
-
r
requirements
.
txt
...
@@ -67,11 +67,6 @@ python bert.py
...
@@ -67,11 +67,6 @@ python bert.py
docker pull image.sourcefind.cn:5000/dcu/admin/base/custom:ort1.14.0_migraphx3.0.0-dtk22.10.1
docker pull image.sourcefind.cn:5000/dcu/admin/base/custom:ort1.14.0_migraphx3.0.0-dtk22.10.1
```
```
### 修改CMakeLists.txt
如果使用ubuntu系统,需要修改CMakeLists.txt中依赖库路径:
将"${CMAKE_CURRENT_SOURCE_DIR}/depend/lib64/"修改为"${CMAKE_CURRENT_SOURCE_DIR}/depend/lib/"
### 构建工程
### 构建工程
...
@@ -83,18 +78,10 @@ rbuild build -d depend
...
@@ -83,18 +78,10 @@ rbuild build -d depend
将依赖库依赖加入环境变量LD_LIBRARY_PATH,在~/.bashrc中添加如下语句:
将依赖库依赖加入环境变量LD_LIBRARY_PATH,在~/.bashrc中添加如下语句:
**Centos**
:
```
```
export LD_LIBRARY_PATH=<path_to_bert_migraphx>/depend/lib64/:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=<path_to_bert_migraphx>/depend/lib64/:$LD_LIBRARY_PATH
```
```
**Ubuntu**
:
```
export LD_LIBRARY_PATH=<path_to_bert_migraphx>/depend/lib/:$LD_LIBRARY_PATH
```
然后执行:
然后执行:
```
```
...
@@ -108,13 +95,13 @@ source ~/.bashrc
...
@@ -108,13 +95,13 @@ source ~/.bashrc
cd
<
path_to_bert_migraphx
>
cd
<
path_to_bert_migraphx
>
# 进入build目录
# 进入build目录
cd
.
/
build
/
cd
build
/
# 执行示例程序
# 执行示例程序
.
/
Bert
.
/
Bert
```
```
如下所示,
会
在当前界面
中
提示输入问题,
根据问题
得到预测答案。
如下所示,在当前界面
根据
提示输入问题,得到预测答案。
```
```
question:What is ROCm?
question:What is ROCm?
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment