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
ColossalAI
Commits
bc0e558d
Commit
bc0e558d
authored
May 06, 2023
by
zhuwenwen
Browse files
add README_HIP.md
parent
08f2920e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
1 deletion
+43
-1
README_HIP.md
README_HIP.md
+42
-0
setup.py
setup.py
+1
-1
No files found.
README_HIP.md
0 → 100644
View file @
bc0e558d
# Colossal-AI
## 安装
Colossal-AI支持
+
Python 3.7.
+
Python 3.8.
+
Python 3.9.
### 使用pip安装
colossalai whl包下载目录:
[
https://cancon.hpccube.com:65024/4/main/colossalai/dtk23.04
](
https://cancon.hpccube.com:65024/4/main/colossalai/dtk23.04
)
根据对应的pytorch版本和python版本,下载对应colossalai的whl包
```
shell
pip
install
colossalai
*
(
下载的colossalai的whl包
)
```
### 使用源码安装
#### 编译环境准备
pytorch whl包下载目录:
[
https://cancon.hpccube.com:65024/4/main/pytorch/dtk23.04
](
https://cancon.hpccube.com:65024/4/main/pytorch/dtk23.04
)
根据python版本,下载对应pytorch的whl包
```
shell
pip
install
torch
*
(
下载的torch的whl包
)
```
```
shell
pip
install
setuptools wheel
```
#### 编译安装
```
shell
git clone
-b
dtk-23.04_colossalai0.1.13 https://developer.hpccube.com/codes/aicomponent/colossalai
cd
colossalai
export
COLOSSALAI_BUILD_VERSION
=
abix.dtkxxx
python setup.py bdist_wheel
pip
install
dist/colossalai
*
```
## Note
+
若使用 pip install 下载安装过慢,可添加源:-i https://pypi.tuna.tsinghua.edu.cn/simple/
+
COLOSSALAI_BUILD_VERSION为编译的版本号设置,版本号为0.1.13+gitxxx.abix.dtkxxx
gitxxx:为代码自动获取;abi0:使用devtools的gcc编译;abi1:使用非devtools的gcc编译; dtkxxx为dtk的版本号:例如:dtk2304
\ No newline at end of file
setup.py
View file @
bc0e558d
...
...
@@ -193,7 +193,7 @@ if build_hip_ext:
name
=
name
,
sources
=
[
os
.
path
.
join
(
'colossalai/kernel/hip_native/csrc'
,
path
)
for
path
in
sources
],
include_dirs
=
[
os
.
path
.
join
(
this_dir
,
'colossalai/kernel/hip_native/csrc/kernels/include'
)]
+
[
os
.
path
.
join
(
this_dir
,
'colossalai/kernel/hip_native/csrc'
)]
+
[
'/opt/dtk/hiprand/include'
]
+
[
'/opt/dtk/rocrand/include'
]
,
this_dir
,
'colossalai/kernel/hip_native/csrc/kernels/include'
)]
+
[
os
.
path
.
join
(
this_dir
,
'colossalai/kernel/hip_native/csrc'
)],
extra_compile_args
=
{
'cxx'
:
[
'-O3'
]
+
version_dependent_macros
+
hip_macros
,
'nvcc'
:
[
'-O3'
]
+
version_dependent_macros
+
hip_macros
+
extra_cuda_flags
})
...
...
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