Skip to content

Commit 39df70e

Browse files
committed
[CI] Move tle dist test to a standalone workflow
1 parent bf12939 commit 39df70e

3 files changed

Lines changed: 108 additions & 7 deletions

File tree

.github/workflows/nvidia3.6-build-and-test.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,6 @@ jobs:
133133
--ignore=python/test/tle/unit/test_tle_distributed_d2d.py \
134134
--ignore=python/test/tle/unit/test_tle_get_local_pe.py \
135135
--ignore=python/test/tle/unit/test_tle_d2d_barrier.py
136-
CUDA_LAUNCH_BLOCKING=1 bash python/test/tle/unit/test_tle_distributed_d2d.sh
137-
CUDA_LAUNCH_BLOCKING=1 bash python/test/tle/unit/test_tle_get_local_pe.sh
138-
CUDA_LAUNCH_BLOCKING=1 bash python/test/tle/unit/test_tle_d2d_barrier.sh
139136
## flagtree hints python tutorials
140137
python3 python/tutorials/hints/01/01-vector-add.py --only_unit_test
141138
# python3 python/tutorials/hints/02/02-fused-softmax.py --only_unit_test
@@ -160,6 +157,3 @@ jobs:
160157
python3 python/tutorials/tle/raw/cuda/02-fused-softmax.py
161158
python3 python/tutorials/tle/raw/cuda/03-matrix-multiplication.py
162159
python3 python/tutorials/tle/raw/cuda/03-matrix-multiplication-smem.py
163-
## flagtree tle nvshmem
164-
torchrun --nproc_per_node=2 python/tutorials/tle/raw/nvshmem/01-simple-shift/simple-shift.py
165-
torchrun --nproc_per_node=2 python/tutorials/tle/raw/nvshmem/02-allgather-gemm/ag-gemm.py
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# Copyright 2025- FlagOS Contributors
2+
#
3+
# Permission is hereby granted, free of charge, to any person obtaining a copy
4+
# of this software and associated documentation files (the "Software"), to deal
5+
# in the Software without restriction, including without limitation the rights
6+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
# copies of the Software, and to permit persons to whom the Software is
8+
# furnished to do so, subject to the following conditions:
9+
#
10+
# The above copyright notice and this permission notice shall be included in all
11+
# copies or substantial portions of the Software.
12+
#
13+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
# SOFTWARE.
20+
21+
name: Nvidia3.6-Single-Dist-Test
22+
23+
on:
24+
schedule:
25+
- cron: '0 21 * * *'
26+
push:
27+
branches: [ "main", "triton_v3.6.x" ]
28+
pull_request:
29+
branches: [ "main", "triton_v3.6.x" ]
30+
types: [opened, synchronize, reopened, ready_for_review]
31+
32+
permissions:
33+
contents: read
34+
pull-requests: read
35+
36+
concurrency:
37+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
38+
cancel-in-progress: true
39+
40+
jobs:
41+
nv36x-single-dist-test:
42+
runs-on: nvidia3.6-single-dist
43+
if: ${{ github.repository == 'flagos-ai/flagtree' && github.event.pull_request.draft == false }}
44+
steps:
45+
- name: Setup environment
46+
shell: bash
47+
run: |
48+
source ~/env.sh
49+
env | grep -E '^(http_proxy|https_proxy|all_proxy|no_proxy)=' >> $GITHUB_ENV || true
50+
51+
- name: Smart Checkout
52+
uses: flagos-ai/FlagTree/.github/actions/smart-checkout@main
53+
with:
54+
checkout_version: 'v6'
55+
56+
- name: Check if backend-relevant files changed
57+
id: check_backend
58+
uses: flagos-ai/FlagTree/.github/actions/check-backend-changed@main
59+
with:
60+
backend: nvidia
61+
62+
- name: Cleanup FlagTree Environment
63+
if: ${{ steps.check_backend.outputs.should_skip != 'true' }}
64+
uses: flagos-ai/FlagTree/.github/actions/cleanup-flagtree-env@main
65+
66+
- name: Detect Target Branch
67+
shell: bash
68+
run: |
69+
set -x
70+
if [ "${{ github.event_name }}" = "pull_request" ]; then
71+
TARGET_BRANCH="${{ github.base_ref }}"
72+
else
73+
TARGET_BRANCH="${{ github.ref_name }}"
74+
fi
75+
echo "TARGET_BRANCH=$TARGET_BRANCH" >> $GITHUB_ENV
76+
echo "TARGET_BRANCH=$TARGET_BRANCH"
77+
78+
- name: Build FlagTree
79+
if: ${{ steps.check_backend.outputs.should_skip != 'true' }}
80+
shell: bash
81+
run: |
82+
set -x
83+
source ~/env-3.6.sh
84+
export FLAGCX_RECOMPILE=ON
85+
export USE_FLAGCX=ON
86+
MAX_JOBS=32 python3 -m pip install . --no-build-isolation -v
87+
88+
- name: Clear cache if ClearCache label present
89+
if: steps.check_backend.outputs.should_skip != 'true'
90+
id: clear_cache
91+
uses: flagos-ai/FlagTree/.github/actions/clear-cache-if-labeled@main
92+
with:
93+
github-token: ${{ secrets.GITHUB_TOKEN }}
94+
backend: nvidia
95+
96+
- name: Distributed Test
97+
if: ${{ steps.check_backend.outputs.should_skip != 'true' }}
98+
shell: bash
99+
run: |
100+
set -x
101+
source ~/env.sh
102+
## flagtree tle distributed python unit test
103+
CUDA_LAUNCH_BLOCKING=1 bash python/test/tle/unit/test_tle_distributed_d2d.sh
104+
CUDA_LAUNCH_BLOCKING=1 bash python/test/tle/unit/test_tle_get_local_pe.sh
105+
CUDA_LAUNCH_BLOCKING=1 bash python/test/tle/unit/test_tle_d2d_barrier.sh
106+
## flagtree tle nvshmem
107+
torchrun --nproc_per_node=2 python/tutorials/tle/raw/nvshmem/01-simple-shift/simple-shift.py
108+
torchrun --nproc_per_node=2 python/tutorials/tle/raw/nvshmem/02-allgather-gemm/ag-gemm.py

python/test/tle/unit/test_tle_distributed_d2d.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ export FLAGCX_USE_HETERO_COMM=1
77
export FLAGCX_MEM_ENABLE=1
88
export FLAGCX_VMM_ENABLE=0
99
export FLAGCX_P2P_DISABLE=1
10-
export CUDA_VISIBLE_DEVICES=0,1
1110

1211
run_test() {
1312
local script_dir

0 commit comments

Comments
 (0)