User manual for enflame - flagos-ai/FlagTree GitHub Wiki

💫 Enflame(燧原)enflame3.6

  • Based on Triton 3.6, x64
  • Available for GCU300 (S60), GCU400 (L300/L600)

1. Quick start

1.1 Use the image (GCU300|GCU400)

Tips: You can use apt install aria2; aria2c -c ... instead of wget ... to download large files with resume support.

# GCU300
IMAGE=harbor.baai.ac.cn/flagtree/flagtree-enflame-py312-gcu300-1.9.29-ubuntu24.04:202610-3.6-torch2.11.0-vllm0.24.0
## GCU300 Plan A: docker pull (21.9GB)
docker pull ${IMAGE}
## GCU300 Plan B: docker load (4.1GB)
wget https://baai-cp-web.ks3-cn-beijing.ksyuncs.com/trans/flagtree-enflame-py312-gcu300-1.9.29-ubuntu24.04.202610-3.6-torch2.11.0-vllm0.24.0.tar.gz
docker load -i flagtree-enflame-py312-gcu300-1.9.29-ubuntu24.04.202610-3.6-torch2.11.0-vllm0.24.0.tar.gz
# GCU400
IMAGE=harbor.baai.ac.cn/flagtree/flagtree-enflame-py312-gcu400-1.10.25-ubuntu24.04:202610-3.6-torch2.11.0-vllm0.24.0
## GCU400 Plan A: docker pull (23.4GB)
docker pull ${IMAGE}
## GCU400 Plan B: docker load (4.4GB)
wget https://baai-cp-web.ks3-cn-beijing.ksyuncs.com/trans/flagtree-enflame-py312-gcu400-1.10.25-ubuntu24.04.202610-3.6-torch2.11.0-vllm0.24.0.tar.gz
docker load -i flagtree-enflame-py312-gcu400-1.10.25-ubuntu24.04.202610-3.6-torch2.11.0-vllm0.24.0.tar.gz
# host
efsmi
cat /sys/module/enflame/version  # GCU300: 1.9.29, GCU400: 1.10.25

CONTAINER=flagtree-dev-xxx
docker run -dit \
    --privileged \
    -v /etc/localtime:/etc/localtime:ro \
    -v /home:/home -v /data:/data \
    -w /root --name ${CONTAINER} ${IMAGE} bash
docker exec -it ${CONTAINER} /bin/bash

# container
dpkg -s triton-gcu  # GCU300: 1.9.29, GCU400: 1.10.25

1.2 Source-free Installation

# Note: First install PyTorch, then execute the following commands
python3 -m pip uninstall -y triton --break-system-packages  # Repeat the cmd until fully uninstalled
RES="--index-url=https://resource.flagos.net/repository/flagos-pypi-hosted/simple"
python3.12 -m pip install flagtree===0.7.0+enflame3.6 --break-system-packages $RES

2. Build from Source

2.1 Manually download the FlagTree dependencies

If your network connection is available, you do not need to download the dependencies which will be fetched automatically during the build.

mkdir -p ~/.flagtree/enflame; cd ~/.flagtree/enflame
wget https://baai-cp-web.ks3-cn-beijing.ksyuncs.com/trans/enflame-llvm23-fc83c68-gcc9-x64_v0.4.0.tar.gz
tar zxvf enflame-llvm23-fc83c68-gcc9-x64_v0.4.0.tar.gz

2.2 Manually download the Triton dependencies

The Triton dependencies are already downloaded and installed in the image. If your network connection is available, you do not need to download the dependencies which will be fetched automatically during the build.

cd ${YOUR_CODE_DIR}/FlagTree
# For Triton 3.6 (x64)
wget https://baai-cp-web.ks3-cn-beijing.ksyuncs.com/trans/build-deps-triton_3.6.x-linux-x64.tar.gz
sh python/scripts/unpack_triton_build_deps.sh ./build-deps-triton_3.6.x-linux-x64.tar.gz

