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
GPT2_migraphx
Commits
ef65e64e
"sgl-kernel/python/sgl_kernel/gemm.py" did not exist on "110e0066735a3bd431c2640ae168fc040d7c0806"
Commit
ef65e64e
authored
Jun 19, 2023
by
liucong
Browse files
完善工程
parent
bf0ad4ec
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
21 deletions
+3
-21
CMakeLists.txt
CMakeLists.txt
+1
-4
README.md
README.md
+2
-17
No files found.
CMakeLists.txt
View file @
ef65e64e
...
@@ -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 @
ef65e64e
...
@@ -31,7 +31,7 @@ export PYTHONPATH=/opt/dtk/lib:$PYTHONPATH
...
@@ -31,7 +31,7 @@ export PYTHONPATH=/opt/dtk/lib:$PYTHONPATH
cd
<
path_to_gpt2_migraphx
>
cd
<
path_to_gpt2_migraphx
>
# 进入示例程序目录
# 进入示例程序目录
cd
.
/
Python
/
cd
Python
/
# 安装依赖
# 安装依赖
pip
install
-
r
requirements
.
txt
pip
install
-
r
requirements
.
txt
...
@@ -45,8 +45,6 @@ export MIGRAPHX_DYNAMIC_SHAPE=1
...
@@ -45,8 +45,6 @@ export MIGRAPHX_DYNAMIC_SHAPE=1
### 运行示例
### 运行示例
在Python目录下执行如下命令运行该示例程序:
```
python
```
python
python
gpt2
.
py
python
gpt2
.
py
```
```
...
@@ -74,11 +72,6 @@ chatbot:春风吹絮满江南,一片离情酒半酣。记得小桥和雪看,
...
@@ -74,11 +72,6 @@ chatbot:春风吹絮满江南,一片离情酒半酣。记得小桥和雪看,
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/"
### 构建工程
### 构建工程
...
@@ -90,18 +83,10 @@ rbuild build -d depend
...
@@ -90,18 +83,10 @@ rbuild build -d depend
将依赖库依赖加入环境变量LD_LIBRARY_PATH,在~/.bashrc中添加如下语句:
将依赖库依赖加入环境变量LD_LIBRARY_PATH,在~/.bashrc中添加如下语句:
**Centos**
:
```
```
export LD_LIBRARY_PATH=<path_to_gpt2_migraphx>/depend/lib64/:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=<path_to_gpt2_migraphx>/depend/lib64/:$LD_LIBRARY_PATH
```
```
**Ubuntu**
:
```
export LD_LIBRARY_PATH=<path_to_gpt2_migraphx>/depend/lib/:$LD_LIBRARY_PATH
```
然后执行:
然后执行:
```
```
...
@@ -121,7 +106,7 @@ export MIGRAPHX_DYNAMIC_SHAPE=1
...
@@ -121,7 +106,7 @@ export MIGRAPHX_DYNAMIC_SHAPE=1
cd
<
path_to_gpt2_migraphx
>
cd
<
path_to_gpt2_migraphx
>
# 进入build目录
# 进入build目录
cd
.
/
build
/
cd
build
/
# 执行示例程序
# 执行示例程序
.
/
GPT2
.
/
GPT2
...
...
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