Skip to content

Commit d3076bb

Browse files
committed
[CI] Add missing platform test workflow to main branch
1 parent 0f1f689 commit d3076bb

File tree

3 files changed

+322
-0
lines changed

3 files changed

+322
-0
lines changed
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Enflame-Build-And-Test
2+
3+
on:
4+
push:
5+
branches: [ "triton_v3.3.x" ]
6+
pull_request:
7+
branches: [ "triton_v3.3.x" ]
8+
workflow_call:
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
enflame-build-and-test:
16+
runs-on: enflame
17+
if: ${{ github.repository == 'FlagTree/flagtree' || github.repository == 'flagos-ai/flagtree' }}
18+
steps:
19+
- name: Setup environment
20+
shell: bash
21+
run: |
22+
source ~/env.sh
23+
env | grep -E '^(http_proxy|https_proxy|all_proxy|no_proxy)=' >> $GITHUB_ENV || true
24+
25+
- name: Checkout code (attempt 1)
26+
id: checkout1
27+
uses: actions/checkout@v6
28+
with:
29+
fetch-depth: 0
30+
continue-on-error: true
31+
32+
- name: Sleep before checkout2
33+
if: steps.checkout1.outcome == 'failure'
34+
run: |
35+
echo "First checkout attempt failed. Sleeping for 120 seconds before retry..."
36+
sleep 120
37+
38+
- name: Checkout code (attempt 2)
39+
id: checkout2
40+
if: steps.checkout1.outcome == 'failure'
41+
uses: actions/checkout@v6
42+
with:
43+
fetch-depth: 0
44+
continue-on-error: true
45+
46+
- name: Sleep before final checkout
47+
if: steps.checkout1.outcome == 'failure' && steps.checkout2.outcome == 'failure'
48+
run: |
49+
echo "Second checkout attempt failed. Sleeping for 180 seconds before final retry..."
50+
sleep 180
51+
52+
- name: Checkout code (final attempt)
53+
if: steps.checkout1.outcome == 'failure' && steps.checkout2.outcome == 'failure'
54+
uses: actions/checkout@v6
55+
with:
56+
fetch-depth: 0
57+
58+
- name: Verify checkout success
59+
if: success()
60+
run: echo "Checkout completed successfully"
61+
62+
- name: Check if only docs files changed
63+
id: check_files
64+
uses: ./.github/actions/check-docs-only
65+
66+
- name: FlagTree Build on Enflame
67+
if: steps.check_files.outputs.only_docs_changed != 'true'
68+
shell: bash
69+
run: |
70+
set -x
71+
pip uninstall -y triton
72+
pip uninstall -y triton_gcu
73+
export FLAGTREE_BACKEND=enflame
74+
cd python
75+
MAX_JOBS=32 python3 -m pip install . --no-build-isolation
76+
77+
- name: FlagTree Test on Enflame
78+
if: steps.check_files.outputs.only_docs_changed != 'true'
79+
shell: bash
80+
run: |
81+
set -x
82+
python3 -m pytest -s third_party/enflame/python/test/unit
Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
name: Hopper-Build-And-Test
2+
3+
on:
4+
schedule:
5+
- cron: '0 21 * * *'
6+
push:
7+
branches: [ "triton_v3.4.x", "triton_v3.5.x" ]
8+
pull_request:
9+
branches: [ "triton_v3.4.x", "triton_v3.5.x" ]
10+
workflow_call:
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
hopper-build-and-test:
18+
runs-on: hopper
19+
if: ${{ github.repository == 'FlagTree/flagtree' || github.repository == 'flagos-ai/flagtree' }}
20+
steps:
21+
- name: Setup environment
22+
shell: bash
23+
run: |
24+
source ~/env.sh
25+
env | grep -E '^(http_proxy|https_proxy|all_proxy|no_proxy)=' >> $GITHUB_ENV || true
26+
27+
- name: Checkout code (attempt 1)
28+
id: checkout1
29+
uses: actions/checkout@v6
30+
with:
31+
fetch-depth: 0
32+
continue-on-error: true
33+
34+
- name: Sleep before checkout2
35+
if: steps.checkout1.outcome == 'failure'
36+
run: |
37+
echo "First checkout attempt failed. Sleeping for 120 seconds before retry..."
38+
sleep 120
39+
40+
- name: Checkout code (attempt 2)
41+
id: checkout2
42+
if: steps.checkout1.outcome == 'failure'
43+
uses: actions/checkout@v6
44+
with:
45+
fetch-depth: 0
46+
continue-on-error: true
47+
48+
- name: Sleep before final checkout
49+
if: steps.checkout1.outcome == 'failure' && steps.checkout2.outcome == 'failure'
50+
run: |
51+
echo "Second checkout attempt failed. Sleeping for 180 seconds before final retry..."
52+
sleep 180
53+
54+
- name: Checkout code (final attempt)
55+
if: steps.checkout1.outcome == 'failure' && steps.checkout2.outcome == 'failure'
56+
uses: actions/checkout@v6
57+
with:
58+
fetch-depth: 0
59+
60+
- name: Verify checkout success
61+
if: success()
62+
run: echo "Checkout completed successfully"
63+
64+
- name: Check if only docs files changed
65+
id: check_files
66+
uses: ./.github/actions/check-docs-only
67+
68+
- name: Detect Target Branch
69+
shell: bash
70+
run: |
71+
set -x
72+
if [ "${{ github.event_name }}" = "pull_request" ]; then
73+
TARGET_BRANCH="${{ github.base_ref }}"
74+
else
75+
TARGET_BRANCH="${{ github.ref_name }}"
76+
fi
77+
echo "TARGET_BRANCH=$TARGET_BRANCH" >> $GITHUB_ENV
78+
echo "TARGET_BRANCH=$TARGET_BRANCH"
79+
80+
- name: FlagTree Build on NVidia (triton_v3.4.x branch)
81+
if: ${{ steps.check_files.outputs.only_docs_changed != 'true' && env.TARGET_BRANCH == 'triton_v3.4.x' }}
82+
shell: bash
83+
run: |
84+
set -x
85+
pip uninstall -y triton
86+
source ~/env-3.4.sh
87+
MAX_JOBS=32 python3 -m pip install . --no-build-isolation
88+
89+
- name: FlagTree Build on NVidia (triton_v3.5.x branch)
90+
if: ${{ steps.check_files.outputs.only_docs_changed != 'true' && env.TARGET_BRANCH == 'triton_v3.5.x' }}
91+
shell: bash
92+
run: |
93+
set -x
94+
pip uninstall -y triton
95+
source ~/env-3.5.sh
96+
MAX_JOBS=32 python3 -m pip install . --no-build-isolation
97+
98+
- name: FlagTree Test on NVidia (triton_v3.4.x branch)
99+
if: ${{ steps.check_files.outputs.only_docs_changed != 'true' && env.TARGET_BRANCH == 'triton_v3.4.x' }}
100+
shell: bash
101+
run: |
102+
set -x
103+
# python unit test
104+
python3 -m pytest -s python/test/unit/cuda
105+
python3 -m pytest -s python/test/unit/instrumentation
106+
python3 -m pytest -s python/test/unit/language \
107+
--ignore=python/test/unit/language/test_line_info.py
108+
python3 -m pytest -s python/test/unit/runtime
109+
if [ -d "python/test/operators" ]; then
110+
python3 -m pytest -s python/test/operators
111+
fi
112+
113+
- name: FlagTree Test on NVidia (triton_v3.5.x branch)
114+
if: ${{ steps.check_files.outputs.only_docs_changed != 'true' && env.TARGET_BRANCH == 'triton_v3.5.x' }}
115+
shell: bash
116+
run: |
117+
set -x
118+
source ~/env.sh
119+
# python tutorials
120+
python3 python/tutorials/01-vector-add.py --only_unit_test
121+
python3 python/tutorials/02-fused-softmax.py --only_unit_test
122+
python3 python/tutorials/03-matrix-multiplication.py --only_unit_test
123+
python3 python/tutorials/04-low-memory-dropout.py --only_unit_test
124+
python3 python/tutorials/05-layer-norm.py --only_unit_test
125+
python3 python/tutorials/06-fused-attention.py --only_unit_test
126+
python3 python/tutorials/07-extern-functions.py --only_unit_test
127+
python3 python/tutorials/08-grouped-gemm.py --only_unit_test
128+
python3 python/tutorials/09-persistent-matmul.py --only_unit_test
129+
python3 python/tutorials/11-programmatic-dependent-launch.py --only_unit_test
130+
# python unit test
131+
python3 -m pytest -s python/test/unit/cuda
132+
python3 -m pytest -s python/test/unit/instrumentation
133+
python3 -m pytest -s python/test/unit/language \
134+
--ignore=python/test/unit/language/test_line_info.py
135+
python3 -m pytest -s python/test/unit/runtime
136+
if [ -d "python/test/operators" ]; then
137+
python3 -m pytest -s python/test/operators
138+
fi
139+
# flagtree tle
140+
# python tutorials
141+
python3 python/tutorials/tle/01-sparse-mla.py
142+
# python unit test
143+
python3 -m pytest -s python/test/tle/integration
144+
python3 -m pytest -s python/test/tle/unit
145+
# flagtree hints
146+
# python tutorials
147+
python3 python/tutorials/hints/01/01-vector-add.py --only_unit_test
148+
# python3 python/tutorials/hints/02/02-fused-softmax.py --only_unit_test
149+
python3 python/tutorials/hints/03/03-matrix-multiplication.py --only_unit_test
150+
python3 python/tutorials/hints/04/04-low-memory-dropout.py --only_unit_test
151+
python3 python/tutorials/hints/05/05-layer-norm.py --only_unit_test
152+
python3 python/tutorials/hints/06/06-fused-attention.py --only_unit_test
153+
python3 python/tutorials/hints/07/07-extern-functions.py --only_unit_test
154+
python3 python/tutorials/hints/08/08-grouped-gemm.py --only_unit_test
155+
python3 python/tutorials/hints/11/11-programmatic-dependent-launch.py --only_unit_test
156+
# flagtree tle raw
157+
# python3 python/tutorials/tle/raw/01-vector-add.py
158+
# python3 python/tutorials/tle/raw/02-fused-softmax.py
159+
# python3 python/tutorials/tle/raw/03-matrix-multiplication.py
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Sunrise-Build-And-Test
2+
3+
on:
4+
push:
5+
branches: [ "triton_v3.4.x" ]
6+
pull_request:
7+
branches: [ "triton_v3.4.x" ]
8+
workflow_call:
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
sunrise-build-and-test:
16+
runs-on: sunrise
17+
if: ${{ github.repository == 'FlagTree/flagtree' || github.repository == 'flagos-ai/flagtree' }}
18+
steps:
19+
- name: Setup environment
20+
shell: bash
21+
run: |
22+
# source ~/env.sh
23+
env | grep -E '^(http_proxy|https_proxy|all_proxy|no_proxy)=' >> $GITHUB_ENV || true
24+
25+
- name: Checkout code (attempt 1)
26+
id: checkout1
27+
uses: actions/checkout@v6
28+
with:
29+
fetch-depth: 0
30+
continue-on-error: true
31+
32+
- name: Sleep before checkout2
33+
if: steps.checkout1.outcome == 'failure'
34+
run: |
35+
echo "First checkout attempt failed. Sleeping for 120 seconds before retry..."
36+
sleep 120
37+
38+
- name: Checkout code (attempt 2)
39+
id: checkout2
40+
if: steps.checkout1.outcome == 'failure'
41+
uses: actions/checkout@v6
42+
with:
43+
fetch-depth: 0
44+
continue-on-error: true
45+
46+
- name: Sleep before final checkout
47+
if: steps.checkout1.outcome == 'failure' && steps.checkout2.outcome == 'failure'
48+
run: |
49+
echo "Second checkout attempt failed. Sleeping for 180 seconds before final retry..."
50+
sleep 180
51+
52+
- name: Checkout code (final attempt)
53+
if: steps.checkout1.outcome == 'failure' && steps.checkout2.outcome == 'failure'
54+
uses: actions/checkout@v6
55+
with:
56+
fetch-depth: 0
57+
58+
- name: Verify checkout success
59+
if: success()
60+
run: echo "Checkout completed successfully"
61+
62+
- name: Check if only docs files changed
63+
id: check_files
64+
uses: ./.github/actions/check-docs-only
65+
66+
- name: FlagTree Build on Sunrise
67+
if: steps.check_files.outputs.only_docs_changed != 'true'
68+
shell: bash
69+
run: |
70+
set -x
71+
pip uninstall -y triton
72+
source third_party/sunrise/script/docker_sunrise_env.sh ~/.flagtree/sunrise/sunrise_llvm21_dev_release
73+
export FLAGTREE_BACKEND=sunrise
74+
MAX_JOBS=32 python3 -m pip install . --no-build-isolation
75+
76+
- name: FlagTree Test on Sunrise
77+
if: steps.check_files.outputs.only_docs_changed != 'true'
78+
shell: bash
79+
run: |
80+
set -x
81+
python3 third_party/sunrise/python/test_examples/vector-add.py

0 commit comments

Comments
 (0)