From 0f3bcdb7ee8e7f53aa2224fa4cd494cacc55a9bc Mon Sep 17 00:00:00 2001 From: zhengyang Date: Fri, 13 Mar 2026 15:21:59 +0800 Subject: [PATCH 1/9] [CI] Update enflame-gcu400 ci runner --- .../enflame-gcu300-build-and-test.yml | 81 +++++++++++++++++++ ....yml => enflame-gcu400-build-and-test.yml} | 24 ++++-- 2 files changed, 99 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/enflame-gcu300-build-and-test.yml rename .github/workflows/{enflame-build-and-test.yml => enflame-gcu400-build-and-test.yml} (77%) diff --git a/.github/workflows/enflame-gcu300-build-and-test.yml b/.github/workflows/enflame-gcu300-build-and-test.yml new file mode 100644 index 0000000000..e03c307dd6 --- /dev/null +++ b/.github/workflows/enflame-gcu300-build-and-test.yml @@ -0,0 +1,81 @@ +name: Enflame-GCU300-Build-And-Test + +on: + push: + branches: [ "triton_v3.3.x", "triton_v3.5.x" ] + pull_request: + branches: [ "triton_v3.3.x" , "triton_v3.5.x"] + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + enflame-gcu300-build-and-test: + runs-on: enflame-gcu300 + 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 Enflame + if: steps.check_files.outputs.only_docs_changed != 'true' + shell: bash + run: | + set -x + pip uninstall -y triton + pip uninstall -y triton_gcu + export FLAGTREE_BACKEND=enflame + cd python + MAX_JOBS=32 python3 -m pip install . --no-build-isolation + + - name: FlagTree Test on Enflame + if: steps.check_files.outputs.only_docs_changed != 'true' + shell: bash + run: | + set -x + python3 -m pytest -s third_party/enflame/python/test/unit diff --git a/.github/workflows/enflame-build-and-test.yml b/.github/workflows/enflame-gcu400-build-and-test.yml similarity index 77% rename from .github/workflows/enflame-build-and-test.yml rename to .github/workflows/enflame-gcu400-build-and-test.yml index 1eb86c4b5c..8d76c923d7 100644 --- a/.github/workflows/enflame-build-and-test.yml +++ b/.github/workflows/enflame-gcu400-build-and-test.yml @@ -1,4 +1,4 @@ -name: Enflame-Build-And-Test +name: Enflame-GCU400-Build-And-Test on: push: @@ -11,8 +11,8 @@ concurrency: cancel-in-progress: true jobs: - enflame-build-and-test: - runs-on: enflame-3.5 + enflame-gcu400-build-and-test: + runs-on: enflame-gcu400 if: ${{ github.repository == 'FlagTree/flagtree' || github.repository == 'flagos-ai/flagtree' }} steps: - name: Setup environment @@ -23,7 +23,9 @@ jobs: - name: Checkout code (attempt 1) id: checkout1 - uses: actions/checkout@v5 + uses: actions/checkout@v6 + with: + fetch-depth: 0 continue-on-error: true - name: Sleep before checkout2 @@ -35,7 +37,9 @@ jobs: - name: Checkout code (attempt 2) id: checkout2 if: steps.checkout1.outcome == 'failure' - uses: actions/checkout@v5 + uses: actions/checkout@v6 + with: + fetch-depth: 0 continue-on-error: true - name: Sleep before final checkout @@ -46,13 +50,20 @@ jobs: - name: Checkout code (final attempt) if: steps.checkout1.outcome == 'failure' && steps.checkout2.outcome == 'failure' - uses: actions/checkout@v5 + 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 Enflame + if: steps.check_files.outputs.only_docs_changed != 'true' shell: bash run: | set -x @@ -62,6 +73,7 @@ jobs: MAX_JOBS=32 python3 -m pip install . --no-build-isolation --break-system-packages - name: FlagTree Test on Enflame + if: steps.check_files.outputs.only_docs_changed != 'true' shell: bash run: | set -x From df0b06abc8e53e1528c9a77084d930af411eae5b Mon Sep 17 00:00:00 2001 From: zhengyang Date: Fri, 13 Mar 2026 15:44:23 +0800 Subject: [PATCH 2/9] [CI] Update enflame-gcu400 ci runner --- .../workflows/enflame-gcu300-build-and-test.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/enflame-gcu300-build-and-test.yml b/.github/workflows/enflame-gcu300-build-and-test.yml index e03c307dd6..ad5bd89cf9 100644 --- a/.github/workflows/enflame-gcu300-build-and-test.yml +++ b/.github/workflows/enflame-gcu300-build-and-test.yml @@ -62,8 +62,8 @@ jobs: id: check_files uses: flagos-ai/FlagTree/.github/actions/check-docs-only@main - - name: FlagTree Build on Enflame - if: steps.check_files.outputs.only_docs_changed != 'true' + - name: FlagTree Build on Enflame (triton_v3.3.x branch) + if: ${{ steps.check_files.outputs.only_docs_changed != 'true' && env.TARGET_BRANCH == 'triton_v3.3.x' }} shell: bash run: | set -x @@ -73,6 +73,16 @@ jobs: cd python MAX_JOBS=32 python3 -m pip install . --no-build-isolation + - name: FlagTree Build on Enflame (triton_v3.5.x branch) + if: ${{ steps.check_files.outputs.only_docs_changed != 'true' && env.TARGET_BRANCH == 'triton_v3.5.x' }} + shell: bash + run: | + set -x + python3 -m pip uninstall -y triton + python3 -m pip uninstall -y triton_gcu + export FLAGTREE_BACKEND=enflame + MAX_JOBS=32 python3 -m pip install . --no-build-isolation + - name: FlagTree Test on Enflame if: steps.check_files.outputs.only_docs_changed != 'true' shell: bash From 277f3a7970cd471243adf12c7a9a559d3d8ad90f Mon Sep 17 00:00:00 2001 From: "baoqi.liu" Date: Fri, 13 Mar 2026 16:53:43 +0800 Subject: [PATCH 3/9] offline case due to old version --- .../language/{test_compile_errors.py => test_compile_errors.bk} | 0 .../unit/language/{test_conversions.py => test_conversions.bk} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename third_party/enflame/python/test/unit/language/{test_compile_errors.py => test_compile_errors.bk} (100%) rename third_party/enflame/python/test/unit/language/{test_conversions.py => test_conversions.bk} (100%) diff --git a/third_party/enflame/python/test/unit/language/test_compile_errors.py b/third_party/enflame/python/test/unit/language/test_compile_errors.bk similarity index 100% rename from third_party/enflame/python/test/unit/language/test_compile_errors.py rename to third_party/enflame/python/test/unit/language/test_compile_errors.bk diff --git a/third_party/enflame/python/test/unit/language/test_conversions.py b/third_party/enflame/python/test/unit/language/test_conversions.bk similarity index 100% rename from third_party/enflame/python/test/unit/language/test_conversions.py rename to third_party/enflame/python/test/unit/language/test_conversions.bk From 1704594340d20b55458ea1b89b433df6a87e17eb Mon Sep 17 00:00:00 2001 From: "baoqi.liu" Date: Mon, 16 Mar 2026 10:14:33 +0800 Subject: [PATCH 4/9] offline invalid test --- .../test/unit/language/{test_line_info.py => test_line_info.bk} | 0 .../python/test/unit/runtime/{test_cache.py => test_cache.bk} | 0 .../python/test/unit/runtime/{test_driver.py => test_driver.bk} | 0 .../python/test/unit/runtime/{test_launch.py => test_launch.bk} | 0 4 files changed, 0 insertions(+), 0 deletions(-) rename third_party/enflame/python/test/unit/language/{test_line_info.py => test_line_info.bk} (100%) rename third_party/enflame/python/test/unit/runtime/{test_cache.py => test_cache.bk} (100%) rename third_party/enflame/python/test/unit/runtime/{test_driver.py => test_driver.bk} (100%) rename third_party/enflame/python/test/unit/runtime/{test_launch.py => test_launch.bk} (100%) diff --git a/third_party/enflame/python/test/unit/language/test_line_info.py b/third_party/enflame/python/test/unit/language/test_line_info.bk similarity index 100% rename from third_party/enflame/python/test/unit/language/test_line_info.py rename to third_party/enflame/python/test/unit/language/test_line_info.bk diff --git a/third_party/enflame/python/test/unit/runtime/test_cache.py b/third_party/enflame/python/test/unit/runtime/test_cache.bk similarity index 100% rename from third_party/enflame/python/test/unit/runtime/test_cache.py rename to third_party/enflame/python/test/unit/runtime/test_cache.bk diff --git a/third_party/enflame/python/test/unit/runtime/test_driver.py b/third_party/enflame/python/test/unit/runtime/test_driver.bk similarity index 100% rename from third_party/enflame/python/test/unit/runtime/test_driver.py rename to third_party/enflame/python/test/unit/runtime/test_driver.bk diff --git a/third_party/enflame/python/test/unit/runtime/test_launch.py b/third_party/enflame/python/test/unit/runtime/test_launch.bk similarity index 100% rename from third_party/enflame/python/test/unit/runtime/test_launch.py rename to third_party/enflame/python/test/unit/runtime/test_launch.bk From ba20739a207d75a40deccab1a951ede85b88b945 Mon Sep 17 00:00:00 2001 From: "baoqi.liu" Date: Mon, 16 Mar 2026 10:26:17 +0800 Subject: [PATCH 5/9] offline annotation --- .../unit/language/{test_annotations.py => test_annotations.bk} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename third_party/enflame/python/test/unit/language/{test_annotations.py => test_annotations.bk} (100%) diff --git a/third_party/enflame/python/test/unit/language/test_annotations.py b/third_party/enflame/python/test/unit/language/test_annotations.bk similarity index 100% rename from third_party/enflame/python/test/unit/language/test_annotations.py rename to third_party/enflame/python/test/unit/language/test_annotations.bk From 514cebc8668ef33dc94fbbf4f9e42fe4e200978f Mon Sep 17 00:00:00 2001 From: "baoqi.liu" Date: Mon, 16 Mar 2026 11:35:44 +0800 Subject: [PATCH 6/9] offline test --- .../test/unit/runtime/{test_bindings.py => test_bindings.bk} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename third_party/enflame/python/test/unit/runtime/{test_bindings.py => test_bindings.bk} (100%) diff --git a/third_party/enflame/python/test/unit/runtime/test_bindings.py b/third_party/enflame/python/test/unit/runtime/test_bindings.bk similarity index 100% rename from third_party/enflame/python/test/unit/runtime/test_bindings.py rename to third_party/enflame/python/test/unit/runtime/test_bindings.bk From 9105aac962e4e4c121413378ce7de593d139a831 Mon Sep 17 00:00:00 2001 From: "baoqi.liu" Date: Mon, 16 Mar 2026 13:48:46 +0800 Subject: [PATCH 7/9] revert offline cases --- .../unit/language/{test_annotations.bk => test_annotations.py} | 0 .../language/{test_compile_errors.bk => test_compile_errors.py} | 0 .../unit/language/{test_conversions.bk => test_conversions.py} | 0 .../test/unit/language/{test_line_info.bk => test_line_info.py} | 0 .../test/unit/runtime/{test_bindings.bk => test_bindings.py} | 0 .../python/test/unit/runtime/{test_cache.bk => test_cache.py} | 0 .../python/test/unit/runtime/{test_driver.bk => test_driver.py} | 0 .../python/test/unit/runtime/{test_launch.bk => test_launch.py} | 0 8 files changed, 0 insertions(+), 0 deletions(-) rename third_party/enflame/python/test/unit/language/{test_annotations.bk => test_annotations.py} (100%) rename third_party/enflame/python/test/unit/language/{test_compile_errors.bk => test_compile_errors.py} (100%) rename third_party/enflame/python/test/unit/language/{test_conversions.bk => test_conversions.py} (100%) rename third_party/enflame/python/test/unit/language/{test_line_info.bk => test_line_info.py} (100%) rename third_party/enflame/python/test/unit/runtime/{test_bindings.bk => test_bindings.py} (100%) rename third_party/enflame/python/test/unit/runtime/{test_cache.bk => test_cache.py} (100%) rename third_party/enflame/python/test/unit/runtime/{test_driver.bk => test_driver.py} (100%) rename third_party/enflame/python/test/unit/runtime/{test_launch.bk => test_launch.py} (100%) diff --git a/third_party/enflame/python/test/unit/language/test_annotations.bk b/third_party/enflame/python/test/unit/language/test_annotations.py similarity index 100% rename from third_party/enflame/python/test/unit/language/test_annotations.bk rename to third_party/enflame/python/test/unit/language/test_annotations.py diff --git a/third_party/enflame/python/test/unit/language/test_compile_errors.bk b/third_party/enflame/python/test/unit/language/test_compile_errors.py similarity index 100% rename from third_party/enflame/python/test/unit/language/test_compile_errors.bk rename to third_party/enflame/python/test/unit/language/test_compile_errors.py diff --git a/third_party/enflame/python/test/unit/language/test_conversions.bk b/third_party/enflame/python/test/unit/language/test_conversions.py similarity index 100% rename from third_party/enflame/python/test/unit/language/test_conversions.bk rename to third_party/enflame/python/test/unit/language/test_conversions.py diff --git a/third_party/enflame/python/test/unit/language/test_line_info.bk b/third_party/enflame/python/test/unit/language/test_line_info.py similarity index 100% rename from third_party/enflame/python/test/unit/language/test_line_info.bk rename to third_party/enflame/python/test/unit/language/test_line_info.py diff --git a/third_party/enflame/python/test/unit/runtime/test_bindings.bk b/third_party/enflame/python/test/unit/runtime/test_bindings.py similarity index 100% rename from third_party/enflame/python/test/unit/runtime/test_bindings.bk rename to third_party/enflame/python/test/unit/runtime/test_bindings.py diff --git a/third_party/enflame/python/test/unit/runtime/test_cache.bk b/third_party/enflame/python/test/unit/runtime/test_cache.py similarity index 100% rename from third_party/enflame/python/test/unit/runtime/test_cache.bk rename to third_party/enflame/python/test/unit/runtime/test_cache.py diff --git a/third_party/enflame/python/test/unit/runtime/test_driver.bk b/third_party/enflame/python/test/unit/runtime/test_driver.py similarity index 100% rename from third_party/enflame/python/test/unit/runtime/test_driver.bk rename to third_party/enflame/python/test/unit/runtime/test_driver.py diff --git a/third_party/enflame/python/test/unit/runtime/test_launch.bk b/third_party/enflame/python/test/unit/runtime/test_launch.py similarity index 100% rename from third_party/enflame/python/test/unit/runtime/test_launch.bk rename to third_party/enflame/python/test/unit/runtime/test_launch.py From 22e67e06cfe31f451265342f0cc1d2689a869bc5 Mon Sep 17 00:00:00 2001 From: zhengyang Date: Tue, 17 Mar 2026 18:42:37 +0800 Subject: [PATCH 8/9] [CI] Update enflame-gcu300 runner environment --- .../workflows/enflame-gcu300-build-and-test.yml | 12 ++++++++++++ .../workflows/enflame-gcu400-build-and-test.yml | 16 ++++++++++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/.github/workflows/enflame-gcu300-build-and-test.yml b/.github/workflows/enflame-gcu300-build-and-test.yml index ad5bd89cf9..0914105144 100644 --- a/.github/workflows/enflame-gcu300-build-and-test.yml +++ b/.github/workflows/enflame-gcu300-build-and-test.yml @@ -62,6 +62,18 @@ jobs: id: check_files uses: flagos-ai/FlagTree/.github/actions/check-docs-only@main + - name: Detect Target Branch + shell: bash + run: | + set -x + if [ "${{ github.event_name }}" = "pull_request" ]; then + TARGET_BRANCH="${{ github.base_ref }}" + else + TARGET_BRANCH="${{ github.ref_name }}" + fi + echo "TARGET_BRANCH=$TARGET_BRANCH" >> $GITHUB_ENV + echo "TARGET_BRANCH=$TARGET_BRANCH" + - name: FlagTree Build on Enflame (triton_v3.3.x branch) if: ${{ steps.check_files.outputs.only_docs_changed != 'true' && env.TARGET_BRANCH == 'triton_v3.3.x' }} shell: bash diff --git a/.github/workflows/enflame-gcu400-build-and-test.yml b/.github/workflows/enflame-gcu400-build-and-test.yml index 8d76c923d7..e1836c57da 100644 --- a/.github/workflows/enflame-gcu400-build-and-test.yml +++ b/.github/workflows/enflame-gcu400-build-and-test.yml @@ -62,8 +62,20 @@ jobs: id: check_files uses: flagos-ai/FlagTree/.github/actions/check-docs-only@main - - name: FlagTree Build on Enflame - if: steps.check_files.outputs.only_docs_changed != 'true' + - name: Detect Target Branch + shell: bash + run: | + set -x + if [ "${{ github.event_name }}" = "pull_request" ]; then + TARGET_BRANCH="${{ github.base_ref }}" + else + TARGET_BRANCH="${{ github.ref_name }}" + fi + echo "TARGET_BRANCH=$TARGET_BRANCH" >> $GITHUB_ENV + echo "TARGET_BRANCH=$TARGET_BRANCH" + + - name: FlagTree Build on Enflame (triton_v3.5.x branch) + if: ${{ steps.check_files.outputs.only_docs_changed != 'true' && env.TARGET_BRANCH == 'triton_v3.5.x' }} shell: bash run: | set -x From 7acea8f1bbebeceaf408c205d1ad2394e782156f Mon Sep 17 00:00:00 2001 From: zhengyang Date: Tue, 17 Mar 2026 18:44:49 +0800 Subject: [PATCH 9/9] [CI] Update enflame-gcu300 runner environment --- .github/workflows/enflame-gcu300-build-and-test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/enflame-gcu300-build-and-test.yml b/.github/workflows/enflame-gcu300-build-and-test.yml index 0914105144..879c594f08 100644 --- a/.github/workflows/enflame-gcu300-build-and-test.yml +++ b/.github/workflows/enflame-gcu300-build-and-test.yml @@ -79,21 +79,21 @@ jobs: shell: bash run: | set -x - pip uninstall -y triton - pip uninstall -y triton_gcu + python3 -m pip uninstall -y triton --break-system-packages + python3 -m pip uninstall -y triton_gcu --break-system-packages export FLAGTREE_BACKEND=enflame cd python - MAX_JOBS=32 python3 -m pip install . --no-build-isolation + MAX_JOBS=32 python3 -m pip install . --no-build-isolation --break-system-packages - name: FlagTree Build on Enflame (triton_v3.5.x branch) if: ${{ steps.check_files.outputs.only_docs_changed != 'true' && env.TARGET_BRANCH == 'triton_v3.5.x' }} shell: bash run: | set -x - python3 -m pip uninstall -y triton - python3 -m pip uninstall -y triton_gcu + python3 -m pip uninstall -y triton --break-system-packages + python3 -m pip uninstall -y triton_gcu --break-system-packages export FLAGTREE_BACKEND=enflame - MAX_JOBS=32 python3 -m pip install . --no-build-isolation + MAX_JOBS=32 python3 -m pip install . --no-build-isolation --break-system-packages - name: FlagTree Test on Enflame if: steps.check_files.outputs.only_docs_changed != 'true'