|
| 1 | +name: QA Pytorch Wheel |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + pull_request: |
| 8 | + branches: |
| 9 | + - main |
| 10 | + |
| 11 | +concurrency: |
| 12 | + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.actor }} |
| 13 | + cancel-in-progress: true |
| 14 | + |
| 15 | +jobs: |
| 16 | + qa-l0-pytorch-wheel: |
| 17 | + runs-on: [ self-hosted, Linux, X64, nvidia, gpu-8 ] |
| 18 | + defaults: |
| 19 | + run: |
| 20 | + shell: bash |
| 21 | + container: |
| 22 | + image: harbor.baai.ac.cn/flagscale/cuda12.8.1-torch2.7.1-python3.10-te2.9:20260209 |
| 23 | + ports: |
| 24 | + - 80:80 |
| 25 | + options: >- |
| 26 | + --gpus all |
| 27 | + --shm-size=500g |
| 28 | + --privileged |
| 29 | + --ipc=host |
| 30 | + --ulimit memlock=-1 |
| 31 | + --ulimit stack=67108864 |
| 32 | + --ulimit nofile=65535:65535 |
| 33 | + --user root |
| 34 | + --pull always |
| 35 | +
|
| 36 | + steps: |
| 37 | + - name: Checkout Code |
| 38 | + uses: actions/checkout@v6.0.1 |
| 39 | + with: |
| 40 | + repository: ${{ github.event.pull_request.head.repo.full_name }} |
| 41 | + ref: ${{ github.event.pull_request.head.ref }} |
| 42 | + ssh-strict: true |
| 43 | + ssh-user: git |
| 44 | + persist-credentials: true |
| 45 | + clean: true |
| 46 | + sparse-checkout-cone-mode: true |
| 47 | + fetch-tags: false |
| 48 | + show-progress: true |
| 49 | + lfs: false |
| 50 | + submodules: recursive |
| 51 | + set-safe-directory: true |
| 52 | + |
| 53 | + - name: L0 Pytorch Wheel |
| 54 | + id: L0_pytoech_wheel |
| 55 | + timeout-minutes: 50 |
| 56 | + env: |
| 57 | + TE_PATH: . |
| 58 | + RUN_LOG: /logs/pytorch/wheel |
| 59 | + run: | |
| 60 | + echo "TE_PATH: ${TE_PATH}" |
| 61 | + sed -i "s/^cd transformer_engine\/pytorch\s*$/pushd transformer_engine\/pytorch/" qa/L0_pytorch_wheel/test.sh |
| 62 | + sed -i '44 s/^cd \s*\$TE_PATH\s*$/popd/' qa/L0_pytorch_wheel/test.sh |
| 63 | +
|
| 64 | + cat qa/L0_pytorch_wheel/test.sh |
| 65 | + source /opt/miniconda3/etc/profile.d/conda.sh |
| 66 | + conda activate flagscale-train |
| 67 | + pip uninstall -y transformer_engine |
| 68 | +
|
| 69 | + bash qa/L0_pytorch_wheel/test.sh | tee ${RUN_LOG}/pytorch_wheel-${{ github.run_id }}.log |
| 70 | +
|
| 71 | + - name: Upload Installation Logs |
| 72 | + if: always() && steps.L0_pytoech_wheel.outcome == 'failure' |
| 73 | + uses: actions/upload-artifact@v4 |
| 74 | + with: |
| 75 | + name: L0-pytorch-logs-${{ github.run_id }} |
| 76 | + path: /logs/pytorch/wheel |
| 77 | + retention-days: 7 |
| 78 | + if-no-files-found: warn |
0 commit comments