Skip to content

[CI] Update enflame-gcu300 runner environment (#440) #313

[CI] Update enflame-gcu300 runner environment (#440)

[CI] Update enflame-gcu300 runner environment (#440) #313

name: Tsingmicro-Build-And-Test
on:
push:
branches: [ "triton_v3.3.x" ]
pull_request:
branches: [ "triton_v3.3.x" ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
tsingmicro-build-and-test:
runs-on: flagtree-tsingmicro
if: ${{ github.repository == 'FlagTree/flagtree' || github.repository == 'flagos-ai/flagtree' }}
steps:
- name: Setup environment
shell: bash
run: |
source ~/env.sh
env | grep -E '^(http_proxy|https_proxy|all_proxy|no_proxy)=' >> $GITHUB_ENV || true
- name: Checkout code (attempt 1)
id: checkout1
uses: actions/checkout@v6
with:
fetch-depth: 0
continue-on-error: true
- name: Sleep before checkout2
if: steps.checkout1.outcome == 'failure'
run: |
echo "First checkout attempt failed. Sleeping for 120 seconds before retry..."
sleep 120
- name: Checkout code (attempt 2)
id: checkout2
if: steps.checkout1.outcome == 'failure'
uses: actions/checkout@v6
with:
fetch-depth: 0
continue-on-error: true
- name: Sleep before final checkout
if: steps.checkout1.outcome == 'failure' && steps.checkout2.outcome == 'failure'
run: |
echo "Second checkout attempt failed. Sleeping for 180 seconds before final retry..."
sleep 180
- name: Checkout code (final attempt)
if: steps.checkout1.outcome == 'failure' && steps.checkout2.outcome == 'failure'
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Verify checkout success
if: success()
run: echo "Checkout completed successfully"
- name: Check if only docs files changed
id: check_files
uses: flagos-ai/FlagTree/.github/actions/check-docs-only@main
- name: FlagTree Build on Tsingmicro
if: steps.check_files.outputs.only_docs_changed != 'true'
shell: bash
run: |
set -x
source ~/env.sh
export FLAGTREE_BACKEND=tsingmicro
cd python
python3 -m pip install . --no-build-isolation
- name: FlagTree Test on Tsingmicro
if: steps.check_files.outputs.only_docs_changed != 'true'
shell: bash
run: |
set -x
source ~/env.sh
export TX8_DEPS_ROOT=~/.flagtree/tsingmicro/tx8_deps
export LLVM_SYSPATH=~/.flagtree/tsingmicro/tsingmicro-llvm21-glibc2.30-glibcxx3.4.28-python3.10-x64
export LLVM_BINARY_DIR=${LLVM_SYSPATH}/bin
export PYTHONPATH=${LLVM_SYSPATH}/python_packages/mlir_core:$PYTHONPATH
export LD_LIBRARY_PATH=$TX8_DEPS_ROOT/lib:$LD_LIBRARY_PATH
# tsingmicro
pushd third_party/tsingmicro/examples
python3 bare_matmul_autotune.py >result-bare_matmul_autotune.txt
python3 embedding.py >result-embedding.txt
python3 mult_ir.py >result-mult_ir.txt
python3 profile_matmul.py >result-profile_matmul.txt
python3 quant_gptq.py >result-quant_gptq.txt
python3 test_cos.py >result-test_cos.txt
python3 test_embedding.py >result-test_embedding.txt
python3 test_flip.py >result-test_flip.txt
python3 test_layernorm.py >result-test_layernorm.txt
python3 test_matmul.py >result-test_matmul.txt
python3 test_print.py >result-test_print.txt
python3 test_softmax.py >result-test_softmax.txt
python3 test_vec_add.py >result-test_vec_add.txt
python3 time1.py >result-time1.txt
popd
# tle on tsingmicro
pushd third_party/tsingmicro/examples/tle
python3 test_tle_dsa_noc_gemm_4096.py >result-noc_gemm.txt
popd