Skip to content

Commit 07fd4df

Browse files
author
zihugithub
committed
Add README
1 parent 1ce57fe commit 07fd4df

6 files changed

Lines changed: 128 additions & 14 deletions
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
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

.github/workflows/qa-l0-te-cpp-unittest-pytorch-lint.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
set-safe-directory: true
5959

6060
- name: Install Dependencies & Build Transformer Engine
61-
# timeout-minutes: 40
61+
timeout-minutes: 40
6262
env:
6363
NVTE_FRAMEWORK: pytorch
6464
TE_WITH_NCCL: 1
@@ -88,7 +88,7 @@ jobs:
8888
wait_for_gpu
8989
9090
- name: Run L0 C++ Unit Tests
91-
# timeout-minutes: 60
91+
timeout-minutes: 60
9292
env:
9393
TE_PATH: .
9494
run: |
@@ -117,7 +117,7 @@ jobs:
117117
ctest --test-dir build -j$NUM_PARALLEL_JOBS
118118
119119
- name: PyTorch C++ Lint
120-
# timeout-minutes: 5
120+
timeout-minutes: 5
121121
env:
122122
CPP_ONLY: 1
123123
TE_PATH: .
@@ -137,7 +137,7 @@ jobs:
137137
continue-on-error: true
138138

139139
- name: PyTorch Python Lint
140-
# timeout-minutes: 5
140+
timeout-minutes: 5
141141
env:
142142
PYTHON_ONLY: 1
143143
TE_PATH: .
@@ -157,7 +157,7 @@ jobs:
157157
continue-on-error: true
158158

159159
- name: Run L0 PyTorch Debug Unit Tests
160-
# timeout-minutes: 10
160+
timeout-minutes: 10
161161
env:
162162
TE_PATH: .
163163
run: |
@@ -170,7 +170,7 @@ jobs:
170170
bash ./qa/L0_pytorch_debug_unittest/test.sh
171171
172172
- name: Run L0 PyTorch Core Unit Tests
173-
# timeout-minutes: 10
173+
timeout-minutes: 10
174174
env:
175175
TE_PATH: .
176176
run: |

.github/workflows/qa-l1-te-cpp-pytorch-tests.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
set-safe-directory: true
7070

7171
- name: Install Dependencies & Build Transformer Engine
72-
# timeout-minutes: 30
72+
timeout-minutes: 40
7373
env:
7474
NVTE_FRAMEWORK: pytorch
7575
TE_WITH_NCCL: 1
@@ -116,6 +116,7 @@ jobs:
116116
env:
117117
XML_LOG_DIR: "/logs/pytorch/thunder"
118118
THUNDER_PATH: "lightning-thunder"
119+
TE_PATH: .
119120
run: |
120121
# Activate conda environment
121122
source /opt/miniconda3/etc/profile.d/conda.sh
@@ -124,7 +125,7 @@ jobs:
124125
# Run thunder integration tests
125126
echo "=== Running L1 PyTorch Thunder Integration Tests ==="
126127
bash ./qa/L1_pytorch_thunder_integration/test.sh
127-
# timeout-minutes: 5
128+
timeout-minutes: 5
128129

129130
- name: Run L1 PyTorch Distributed Unit Tests
130131
continue-on-error: true
@@ -139,7 +140,7 @@ jobs:
139140
# Run distributed unit tests
140141
echo "=== Running L1 PyTorch Distributed Unit Tests ==="
141142
bash ./qa/L1_pytorch_distributed_unittest/test.sh
142-
# timeout-minutes: 5
143+
timeout-minutes: 5
143144

144145
- name: Run L1 PyTorch ONNX Unit Tests
145146
env:
@@ -153,4 +154,4 @@ jobs:
153154
# Run ONNX unit tests
154155
echo "=== Running L1 PyTorch ONNX Unit Tests ==="
155156
bash ./qa/L1_pytorch_onnx_unittest/test.sh
156-
# timeout-minutes: 60
157+
timeout-minutes: 30

.github/workflows/qa-l3-te-pytorch-fa-versions-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
set-safe-directory: true
5656

5757
- name: Install Dependencies & Build Transformer Engine
58-
# timeout-minutes: 30
58+
timeout-minutes: 40
5959
env:
6060
NVTE_FRAMEWORK: pytorch
6161
TE_WITH_NCCL: 1
@@ -104,7 +104,7 @@ jobs:
104104
wait_for_gpu
105105
106106
- name: Run QA L3 PyTorch FlashAttention Versions Test
107-
# timeout-minutes: 30
107+
timeout-minutes: 30
108108
env:
109109
XML_LOG_DIR: "/logs/pytorch/attention"
110110
TE_PATH: .

.github/workflows/te-plugin-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
set-safe-directory: true
5555

5656
- name: Install Dependencies & Build Transformer Engine
57-
timeout-minutes: 60
57+
timeout-minutes: 40
5858
env:
5959
NVTE_FRAMEWORK: pytorch
6060
TE_WITH_NCCL: 1
@@ -95,7 +95,7 @@ jobs:
9595
wait_for_gpu
9696
9797
- name: Plugin Test
98-
timeout-minutes: 30
98+
timeout-minutes: 10
9999
run: |
100100
# Activate conda environment
101101
source /opt/miniconda3/etc/profile.d/conda.sh

tests/README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# TransformerEngine-FL Test Suite
2+
3+
## Quick Start
4+
5+
```bash
6+
# Run tests
7+
bash qa/<test_type>/test.sh
8+
```
9+
10+
## Directory Structure
11+
12+
```
13+
tests/
14+
├── cpp/ # C++ core functionality tests
15+
│ ├── operator/ # C++ operator layer tests (basic/core operator validation)
16+
│ └── util/ # C++ utility function tests (common helper unit tests)
17+
├── cpp_distributed/ # C++ distributed functionality tests (communication/parallelism)
18+
├── jax/ # JAX framework adaptation tests (JAX backend validation)
19+
└── pytorch/ # Full PyTorch framework tests
20+
├── attention/ # PyTorch attention mechanism tests (FlashAttention/MLA etc.)
21+
├── debug/ # Debug-specific tests (issue reproduction/debug tooling)
22+
│ └── test_configs/ # Debug test configurations (params/cases for different scenarios)
23+
├── distributed/ # PyTorch distributed tests (DDP/FSDP/communication)
24+
├── nvfp4/ # NVFP4 quantization tests (NVIDIA FP4 operator/inference)
25+
└── references/ # Reference implementation tests (consistency vs baseline)
26+
```
27+
28+
## Adding Tests
29+
30+
### Unit Test
31+
Add test file:
32+
- `tests/cpp/test_<name>.cpp` & `tests/cpp/CMakeLists.txt`
33+
- `tests/cpp_distributed/test_<name>.py` & `tests/cpp_distributed/CMakeLists.txt`
34+
- `tests/jax/test_<name>.py`
35+
- `tests/pytorch/test_<name>.py`

0 commit comments

Comments
 (0)