After executing the above script, the original ~/.triton directory will be renamed, and a new ~/.triton directory will be created to store the pre-downloaded packages. Note that the script will prompt for manual confirmation during execution.

2.3 Build Commands

cd ${YOUR_CODE_DIR}/FlagTree
git checkout main
export FLAGTREE_BACKEND=enflame
MAX_JOBS=8 python3 -m pip install . --no-build-isolation -v --break-system-packages

3. Testing and validation

After installing flagtree, you can check it with:

python3 -m pip show flagtree

Refer to Tests of enflame3.6 backend


💫 Enflame(燧原)enflame3.5

  • Based on Triton 3.5, x64
  • Available for GCU300 (S60), GCU400 (L300/L600)

1. Quick start

1.1 Use the image (GCU300|GCU400)

# Plan A: docker pull (13.3GB)
IMAGE=harbor.baai.ac.cn/flagtree/flagtree-enflame3.5-py312-torch2.9.1-ubuntu24.04:202603
docker pull ${IMAGE}
# Plan B: docker load (2.8GB)
IMAGE=flagtree-enflame3.5-py312-torch2.9.1-ubuntu24.04:202603
wget https://baai-cp-web.ks3-cn-beijing.ksyuncs.com/trans/flagtree-enflame3.5-py312-torch2.9.1-ubuntu24.04.202603.tar.gz
docker load -i flagtree-enflame3.5-py312-torch2.9.1-ubuntu24.04.202603.tar.gz
# host
CONTAINER=flagtree-dev-xxx
docker run -dit \
    --privileged \
    -v /etc/localtime:/etc/localtime:ro \
    -v /home:/home \
    -w /root --name ${CONTAINER} ${IMAGE} bash
docker cp ${CONTAINER}:/enflame enflame    # Will create ./enflame dir
bash enflame/driver/enflame-x86_64-gcc-1.7.2.14-20260302150833.run
efsmi
docker stop ${CONTAINER}
docker start ${CONTAINER}
docker exec -it ${CONTAINER} /bin/bash

# container
wget https://baai-cp-web.ks3-cn-beijing.ksyuncs.com/trans/topsruntime_1.10.25-1_amd64.deb
dpkg -i topsruntime_1.10.25-1_amd64.deb    # If efsmi shows 1.10.25 on the host

1.2 Source-free Installation

# Note: First install PyTorch, then execute the following commands
python3 -m pip uninstall -y triton --break-system-packages  # Repeat the cmd until fully uninstalled
RES="--index-url=https://resource.flagos.net/repository/flagos-pypi-hosted/simple"
python3.12 -m pip install flagtree===0.5.0+enflame3.5 --break-system-packages $RES

2. Build from Source

2.1 Manually download the FlagTree dependencies

If your network connection is available, you do not need to download the dependencies which will be fetched automatically during the build.

mkdir -p ~/.flagtree/enflame; cd ~/.flagtree/enflame
wget https://baai-cp-web.ks3-cn-beijing.ksyuncs.com/trans/enflame-llvm22-189e06b-gcc9-x64_v0.4.0.tar.gz
tar zxvf enflame-llvm22-189e06b-gcc9-x64_v0.4.0.tar.gz

2.2 Manually download the Triton dependencies

The Triton dependencies are already downloaded and installed in the image. If your network connection is available, you do not need to download the dependencies which will be fetched automatically during the build.

cd ${YOUR_CODE_DIR}/FlagTree
# For Triton 3.5 (x64)
wget https://baai-cp-web.ks3-cn-beijing.ksyuncs.com/trans/build-deps-triton_3.5.x-linux-x64.tar.gz
sh python/scripts/unpack_triton_build_deps.sh ./build-deps-triton_3.5.x-linux-x64.tar.gz

After executing the above script, the original ~/.triton directory will be renamed, and a new ~/.triton directory will be created to store the pre-downloaded packages. Note that the script will prompt for manual confirmation during execution.

