Skip to content

Commit 2c4943a

Browse files
committed
[DOC] Update readme
1 parent 3a72726 commit 2c4943a

File tree

2 files changed

+20
-15
lines changed

2 files changed

+20
-15
lines changed

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ python3 -m pip install . --no-build-isolation -v
2222

2323
Automatic dependency library downloads may be limited by network conditions. You can manually download to the cache directory ~/.flagtree (modifiable via the FLAGTREE_CACHE_DIR environment variable). No need to manually set LLVM environment variables such as LLVM_BUILD_DIR.
2424
Complete build commands for each backend:
25+
26+
[iluvatar](/third_party/iluvatar/)
2527
```shell
26-
# iluvatar
2728
# Recommended: Use Ubuntu 20.04
2829
mkdir -p ~/.flagtree/iluvatar; cd ~/.flagtree/iluvatar
2930
wget https://github.com/FlagTree/flagtree/releases/download/v0.1.0-build-deps/iluvatar-llvm18-x86_64.tar.gz
@@ -32,27 +33,28 @@ cd ${YOUR_CODE_DIR}/flagtree/python
3233
export FLAGTREE_BACKEND=iluvatar
3334
python3 -m pip install . --no-build-isolation -v
3435
```
36+
[xpu (klx)](/third_party/xpu/)
3537
```shell
36-
# xpu (klx)
3738
# Recommended: Use the Docker image (22GB) https://su.bcebos.com/klx-sdk-release-public/xpytorch/docker/ubuntu2004_v030/ubuntu_2004_x86_64_v30.tar
39+
# Contact kunlunxin-support@baidu.com for support
3840
mkdir -p ~/.flagtree/xpu; cd ~/.flagtree/xpu
39-
wget https://github.com/FlagTree/flagtree/releases/download/v0.1.0-build-deps/XTDK-llvm18-ubuntu2004_x86_64.tar
41+
wget https://github.com/FlagTree/flagtree/releases/download/v0.1.0-build-deps/XTDK-llvm19-ubuntu2004_x86_64.tar.gz
4042
wget https://github.com/FlagTree/flagtree/releases/download/v0.1.0-build-deps/xre-Linux-x86_64.tar.gz
4143
cd ${YOUR_CODE_DIR}/flagtree/python
4244
export FLAGTREE_BACKEND=xpu
4345
python3 -m pip install . --no-build-isolation -v
4446
```
47+
[mthreads](https://github.com/FlagTree/flagtree/tree/main/third_party/mthreads/)
4548
```shell
46-
# mthreads
4749
# Recommended: Use the Dockerfile flagtree/dockerfiles/Dockerfile-ubuntu22.04-python3.10-mthreads
4850
mkdir -p ~/.flagtree/mthreads; cd ~/.flagtree/mthreads
4951
wget https://github.com/FlagTree/flagtree/releases/download/v0.1.0-build-deps/mthreads-llvm19-glibc2.34-glibcxx3.4.30-x64.tar.gz
5052
cd ${YOUR_CODE_DIR}/flagtree/python
5153
export FLAGTREE_BACKEND=mthreads
5254
python3 -m pip install . --no-build-isolation -v
5355
```
56+
[ascend](https://github.com/FlagTree/flagtree/tree/triton_v3.2.x/third_party/ascend/)
5457
```shell
55-
# ascend
5658
# Recommended: Use the Dockerfile flagtree/dockerfiles/Dockerfile-ubuntu20.04-python3.9-ascend
5759
# After registering an account at https://www.hiascend.com/developer/download/community/result?module=cann,
5860
# download the cann-toolkit and cann-kernels for the corresponding platform.
@@ -65,6 +67,7 @@ chmod +x Atlas-A3-cann-kernels_8.1.RC1_linux-aarch64.run
6567
mkdir -p ~/.flagtree/ascend; cd ~/.flagtree/ascend
6668
wget https://oaitriton.blob.core.windows.net/public/llvm-builds/llvm-b5cc222d-ubuntu-arm64.tar.gz
6769
cd ${YOUR_CODE_DIR}/flagtree/python
70+
git checkout -b triton_v3.2.x origin/triton_v3.2.x
6871
export FLAGTREE_BACKEND=ascend
6972
python3 -m pip install . --no-build-isolation -v
7073
```

README_cn.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
FlagTree 是多后端的 Triton 编译器项目。FlagTree 致力于打造多元 AI 芯片编译器及相关工具平台,发展和壮大 Triton 上下游生态。项目当前处于初期,目标是兼容现有适配方案,统一代码仓库,快速实现单版本多后端支持。
66

7-
## Install from source
7+
## 从源代码安装
88
安装依赖(注意使用正确的 python3.x 执行):
99
```shell
1010
apt install zlib1g zlib1g-dev libxml2 libxml2-dev # ubuntu
@@ -18,12 +18,13 @@ export FLAGTREE_BACKEND=backendxxx
1818
python3 -m pip install . --no-build-isolation -v
1919
```
2020

21-
## Tips for building
21+
## 构建技巧
2222

2323
自动下载依赖库的速度可能受限于网络环境,编译前可自行下载至缓存目录 ~/.flagtree(可通过环境变量 FLAGTREE_CACHE_DIR 修改),无需自行设置 LLVM_BUILD_DIR 等环境变量。
2424
各后端完整编译命令如下:
25+
26+
[iluvatar](/third_party/iluvatar/)
2527
```shell
26-
# iluvatar
2728
# 推荐使用镜像 Ubuntu 20.04
2829
mkdir -p ~/.flagtree/iluvatar; cd ~/.flagtree/iluvatar
2930
wget https://github.com/FlagTree/flagtree/releases/download/v0.1.0-build-deps/iluvatar-llvm18-x86_64.tar.gz
@@ -32,27 +33,28 @@ cd ${YOUR_CODE_DIR}/flagtree/python
3233
export FLAGTREE_BACKEND=iluvatar
3334
python3 -m pip install . --no-build-isolation -v
3435
```
36+
[xpu (klx)](/third_party/xpu/)
3537
```shell
36-
# xpu (klx)
3738
# 推荐使用镜像(22GB)https://su.bcebos.com/klx-sdk-release-public/xpytorch/docker/ubuntu2004_v030/ubuntu_2004_x86_64_v30.tar
39+
# 联系 kunlunxin-support@baidu.com 可获取进一步支持
3840
mkdir -p ~/.flagtree/xpu; cd ~/.flagtree/xpu
39-
wget https://github.com/FlagTree/flagtree/releases/download/v0.1.0-build-deps/XTDK-llvm18-ubuntu2004_x86_64.tar
41+
wget https://github.com/FlagTree/flagtree/releases/download/v0.1.0-build-deps/XTDK-llvm19-ubuntu2004_x86_64.tar.gz
4042
wget https://github.com/FlagTree/flagtree/releases/download/v0.1.0-build-deps/xre-Linux-x86_64.tar.gz
4143
cd ${YOUR_CODE_DIR}/flagtree/python
4244
export FLAGTREE_BACKEND=xpu
4345
python3 -m pip install . --no-build-isolation -v
4446
```
47+
[mthreads](https://github.com/FlagTree/flagtree/tree/main/third_party/mthreads/)
4548
```shell
46-
# mthreads
4749
# 推荐使用镜像 flagtree/dockerfiles/Dockerfile-ubuntu22.04-python3.10-mthreads
4850
mkdir -p ~/.flagtree/mthreads; cd ~/.flagtree/mthreads
4951
wget https://github.com/FlagTree/flagtree/releases/download/v0.1.0-build-deps/mthreads-llvm19-glibc2.34-glibcxx3.4.30-x64.tar.gz
5052
cd ${YOUR_CODE_DIR}/flagtree/python
5153
export FLAGTREE_BACKEND=mthreads
5254
python3 -m pip install . --no-build-isolation -v
5355
```
56+
[ascend](https://github.com/FlagTree/flagtree/tree/triton_v3.2.x/third_party/ascend/)
5457
```shell
55-
# ascend
5658
# 推荐使用镜像 flagtree/dockerfiles/Dockerfile-ubuntu20.04-python3.9-ascend
5759
# 在 https://www.hiascend.com/developer/download/community/result?module=cann
5860
# 注册账号后下载对应平台的 cann-toolkit、cann-kernels,这里以 AArch64 架构的 A3 处理器为例展示如何安装
@@ -86,18 +88,18 @@ python3 -m pip install . --no-build-isolation -v
8688
unset LLVM_BUILD_DIR LLVM_INCLUDE_DIRS LLVM_LIBRARY_DIR LLVM_SYSPATH
8789
```
8890

89-
## Running tests
91+
## 运行测试
9092

9193
安装完成后可以在后端目录下运行测试:
9294
```shell
9395
cd third_party/backendxxx/python/test
9496
python3 -m pytest -s
9597
```
9698

97-
## Contributing
99+
## 关于贡献
98100

99101
欢迎参与 FlagTree 的开发并贡献代码,详情请参考[CONTRIBUTING.md](/CONTRIBUTING_cn.md)
100102

101-
## License
103+
## 许可证
102104

103105
FlagTree 使用 [MIT license](/LICENSE)

0 commit comments

Comments
 (0)