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
OpenDAS
Torchaudio
Commits
5e5c099a
Commit
5e5c099a
authored
May 08, 2023
by
flyingdown
Browse files
add README_HIP.md
parent
d946a7c8
Pipeline
#252
failed with stages
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
0 deletions
+66
-0
README_HIP.md
README_HIP.md
+66
-0
No files found.
README_HIP.md
0 → 100644
View file @
5e5c099a
# TORCHAUDIO
## 安装
### System Requirements
-
Linux.
-
Python 3.7, 3.8, 3.9
-
(
**推荐**
) Upgrade pip
```
python3 -m pip install --upgrade pip #--user
```
### 使用pip安装(以0.13.1版本为例)
可以在光合
[
光合开发者社区
](
https://developer.hpccube.com/tool/#sdk
)
AI 生态包中获取最新的 torchaudio Release 版本(需对应 DCU Toolkit 版本与 python 版本)
```
bash
python3
-m
pip
install
torchaudio-0.13.1+gitd946a7c.abi0.dtk2304-cp37-cp37m-linux_x86_64.whl
```
### 使用源码安装
#### 编译环境准备(以0.13.1版本为例)
-
拉取 torchaudio 代码
```
git clone -b 0.13.1-dtk23.04 http://developer.hpccube.com/codes/aicomponent/torchaudio.git
```
-
在
[
开发者社区
](
https://developer.hpccube.com/tool/#sdk
)
DCU Toolkit 中下载 DTK-23.04 解压至 /opt/ 路径下,并建立软链接
```
cd /opt && ln -s dtk-23.04 dtk
```
-
在光合
[
光合开发者社区
](
https://developer.hpccube.com/tool/#sdk
)
AI 生态包中获取对应的 pytorch Release 版本(需对应 DCU Toolkit 版本与 python 版本)
```
bash
python3
-m
pip
install
torch-1.13.1a0+git4c8a1fe.abi0.dtk2304-cp37-cp37m-linux_x86_64.whl
```
-
导入环境变量以及安装必要依赖库
```
bash
source
/opt/dtk/env.sh
export
PYTORCH_ROCM_ARCH
=
"gfx906;gfx926"
MAX_JOBS
=
16
sha
=
`
git rev-parse HEAD
`
export
BUILD_VERSION
=
0.13.1+git
${
sha
:0:7
}
.abi0.dtk2304
pip3
install
-r
requirements.txt
-i
https://pypi.tuna.tsinghua.edu.cn/simple
--trusted-host
pypi.tuna.tsinghua.edu.cn
```
#### 编译安装
-
执行编译命令
```
shell
cd
audio
CXX
=
hipcc
CC
=
hipcc python3 setup.py bdist_wheel
pip
install
dist/torchaudio
*
```
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