README.md 2.02 KB
Newer Older
zhuwenwen's avatar
zhuwenwen committed
1
2
# Colossal-AI

zhuwenwen's avatar
zhuwenwen committed
3
4
5
6
7
## 安装
Colossal-AI支持
+ Python 3.7.
+ Python 3.8.
+ Python 3.9.
zhuwenwen's avatar
zhuwenwen committed
8

zhuwenwen's avatar
zhuwenwen committed
9
10
11
### 使用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包
zhuwenwen's avatar
zhuwenwen committed
12
13

```shell
zhuwenwen's avatar
zhuwenwen committed
14
pip install colossalai* (下载的colossalai的whl包)
zhuwenwen's avatar
zhuwenwen committed
15
16
```

zhuwenwen's avatar
zhuwenwen committed
17
### 使用源码安装
zhuwenwen's avatar
zhuwenwen committed
18

zhuwenwen's avatar
zhuwenwen committed
19
20
21
#### 编译环境准备
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包
zhuwenwen's avatar
zhuwenwen committed
22
```shell
zhuwenwen's avatar
zhuwenwen committed
23
pip install torch* (下载的torch的whl包)
zhuwenwen's avatar
zhuwenwen committed
24
25
```

zhuwenwen's avatar
zhuwenwen committed
26
27
```shell
pip install setuptools wheel
zhuwenwen's avatar
zhuwenwen committed
28
29
```

zhuwenwen's avatar
zhuwenwen committed
30
31
#### 编译安装
```shell
zhuwenwen's avatar
zhuwenwen committed
32
git clone https://developer.hpccube.com/codes/aicomponent/colossalai # 根据需要的分支进行切换
zhuwenwen's avatar
zhuwenwen committed
33
cd colossalai
zhuwenwen's avatar
zhuwenwen committed
34
35

1、 编译whl包并安装
zhuwenwen's avatar
zhuwenwen committed
36
37
python setup.py bdist_wheel 
pip install dist/colossalai*
zhuwenwen's avatar
zhuwenwen committed
38
39
40

2、 直接编译安装
python setup.py install 
zhuwenwen's avatar
zhuwenwen committed
41
42
```

zhuwenwen's avatar
zhuwenwen committed
43
44
45
46
47
48
49
50
51
52
53
54
55
56
## 安装包命名
例: colossalai-0.1.13+git43ff1d4.abi0.dtk2304.torch1.10-cp37-cp37m-manylinux2014_x86_64.whl
- colossalai: 安装包名称;
- 0.1.13: 安装包版本号;
- git43ff1d4: git号;
- abi0: 对应centos和rocky多系统的标识,取值为abi0(centos7),abi1(rocky8),可使用命令行动态查询获取辅助判断(echo '#include <string>' | gcc -x c++ -E -dM - | fgrep _GLIBCXX_USE_CXX11_ABI);
- dtk2304: 对应dtk大版本号,命令行动态查询取值(/opt/dtk-23.04/.info/rocm_version);
- torch1.10: 对应构建的torch版本号,命令行动态查询取值(torch.\_\_version__);
- cp37-cp37m: 对应python版本号;
- manylinux2014_x86_64: 系统架构;

## 版本号查询
- colossalai.\_\_version__:与官方版本同步,查询该安装包的版本号,例如0.1.13;

zhuwenwen's avatar
zhuwenwen committed
57
## Note
zhuwenwen's avatar
zhuwenwen committed
58
59
60
61
62
+ 若使用 pip install 下载安装过慢,可添加源:-i https://pypi.tuna.tsinghua.edu.cn/simple/

## 参考
- [README_ORIGIN](README_ORIGIN.md)
- [README_zh-Hans](README_zh-Hans.md)