Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/aipu-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [ "triton_v3.3.x" ]
pull_request:
branches: [ "triton_v3.3.x" ]
workflow_call:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand All @@ -24,6 +25,8 @@ jobs:
- name: Checkout code (attempt 1)
id: checkout1
uses: actions/checkout@v6
with:
fetch-depth: 0
continue-on-error: true

- name: Sleep before checkout2
Expand All @@ -36,6 +39,8 @@ jobs:
id: checkout2
if: steps.checkout1.outcome == 'failure'
uses: actions/checkout@v6
with:
fetch-depth: 0
continue-on-error: true

- name: Sleep before final checkout
Expand All @@ -47,6 +52,8 @@ jobs:
- 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()
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/ascend-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [ "triton_v3.2.x" ]
pull_request:
branches: [ "triton_v3.2.x" ]
workflow_call:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand All @@ -17,6 +18,8 @@ jobs:
- name: Checkout code (attempt 1)
id: checkout1
uses: actions/checkout@v6
with:
fetch-depth: 0
continue-on-error: true

- name: Sleep before checkout2
Expand All @@ -29,6 +32,8 @@ jobs:
id: checkout2
if: steps.checkout1.outcome == 'failure'
uses: actions/checkout@v6
with:
fetch-depth: 0
continue-on-error: true

- name: Sleep before final checkout
Expand All @@ -40,6 +45,8 @@ jobs:
- 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()
Expand Down Expand Up @@ -82,3 +89,24 @@ jobs:
python3 third_party/ascend/examples/tutorials/13-matrix-multiplication-optimized-flagtree.py
python3 third_party/ascend/examples/tutorials/13-matrix-multiplication-optimized.py
python3 third_party/ascend/examples/tutorials/14-accuracy-comparison.py
python3 python/test/ops/01_vector_add/01_vector_add.py
python3 python/test/ops/abs/abs.py
python3 python/test/ops/addmm/addmm.py
python3 python/test/ops/addmm/addmm_ascend.py
python3 python/test/ops/amax/amax.py
python3 python/test/ops/amax/amax_ascend_perf.py
python3 python/test/ops/apply_rotary_pos_emb/apply_rotary_pos_emb.py
python3 python/test/ops/apply_rotary_pos_emb/apply_rotary_pos_emb_ascend.py
python3 python/test/ops/argmin/argmin.py
python3 python/test/ops/argmin/argmin_ascend_perf.py
python3 python/test/ops/bmm/bmm_ascend.py
python3 python/test/ops/cumsum/cumsum.py
python3 python/test/ops/min_dim/min_dim.py
python3 python/test/ops/min_dim/min_dim_ascend_perf.py
python3 python/test/ops/sum_dim/sum_dim.py
python3 python/test/ops/varmean/var_mean_ascend.py
python3 -m pytest third_party/ascend/examples/pytest_ut --ignore=third_party/ascend/examples/pytest_ut/test_index_select.py \
--ignore=third_party/ascend/examples/pytest_ut/test_linearize_permute.py \
--ignore=third_party/ascend/examples/pytest_ut/test_logical_and.py \
--ignore=third_party/ascend/examples/pytest_ut/test_logical_or.py \
--ignore=third_party/ascend/examples/pytest_ut/test_triton_unified_attention.py
1 change: 1 addition & 0 deletions .github/workflows/cambricon-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_call:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down
82 changes: 82 additions & 0 deletions .github/workflows/enflame-build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Enflame-Build-And-Test

on:
push:
branches: [ "triton_v3.3.x" ]
pull_request:
branches: [ "triton_v3.3.x" ]
workflow_call:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
enflame-build-and-test:
runs-on: enflame
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: ./.github/actions/check-docs-only

- 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
1 change: 1 addition & 0 deletions .github/workflows/hcu-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_call:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down
159 changes: 159 additions & 0 deletions .github/workflows/hopper-build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
name: Hopper-Build-And-Test

on:
schedule:
- cron: '0 21 * * *'
push:
branches: [ "triton_v3.4.x", "triton_v3.5.x" ]
pull_request:
branches: [ "triton_v3.4.x", "triton_v3.5.x" ]
workflow_call:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
hopper-build-and-test:
runs-on: hopper
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: ./.github/actions/check-docs-only

- 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 NVidia (triton_v3.4.x branch)
if: ${{ steps.check_files.outputs.only_docs_changed != 'true' && env.TARGET_BRANCH == 'triton_v3.4.x' }}
shell: bash
run: |
set -x
pip uninstall -y triton
source ~/env-3.4.sh
MAX_JOBS=32 python3 -m pip install . --no-build-isolation

