diff --git a/README.md b/README.md index 68aa9d348..b9ff005f1 100644 --- a/README.md +++ b/README.md @@ -22,8 +22,9 @@ python3 -m pip install . --no-build-isolation -v 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. Complete build commands for each backend: + +[iluvatar](/third_party/iluvatar/) ```shell -# iluvatar # Recommended: Use Ubuntu 20.04 mkdir -p ~/.flagtree/iluvatar; cd ~/.flagtree/iluvatar wget https://github.com/FlagTree/flagtree/releases/download/v0.1.0-build-deps/iluvatar-llvm18-x86_64.tar.gz @@ -32,8 +33,8 @@ cd ${YOUR_CODE_DIR}/flagtree/python export FLAGTREE_BACKEND=iluvatar python3 -m pip install . --no-build-isolation -v ``` +[xpu (klx)](/third_party/xpu/) ```shell -# xpu (klx) # Recommended: Use the Docker image (22GB) https://su.bcebos.com/klx-sdk-release-public/xpytorch/docker/ubuntu2004_v030/ubuntu_2004_x86_64_v30.tar mkdir -p ~/.flagtree/xpu; cd ~/.flagtree/xpu wget https://github.com/FlagTree/flagtree/releases/download/v0.1.0-build-deps/XTDK-llvm18-ubuntu2004_x86_64.tar @@ -42,8 +43,8 @@ cd ${YOUR_CODE_DIR}/flagtree/python export FLAGTREE_BACKEND=xpu python3 -m pip install . --no-build-isolation -v ``` +[mthreads](https://github.com/FlagTree/flagtree/tree/main/third_party/mthreads/) ```shell -# mthreads # Recommended: Use the Dockerfile flagtree/dockerfiles/Dockerfile-ubuntu22.04-python3.10-mthreads mkdir -p ~/.flagtree/mthreads; cd ~/.flagtree/mthreads wget https://github.com/FlagTree/flagtree/releases/download/v0.1.0-build-deps/mthreads-llvm19-glibc2.34-glibcxx3.4.30-x64.tar.gz @@ -51,8 +52,18 @@ cd ${YOUR_CODE_DIR}/flagtree/python export FLAGTREE_BACKEND=mthreads python3 -m pip install . --no-build-isolation -v ``` +[aipu (arm npu)](https://github.com/FlagTree/flagtree/tree/triton_v3.3.x/third_party/aipu/) +```shell +# Recommended: Use Ubuntu 20.04 +mkdir -p ~/.flagtree/aipu; cd ~/.flagtree/aipu +wget https://oaitriton.blob.core.windows.net/public/llvm-builds/llvm-a66376b0-ubuntu-x64.tar.gz +cd ${YOUR_CODE_DIR}/flagtree/ +git checkout -b triton_v3.3.x origin/triton_v3.3.x +export FLAGTREE_BACKEND=aipu +python3 -m pip install . --no-build-isolation -v +``` +[tsingmicro](https://github.com/FlagTree/flagtree/tree/triton_v3.3.x/third_party/tsingmicro/) ```shell -# tsingmicro # Recommended: Use Ubuntu 20.04 mkdir -p ~/.flagtree/tsingmicro; cd ~/.flagtree/tsingmicro wget https://github.com/FlagTree/flagtree/releases/download/v0.2.0-build-deps/tsingmicro-llvm21-glibc2.35-glibcxx3.4.30-x64.tar.gz diff --git a/README_cn.md b/README_cn.md index 11d9b2358..d91344336 100644 --- a/README_cn.md +++ b/README_cn.md @@ -22,8 +22,9 @@ python3 -m pip install . --no-build-isolation -v 自动下载依赖库的速度可能受限于网络环境,编译前可自行下载至缓存目录 ~/.flagtree(可通过环境变量 FLAGTREE_CACHE_DIR 修改),无需自行设置 LLVM_BUILD_DIR 等环境变量。 各后端完整编译命令如下: + +[iluvatar](/third_party/iluvatar/) ```shell -# iluvatar # 推荐使用镜像 Ubuntu 20.04 mkdir -p ~/.flagtree/iluvatar; cd ~/.flagtree/iluvatar wget https://github.com/FlagTree/flagtree/releases/download/v0.1.0-build-deps/iluvatar-llvm18-x86_64.tar.gz @@ -32,8 +33,8 @@ cd ${YOUR_CODE_DIR}/flagtree/python export FLAGTREE_BACKEND=iluvatar python3 -m pip install . --no-build-isolation -v ``` +[xpu (klx)](/third_party/xpu/) ```shell -# xpu (klx) # 推荐使用镜像(22GB)https://su.bcebos.com/klx-sdk-release-public/xpytorch/docker/ubuntu2004_v030/ubuntu_2004_x86_64_v30.tar mkdir -p ~/.flagtree/xpu; cd ~/.flagtree/xpu wget https://github.com/FlagTree/flagtree/releases/download/v0.1.0-build-deps/XTDK-llvm18-ubuntu2004_x86_64.tar @@ -42,8 +43,8 @@ cd ${YOUR_CODE_DIR}/flagtree/python export FLAGTREE_BACKEND=xpu python3 -m pip install . --no-build-isolation -v ``` +[mthreads](https://github.com/FlagTree/flagtree/tree/main/third_party/mthreads/) ```shell -# mthreads # 推荐使用镜像 flagtree/dockerfiles/Dockerfile-ubuntu22.04-python3.10-mthreads mkdir -p ~/.flagtree/mthreads; cd ~/.flagtree/mthreads wget https://github.com/FlagTree/flagtree/releases/download/v0.1.0-build-deps/mthreads-llvm19-glibc2.34-glibcxx3.4.30-x64.tar.gz @@ -51,8 +52,18 @@ cd ${YOUR_CODE_DIR}/flagtree/python export FLAGTREE_BACKEND=mthreads python3 -m pip install . --no-build-isolation -v ``` +[aipu (arm npu)](https://github.com/FlagTree/flagtree/tree/triton_v3.3.x/third_party/aipu/) +```shell +# 推荐使用镜像 Ubuntu 20.04 +mkdir -p ~/.flagtree/aipu; cd ~/.flagtree/aipu +wget https://oaitriton.blob.core.windows.net/public/llvm-builds/llvm-a66376b0-ubuntu-x64.tar.gz +cd ${YOUR_CODE_DIR}/flagtree/ +git checkout -b triton_v3.3.x origin/triton_v3.3.x +export FLAGTREE_BACKEND=aipu +python3 -m pip install . --no-build-isolation -v +``` +[tsingmicro](https://github.com/FlagTree/flagtree/tree/triton_v3.3.x/third_party/tsingmicro/) ```shell -# tsingmicro # 推荐使用镜像 Ubuntu 20.04 mkdir -p ~/.flagtree/tsingmicro; cd ~/.flagtree/tsingmicro wget https://github.com/FlagTree/flagtree/releases/download/v0.2.0-build-deps/tsingmicro-llvm21-glibc2.35-glibcxx3.4.30-x64.tar.gz diff --git a/python/setup_helper.py b/python/setup_helper.py index fc01e7627..ad05866b2 100644 --- a/python/setup_helper.py +++ b/python/setup_helper.py @@ -375,6 +375,15 @@ def check_env(env_val): post_hock=set_llvm_env, ) +# aipu +cache.store( + file="aipu-llvm-a66376b0-ubuntu-x64", + condition=("aipu" == flagtree_backend), + url="https://oaitriton.blob.core.windows.net/public/llvm-builds/llvm-a66376b0-ubuntu-x64.tar.gz", + pre_hock=lambda: check_env('LLVM_SYSPATH'), + post_hock=set_llvm_env, +) + # tsingmicro cache.store( file="tsingmicro-llvm21-glibc2.35-glibcxx3.4.30-x64",