2.3 Build Commands

cd ${YOUR_CODE_DIR}/FlagTree
git checkout -b triton_v3.5.x origin/triton_v3.5.x
export FLAGTREE_BACKEND=enflame
MAX_JOBS=8 python3 -m pip install . --no-build-isolation -v --break-system-packages

3. Testing and validation

After installing flagtree, you can check it with:

python3 -m pip show flagtree

Refer to Tests of enflame3.5 backend


💫 Enflame(燧原)enflame3.3

  • Based on Triton 3.3, x64
  • Available for GCU300 (S60)

1. Quick start

1.1 Use the image (GCU300)

# Plan A: docker pull (12.5GB)
IMAGE=harbor.baai.ac.cn/flagtree/flagtree-enflame3.3-py310-torch2.7.0-ubuntu22.04:202603
docker pull ${IMAGE}
# Plan B: docker load (5.7GB)
IMAGE=flagtree-enflame3.3-py310-torch2.7.0-ubuntu22.04:202603
wget https://baai-cp-web.ks3-cn-beijing.ksyuncs.com/trans/flagtree-hcu-py310-torch2.9.0-ubuntu22.04.202603.tar.gz
docker load -i flagtree-hcu-py310-torch2.9.0-ubuntu22.04.202603.tar.gz
CONTAINER=flagtree-dev-xxx
docker run -dit \
    --privileged \
    -v /etc/localtime:/etc/localtime:ro \
    -v /home:/home \
    -w /root --name ${CONTAINER} ${IMAGE} bash
docker cp ${CONTAINER}:/enflame enflame    # Will create ./enflame dir
bash enflame/driver/enflame-x86_64-gcc-1.6.3.12-20251115104629.run
efsmi
docker stop ${CONTAINER}
docker start ${CONTAINER}
docker exec -it ${CONTAINER} /bin/bash

1.2 Source-free Installation

# Note: First install PyTorch, then execute the following commands
python3 -m pip uninstall -y triton  # Repeat the cmd until fully uninstalled
RES="--index-url=https://resource.flagos.net/repository/flagos-pypi-hosted/simple"
python3.10 -m pip install flagtree===0.4.0+enflame3.3 $RES

2. Build from Source

2.1 Manually download the FlagTree dependencies

If your network connection is available, you do not need to download the dependencies which will be fetched automatically during the build.

mkdir -p ~/.flagtree/enflame; cd ~/.flagtree/enflame
wget https://baai-cp-web.ks3-cn-beijing.ksyuncs.com/trans/enflame-llvm21-d752c5b-gcc9-x64_v0.3.0.tar.gz
tar zxvf enflame-llvm21-d752c5b-gcc9-x64_v0.3.0.tar.gz

2.2 Manually download the Triton dependencies

The Triton dependencies are already downloaded and installed in the image. If your network connection is available, you do not need to download the dependencies which will be fetched automatically during the build.

cd ${YOUR_CODE_DIR}/FlagTree
# For Triton 3.3 (x64)
wget https://baai-cp-web.ks3-cn-beijing.ksyuncs.com/trans/build-deps-triton_3.3.x-linux-x64.tar.gz
sh python/scripts/unpack_triton_build_deps.sh ./build-deps-triton_3.3.x-linux-x64.tar.gz

After executing the above script, the original ~/.triton directory will be renamed, and a new ~/.triton directory will be created to store the pre-downloaded packages. Note that the script will prompt for manual confirmation during execution.

2.3 Build Commands

cd ${YOUR_CODE_DIR}/FlagTree/python
git checkout -b triton_v3.3.x origin/triton_v3.3.x
export FLAGTREE_BACKEND=enflame
MAX_JOBS=8 python3 -m pip install . --no-build-isolation -v

3. Testing and validation

After installing flagtree, you can check it with:

python3 -m pip show flagtree

Refer to Tests of enflame3.3 backend

⚠️ **GitHub.com Fallback** ⚠️