- name: FlagTree Build on NVidia (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
pip uninstall -y triton
source ~/env-3.5.sh
MAX_JOBS=32 python3 -m pip install . --no-build-isolation

- name: FlagTree Test on NVidia (triton_v3.4.x branch)
if: ${{ steps.check_files.outputs.only_docs_changed != 'true' && env.TARGET_BRANCH == 'triton_v3.4.x' }}
shell: bash
run: |
set -x
# python unit test
python3 -m pytest -s python/test/unit/cuda
python3 -m pytest -s python/test/unit/instrumentation
python3 -m pytest -s python/test/unit/language \
--ignore=python/test/unit/language/test_line_info.py
python3 -m pytest -s python/test/unit/runtime
if [ -d "python/test/operators" ]; then
python3 -m pytest -s python/test/operators
fi

- name: FlagTree Test on NVidia (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
source ~/env.sh
# python tutorials
python3 python/tutorials/01-vector-add.py --only_unit_test
python3 python/tutorials/02-fused-softmax.py --only_unit_test
python3 python/tutorials/03-matrix-multiplication.py --only_unit_test
python3 python/tutorials/04-low-memory-dropout.py --only_unit_test
python3 python/tutorials/05-layer-norm.py --only_unit_test
python3 python/tutorials/06-fused-attention.py --only_unit_test
python3 python/tutorials/07-extern-functions.py --only_unit_test
python3 python/tutorials/08-grouped-gemm.py --only_unit_test
python3 python/tutorials/09-persistent-matmul.py --only_unit_test
python3 python/tutorials/11-programmatic-dependent-launch.py --only_unit_test
# python unit test
python3 -m pytest -s python/test/unit/cuda
python3 -m pytest -s python/test/unit/instrumentation
python3 -m pytest -s python/test/unit/language \
--ignore=python/test/unit/language/test_line_info.py
python3 -m pytest -s python/test/unit/runtime
if [ -d "python/test/operators" ]; then
python3 -m pytest -s python/test/operators
fi
# flagtree tle
# python tutorials
python3 python/tutorials/tle/01-sparse-mla.py
# python unit test
python3 -m pytest -s python/test/tle/integration
python3 -m pytest -s python/test/tle/unit
# flagtree hints
# python tutorials
python3 python/tutorials/hints/01/01-vector-add.py --only_unit_test
# python3 python/tutorials/hints/02/02-fused-softmax.py --only_unit_test
python3 python/tutorials/hints/03/03-matrix-multiplication.py --only_unit_test
python3 python/tutorials/hints/04/04-low-memory-dropout.py --only_unit_test
python3 python/tutorials/hints/05/05-layer-norm.py --only_unit_test
python3 python/tutorials/hints/06/06-fused-attention.py --only_unit_test
python3 python/tutorials/hints/07/07-extern-functions.py --only_unit_test
python3 python/tutorials/hints/08/08-grouped-gemm.py --only_unit_test
python3 python/tutorials/hints/11/11-programmatic-dependent-launch.py --only_unit_test
# flagtree tle raw
# python3 python/tutorials/tle/raw/01-vector-add.py
# python3 python/tutorials/tle/raw/02-fused-softmax.py
# python3 python/tutorials/tle/raw/03-matrix-multiplication.py
3 changes: 2 additions & 1 deletion .github/workflows/iluvatar-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_call:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down Expand Up @@ -79,7 +80,7 @@ jobs:
run: |
set -x
source ~/env.sh
python3 -m pytest -s third_party/iluvatar/python/test/unit
CUDA_VISIBLE_DEVICES=15 python3 -m pytest -s third_party/iluvatar/python/test/unit
./python/build/cmake.linux-x86_64-cpython-3.10/bin/triton-opt --pass-pipeline='builtin.module(convert-triton-to-tritongpu{target="cuda:CC" num-warps=4 threads-per-warp=32 num-ctas=1})' ./test/bin/iluvatar/add_kernel.ttir
./python/build/cmake.linux-x86_64-cpython-3.10/bin/triton-opt --convert-arith-to-llvm ./test/bin/iluvatar/add_kernel.ttgir
cd python/tutorials
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/metax-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_call:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/mthreads-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_call:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/nv-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
branches: [ "main", "triton_v3.2.x", "triton_v3.3.x", "triton_v3.4.x", "triton_v3.5.x" ]
pull_request:
branches: [ "main", "triton_v3.2.x", "triton_v3.3.x", "triton_v3.4.x", "triton_v3.5.x" ]
workflow_call:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down
Loading
Loading