[ci] Add workflows to validate TE QA test cases #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: QA L0 PYTHORCH Lint | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.actor }} | |
| cancel-in-progress: true | |
| jobs: | |
| qa-l0-pytorch-lint: | |
| runs-on: [ self-hosted, Linux, X64, nvida, gpu-8 ] | |
| defaults: | |
| run: | |
| shell: bash | |
| container: | |
| image: harbor.baai.ac.cn/flagscale/cuda12.8.1-cudnn9.10.2-torch2.9.1-py3.10-transformerengine_fl:20260204 | |
| ports: | |
| - 80:80 | |
| options: >- | |
| --gpus all | |
| --shm-size=500g | |
| --privileged | |
| --ipc=host | |
| --ulimit memlock=-1 | |
| --ulimit stack=67108864 | |
| --ulimit nofile=65535:65535 | |
| --user root | |
| --pull always | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v6.0.1 | |
| with: | |
| repository: ${{ github.event.pull_request.head.repo.full_name }} | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| ssh-strict: true | |
| ssh-user: git | |
| persist-credentials: true | |
| clean: true | |
| sparse-checkout-cone-mode: true | |
| fetch-tags: false | |
| show-progress: true | |
| lfs: false | |
| submodules: recursive | |
| set-safe-directory: true | |
| - name: Pre-Check Environment | |
| timeout-minutes: 5 | |
| run: | | |
| set -euo pipefail | |
| echo "===== System Info =====" | |
| uname -a | |
| python3 --version || (echo "❌ python3 not found"; exit 1) | |
| pip3 --version || (echo "❌ pip3 not found"; exit 1) | |
| echo "===== GPU Info =====" | |
| if command -v nvidia-smi &>/dev/null; then | |
| nvidia-smi --query-gpu=index,name,memory.total,utilization.gpu --format=csv | |
| else | |
| echo "⚠️ GPU check skipped. nvidia-smi is not available in the current environment." | |
| exit 1 | |
| fi | |
| nvcc --version || echo "⚠️ nvcc not found (non-fatal for python-only install)" | |
| echo "===== Disk Space =====" | |
| df -h | |
| echo "===== Available memory =====" | |
| free -h | |
| - name: Verify installation | |
| shell: bash | |
| run: | | |
| python3 tests/pytorch/test_sanity_import.py | |
| - name: PyTorch C++ Lint | |
| id: pytorch_cpplint | |
| env: | |
| CPP_ONLY: 1 | |
| TE_PATH: . | |
| run: | | |
| bash ./qa/L0_pytorch_lint/test.sh || true | |
| echo "" | |
| echo "-----------------------------------------------------" | |
| echo "Note: Pylint check ignores errors C0411 (incorrect import position) and W0611 (unused import), which can be achieved by adding the parameter --disable=C0411,W0611" | |
| echo "-----------------------------------------------------" | |
| continue-on-error: true | |
| - name: PyTorch Python Lint | |
| id: pytorch_pylint | |
| env: | |
| PYTHON_ONLY: 1 | |
| TE_PATH: . | |
| run: | | |
| bash ./qa/L0_pytorch_lint/test.sh || true | |
| echo "" | |
| echo "-----------------------------------------------------" | |
| echo "Note: Pylint check ignores errors C0411 (incorrect import position) and W0611 (unused import), which can be achieved by adding the parameter --disable=C0411,W0611" | |
| echo "-----------------------------------------------------" |