|
| 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 |
0 commit comments