"git@developer.sourcefind.cn:OpenDAS/torchaudio.git" did not exist on "c82a7f9c49613117221fb844c4d04e1f628cbced"
Commit 12de133e authored by liucong's avatar liucong
Browse files

完善文档

parent 7cc64e61
...@@ -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})
......
...@@ -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?
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment