|
1 | | -# name: QA CPP Distributed |
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-cpp_distributed: |
17 | | -# runs-on: self-hosted |
18 | | -# defaults: |
19 | | -# run: |
20 | | -# shell: bash |
21 | | -# container: |
22 | | -# image: localhost:5000/flagscale:cuda12.8.1-cudnn9.10.2-torch2.9.1-py3.10-transformerengine_fl |
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 | | - |
35 | | -# steps: |
36 | | -# - name: Checkout Code |
37 | | -# uses: actions/checkout@v6.0.1 |
38 | | -# with: |
39 | | -# repository: ${{ github.event.pull_request.head.repo.full_name }} |
40 | | -# ref: ${{ github.event.pull_request.head.ref }} |
41 | | -# ssh-strict: true |
42 | | -# ssh-user: git |
43 | | -# persist-credentials: true |
44 | | -# clean: true |
45 | | -# sparse-checkout-cone-mode: true |
46 | | -# fetch-tags: false |
47 | | -# show-progress: true |
48 | | -# lfs: false |
49 | | -# submodules: recursive |
50 | | -# set-safe-directory: true |
51 | | - |
52 | | -# - name: Pre-Check Environment |
53 | | -# timeout-minutes: 5 |
54 | | -# run: | |
55 | | -# set -euo pipefail |
56 | | -# echo "===== System Info =====" |
57 | | -# uname -a |
58 | | -# python3 --version || (echo "❌ python3 not found"; exit 1) |
59 | | -# pip3 --version || (echo "❌ pip3 not found"; exit 1) |
60 | | - |
61 | | -# echo "===== GPU Info =====" |
62 | | -# if command -v nvidia-smi &>/dev/null; then |
63 | | -# nvidia-smi --query-gpu=index,name,memory.total,utilization.gpu --format=csv |
64 | | -# else |
65 | | -# echo "⚠️ GPU check skipped. nvidia-smi is not available in the current environment." |
66 | | -# exit 1 |
67 | | -# fi |
68 | | - |
69 | | -# nvcc --version || echo "⚠️ nvcc not found (non-fatal for python-only install)" |
70 | | - |
71 | | -# echo "===== Disk Space =====" |
72 | | -# df -h |
73 | | - |
74 | | -# echo "===== Available memory =====" |
75 | | -# free -h |
76 | | - |
77 | | -# - name: Install dependencies and build transformer_engine |
78 | | -# # timeout-minutes: 30 |
79 | | -# env: |
80 | | -# NVTE_FRAMEWORK: pytorch |
81 | | -# TE_WITH_NCCL: 1 |
82 | | -# run: | |
83 | | -# # =============== Install MPI =============== |
84 | | -# apt update |
85 | | -# apt install -y libopenmpi-dev openmpi-bin openmpi-common |
86 | | -# apt install -y libmpich-dev mpich |
87 | | -# # Verify the MPI header file |
88 | | -# mpicxx -show | awk '{for(i=1;i<=NF;i++) if($i ~ /-I/) print substr($i,3)}' |
89 | | - |
90 | | -# # Verify whether the MPI C++ environment is ready |
91 | | -# # 1. Verify whether the MPI C++ compiler (mpicxx) exists |
92 | | -# mpicxx --version |
93 | | -# # 2. Verify if the MPI library file exists |
94 | | -# ls /usr/lib/x86_64-linux-gnu/libmpi_cxx.so |
95 | | - |
96 | | -# echo "=============== Install transformer_engine ===============" |
97 | | -# pip install --no-build-isolation -vvv . --no-deps |
98 | | -# cp -rf transformer_engine/plugins/ /usr/local/lib/python3.10/dist-packages/transformer_engine/plugins/ |
99 | | - |
100 | | -# - name: Verify installation |
101 | | -# shell: bash |
102 | | -# run: | |
103 | | -# python3 tests/pytorch/test_sanity_import.py |
104 | | - |
105 | | -# - name: GPU Usage Check / Verification |
106 | | -# run: | |
107 | | -# source .github/workflows/scripts/gpu_check.sh |
108 | | -# wait_for_gpu |
| 1 | +name: QA CPP Distributed |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - add_qa_teat251230 |
| 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-cpp_distributed: |
| 17 | + runs-on: self-hosted |
| 18 | + defaults: |
| 19 | + run: |
| 20 | + shell: bash |
| 21 | + container: |
| 22 | + image: localhost:5000/flagscale:cuda12.8.1-cudnn9.10.2-torch2.9.1-py3.10-transformerengine_fl |
| 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 | +
|
| 35 | + steps: |
| 36 | + - name: Checkout Code |
| 37 | + uses: actions/checkout@v6.0.1 |
| 38 | + with: |
| 39 | + repository: ${{ github.event.pull_request.head.repo.full_name }} |
| 40 | + ref: ${{ github.event.pull_request.head.ref }} |
| 41 | + ssh-strict: true |
| 42 | + ssh-user: git |
| 43 | + persist-credentials: true |
| 44 | + clean: true |
| 45 | + sparse-checkout-cone-mode: true |
| 46 | + fetch-tags: false |
| 47 | + show-progress: true |
| 48 | + lfs: false |
| 49 | + submodules: recursive |
| 50 | + set-safe-directory: true |
| 51 | + |
| 52 | + - name: Pre-Check Environment |
| 53 | + timeout-minutes: 5 |
| 54 | + run: | |
| 55 | + set -euo pipefail |
| 56 | + echo "===== System Info =====" |
| 57 | + uname -a |
| 58 | + python3 --version || (echo "❌ python3 not found"; exit 1) |
| 59 | + pip3 --version || (echo "❌ pip3 not found"; exit 1) |
| 60 | +
|
| 61 | + echo "===== GPU Info =====" |
| 62 | + if command -v nvidia-smi &>/dev/null; then |
| 63 | + nvidia-smi --query-gpu=index,name,memory.total,utilization.gpu --format=csv |
| 64 | + else |
| 65 | + echo "⚠️ GPU check skipped. nvidia-smi is not available in the current environment." |
| 66 | + exit 1 |
| 67 | + fi |
| 68 | +
|
| 69 | + nvcc --version || echo "⚠️ nvcc not found (non-fatal for python-only install)" |
| 70 | +
|
| 71 | + echo "===== Disk Space =====" |
| 72 | + df -h |
| 73 | +
|
| 74 | + echo "===== Available memory =====" |
| 75 | + free -h |
| 76 | +
|
| 77 | + - name: Install dependencies and build transformer_engine |
| 78 | + # timeout-minutes: 30 |
| 79 | + env: |
| 80 | + NVTE_FRAMEWORK: pytorch |
| 81 | + TE_WITH_NCCL: 1 |
| 82 | + run: | |
| 83 | + # =============== Install MPI =============== |
| 84 | + apt update |
| 85 | + apt install -y libopenmpi-dev openmpi-bin openmpi-common |
| 86 | + apt install -y libmpich-dev mpich |
| 87 | + # Verify the MPI header file |
| 88 | + mpicxx -show | awk '{for(i=1;i<=NF;i++) if($i ~ /-I/) print substr($i,3)}' |
| 89 | +
|
| 90 | + # Verify whether the MPI C++ environment is ready |
| 91 | + # 1. Verify whether the MPI C++ compiler (mpicxx) exists |
| 92 | + mpicxx --version |
| 93 | + # 2. Verify if the MPI library file exists |
| 94 | + ls /usr/lib/x86_64-linux-gnu/libmpi_cxx.so |
| 95 | +
|
| 96 | + echo "=============== Install transformer_engine ===============" |
| 97 | + pip install --no-build-isolation -vvv . --no-deps |
| 98 | + cp -rf transformer_engine/plugins/ /usr/local/lib/python3.10/dist-packages/transformer_engine/plugins/ |
| 99 | +
|
| 100 | + - name: Verify installation |
| 101 | + shell: bash |
| 102 | + run: | |
| 103 | + python3 tests/pytorch/test_sanity_import.py |
| 104 | +
|
| 105 | + - name: GPU Usage Check / Verification |
| 106 | + run: | |
| 107 | + source .github/workflows/scripts/gpu_check.sh |
| 108 | + wait_for_gpu |
109 | 109 | |
110 | | -# - name: L0 CPP Distributed |
111 | | -# id: L0_cpp_distributed |
112 | | -# continue-on-error: true |
113 | | -# # timeout-minutes: 10 |
114 | | -# env: |
115 | | -# TE_PATH: . |
116 | | -# run: | |
117 | | -# TE_LIB_PATH=$(pip3 show transformer-engine | grep -E "Location:|Editable project location:" | tail -n 1 | awk '{print $NF}') |
118 | | -# TE_CPP_LIB_PATH="${TE_LIB_PATH}/transformer_engine" |
119 | | -# export CMAKE_PREFIX_PATH="${TE_CPP_LIB_PATH}:${CMAKE_PREFIX_PATH}" |
120 | | -# export LD_LIBRARY_PATH="${TE_CPP_LIB_PATH}:${LD_LIBRARY_PATH}" |
121 | | - |
122 | | -# cd $TE_PATH/tests/cpp_distributed |
123 | | -# cmake -GNinja -S. -Bbuild |
| 110 | + - name: L0 CPP Distributed |
| 111 | + id: L0_cpp_distributed |
| 112 | + # timeout-minutes: 10 |
| 113 | + env: |
| 114 | + TE_PATH: . |
| 115 | + XML_LOG_DIR: "/logs/cpp/distributed |
| 116 | +
|
| 117 | + run: | |
| 118 | + TE_LIB_PATH=$(pip3 show transformer-engine | grep -E "Location:|Editable project location:" | tail -n 1 | awk '{print $NF}') |
| 119 | + TE_CPP_LIB_PATH="${TE_LIB_PATH}/transformer_engine" |
| 120 | + export CMAKE_PREFIX_PATH="${TE_CPP_LIB_PATH}:${CMAKE_PREFIX_PATH}" |
| 121 | + export LD_LIBRARY_PATH="${TE_CPP_LIB_PATH}:${LD_LIBRARY_PATH}" |
| 122 | + |
| 123 | + bash ./qa/L1_cpp_distributed/test.sh | tee ${XML_LOG_DIR}/distributed-${{ github.run_id }}.log |
| 124 | + |
| 125 | + - name: Upload Installation Logs |
| 126 | + if: always() && steps.L0_cpp_distributed.outcome == 'failure' |
| 127 | + uses: actions/upload-artifact@v4 |
| 128 | + with: |
| 129 | + name: L0-cpp-logs-${{ github.run_id }} |
| 130 | + path: /logs/cpp/distributed |
| 131 | + retention-days: 7 |
| 132 | + if-no-files-found: warn |
0 commit comments