Skip to content

Commit 0c90d18

Browse files
author
yefubao
committed
ci: QA Pytorch Wheel Debug1
1 parent 9dfb5ee commit 0c90d18

1 file changed

Lines changed: 21 additions & 45 deletions

File tree

.github/workflows/qa_l0_pytorch_wheel.yml

Lines changed: 21 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@ on:
44
push:
55
branches:
66
- add_qa_teat251230
7-
paths:
7+
paths:
88
- .github/workflows/qa_l0_pytorch_wheel.yml
99
pull_request:
1010
branches:
1111
- main
12-
workflow_dispatch:
1312

1413
concurrency:
1514
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-${{ github.actor }}
@@ -22,29 +21,20 @@ jobs:
2221
run:
2322
shell: bash
2423
container:
25-
image: nvcr.io/nvidia/cuda:12.8.1-devel-ubuntu22.04
24+
image: localhost:5000/flagscale:cuda12.8.1-cudnn9.10.2-torch2.9.1-py3.10-transformerengine_fl
25+
ports:
26+
- 80:80
27+
options: >-
28+
--gpus all
29+
--shm-size=500g
30+
--privileged
31+
--ipc=host
32+
--ulimit memlock=-1
33+
--ulimit stack=67108864
34+
--ulimit nofile=65535:65535
35+
--user root
2636
2737
steps:
28-
- name: Initialize Software Environment
29-
env:
30-
DEBIAN_FRONTEND: noninteractive
31-
TZ: Asia/Shanghai
32-
PYTHON_VERSION: 3.10
33-
run: |
34-
apt-get update
35-
apt-get install -y --no-install-recommends software-properties-common git cudnn9-cuda-12
36-
add-apt-repository ppa:deadsnakes/ppa
37-
apt-get install -y --no-install-recommends \
38-
python${PYTHON_VERSION} \
39-
python${PYTHON_VERSION}-dev \
40-
python${PYTHON_VERSION}-venv \
41-
python3-distutils \
42-
python3-pip && \
43-
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python${PYTHON_VERSION} 1 && \
44-
update-alternatives --set python3 /usr/bin/python${PYTHON_VERSION} && \
45-
ln -sf /usr/bin/python${PYTHON_VERSION}-config /usr/bin/python3-config && \
46-
ln -s /usr/bin/python3 /usr/bin/python
47-
4838
- name: Checkout Code
4939
uses: actions/checkout@v6.0.1
5040
with:
@@ -53,8 +43,6 @@ jobs:
5343
persist-credentials: true
5444
clean: true
5545
submodules: recursive
56-
fetch-tags: false
57-
sparse-checkout-cone-mode: true
5846

5947
- name: Pre-Check Environment
6048
timeout-minutes: 5
@@ -82,23 +70,8 @@ jobs:
8270
free -h
8371
8472
- name: Install dependencies and build transformer_engine
85-
# timeout-minutes: 30
86-
env:
87-
NVTE_FRAMEWORK: pytorch
73+
timeout-minutes: 30
8874
run: |
89-
# =============== Install Dependencies ===============
90-
pip install cmake torch ninja pydantic packaging pybind11 numpy einops onnxscript
91-
pip install nvidia-mathdx==25.1.1 importlib-metadata>=1.0
92-
pip install transformers expecttest pytest==8.2.1 tensorrt
93-
94-
# =============== Install MPI ===============
95-
apt update
96-
apt install -y libopenmpi-dev openmpi-bin openmpi-common
97-
apt install -y libmpich-dev mpich
98-
mpicxx -show | awk '{for(i=1;i<=NF;i++) if($i ~ /-I/) print substr($i,3)}'
99-
mpicxx --version
100-
ls /usr/lib/x86_64-linux-gnu/libmpi_cxx.so
101-
10275
# =============== Install Wheel ===============
10376
pip3 install wheel -U
10477
@@ -111,17 +84,20 @@ jobs:
11184
- name: Verify installation
11285
run: python3 tests/pytorch/test_sanity_import.py
11386

87+
- name: GPU Usage Check / Verification
88+
run: |
89+
source .github/workflows/scripts/gpu_check.sh
90+
wait_for_gpu
91+
11492
- name: L0 Pytorch Wheel
115-
# timeout-minutes: 10
93+
timeout-minutes: 25
11694
env:
11795
TE_PATH: .
11896
run: |
11997
echo "TE_PATH: ${TE_PATH}"
12098
sed -i "s/^cd transformer_engine\/pytorch\s*$/pushd transformer_engine\/pytorch/" qa/L0_pytorch_wheel/test.sh
12199
sed -i '44 s/^cd \s*\$TE_PATH\s*$/popd/' qa/L0_pytorch_wheel/test.sh
122100
123-
echo -e "\n=== Modified test.sh content ==="
124101
cat qa/L0_pytorch_wheel/test.sh
125102
126-
echo -e "\n=== Starting to execute test.sh ==="
127-
bash qa/L0_pytorch_wheel/test.sh
103+
bash qa/L0_pytorch_wheel/test.sh

0 commit comments

Comments
 (0)