Skip to content

Commit 1cac161

Browse files
author
zhoujiamei
committed
Merge branch 'main' of github.com:BrianPei/TransformerEngine-FL
2 parents 19eacbb + 14b445c commit 1cac161

2 files changed

Lines changed: 74 additions & 15 deletions

File tree

.github/workflows/functional_tests_common.yml

Lines changed: 71 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
uses: actions/checkout@v6
5050
with:
5151
fetch-depth: 0
52-
52+
5353
# - name: Set safe directory
5454
# run: |
5555
# git config --global --add safe.directory $PROJECT_ROOT
@@ -66,7 +66,6 @@ jobs:
6666
6767
- name: Setup Python environment
6868
env:
69-
7069
NVTE_WITH_MACA: '1'
7170
NVTE_WITH_CUDA: '0'
7271
NVCC: /opt/maca/bin/mcc
@@ -80,9 +79,22 @@ jobs:
8079
pip install -e . --no-deps --no-build-isolation
8180
timeout-minutes: 60
8281

83-
- name: Run functional tests
84-
id: functional_test
82+
- name: L0 Pytorch Wheel
83+
id: L0_pytoech_wheel
84+
# timeout-minutes: 50
85+
env:
86+
TE_PATH: .
87+
RUN_LOG: /logs/pytorch/wheel
8588
run: |
89+
echo "TE_PATH: ${TE_PATH}"
90+
sed -i "s/^cd transformer_engine\/pytorch\s*$/pushd transformer_engine\/pytorch/" qa/L0_pytorch_wheel/test.sh
91+
sed -i '44 s/^cd \s*\$TE_PATH\s*$/popd/' qa/L0_pytorch_wheel/test.sh
92+
93+
cat qa/L0_pytorch_wheel/test.sh
94+
# source /opt/miniconda3/etc/profile.d/conda.sh
95+
# conda activate flagscale-train
96+
pip uninstall -y transformer_engine
97+
8698
set -euo pipefail
8799
cd $PROJECT_ROOT
88100
@@ -101,16 +113,9 @@ jobs:
101113
102114
# Set environment variables
103115
export PYTHONPATH=$PROJECT_ROOT:${PYTHONPATH:-}
104-
105-
# Run functional tests via run_tests.sh with explicit platform/device/task/model/case
116+
106117
set +e
107-
bash "$PROJECT_ROOT/tests/test_utils/runners/run_tests.sh" \
108-
--platform "$PLATFORM" \
109-
--device "$DEVICE" \
110-
--type functional \
111-
--task "$TASK" \
112-
--model "$MODEL" \
113-
--list "$CASE"
118+
bash qa/L0_pytorch_wheel/test.sh | tee ${RUN_LOG}/pytorch_wheel-${{ github.run_id }}.log
114119
exit_code=$?
115120
set -e
116121
@@ -122,7 +127,59 @@ jobs:
122127
123128
echo "exit_code=$exit_code" >> $GITHUB_OUTPUT
124129
exit $exit_code
125-
timeout-minutes: 60
130+
131+
- name: Upload Installation Logs
132+
if: always() && steps.L0_pytoech_wheel.outcome == 'failure'
133+
uses: actions/upload-artifact@v4
134+
with:
135+
name: L0-pytorch-logs-${{ github.run_id }}
136+
path: /logs/pytorch/wheel
137+
retention-days: 7
138+
if-no-files-found: warn
139+
140+
# - name: Run functional tests
141+
# id: functional_test
142+
# run: |
143+
# set -euo pipefail
144+
# cd $PROJECT_ROOT
145+
146+
# PLATFORM='${{ inputs.platform }}'
147+
# DEVICE='${{ matrix.test_config.device }}'
148+
# TASK='${{ matrix.test_config.task }}'
149+
# MODEL='${{ matrix.test_config.model }}'
150+
# CASE='${{ matrix.test_config.case }}'
151+
152+
# echo "Running functional tests for training"
153+
# echo "Platform: $PLATFORM"
154+
# echo "Device: $DEVICE"
155+
# echo "Task: $TASK"
156+
# echo "Model: $MODEL"
157+
# echo "Case: ${CASE:-all}"
158+
159+
# # Set environment variables
160+
# export PYTHONPATH=$PROJECT_ROOT:${PYTHONPATH:-}
161+
162+
# # Run functional tests via run_tests.sh with explicit platform/device/task/model/case
163+
# set +e
164+
# bash "$PROJECT_ROOT/tests/test_utils/runners/run_tests.sh" \
165+
# --platform "$PLATFORM" \
166+
# --device "$DEVICE" \
167+
# --type functional \
168+
# --task "$TASK" \
169+
# --model "$MODEL" \
170+
# --list "$CASE"
171+
# exit_code=$?
172+
# set -e
173+
174+
# if [ $exit_code -eq 0 ]; then
175+
# echo "✅ Functional tests passed for $PLATFORM/$DEVICE/$TASK/$MODEL/$CASE"
176+
# else
177+
# echo "❌ Functional tests failed for $PLATFORM/$DEVICE/$TASK/$MODEL/$CASE (exit code: $exit_code)"
178+
# fi
179+
180+
# echo "exit_code=$exit_code" >> $GITHUB_OUTPUT
181+
# exit $exit_code
182+
# timeout-minutes: 60
126183

127184
- name: Debug - keep container alive on failure
128185
if: failure()

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,6 @@ compile_commands.json
4141
tensor_dumps/
4242
artifacts/
4343
# Auto-generated build configuration (specific to each environment)
44-
transformer_engine/plugin/core/_build_config.py
44+
transformer_engine/plugin/core/_build_config.py
45+
# Mac OS
46+
.DS_Store

0 commit comments

Comments
 (0)