Skip to content

Commit ecde17e

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

File tree

3 files changed

+319
-0
lines changed

3 files changed

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

0 commit comments

Comments
 (0)