Skip to content

Commit ad27a07

Browse files
committed
pass cuda L0
1 parent 6cdb75a commit ad27a07

1 file changed

Lines changed: 81 additions & 81 deletions

File tree

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

Lines changed: 81 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -90,87 +90,87 @@ jobs:
9090
wait_for_gpu
9191
9292
# too heavy, disabled for now
93-
# - name: Run L0 C++ Unit Tests
94-
# # timeout-minutes: 60
95-
# env:
96-
# TE_PATH: .
97-
# run: |
98-
# # Activate conda environment
99-
# source /opt/miniconda3/etc/profile.d/conda.sh
100-
# conda activate flagscale-train
101-
102-
# # Get TE library paths with robust detection
103-
# TE_LIB_PATH=$(pip3 show transformer-engine | grep -E "Location:|Editable project location:" | tail -n 1 | awk '{print $NF}')
104-
# TE_CPP_LIB_PATH="${TE_LIB_PATH}/transformer_engine"
105-
106-
# # Set environment variables for build
107-
# export CMAKE_PREFIX_PATH="${TE_CPP_LIB_PATH}:${CMAKE_PREFIX_PATH}"
108-
# export LD_LIBRARY_PATH="${TE_CPP_LIB_PATH}:${LD_LIBRARY_PATH}"
109-
# NUM_PHYSICAL_CORES=$(nproc)
110-
# NUM_PARALLEL_JOBS=$(nproc)
111-
112-
# # Build and run C++ tests
113-
# cd $TE_PATH/tests/cpp
114-
# cmake -GNinja -Bbuild . -DTE_LIB_PATH="${TE_CPP_LIB_PATH}"
115-
# cmake --build build
116-
# export OMP_NUM_THREADS=$((NUM_PHYSICAL_CORES / NUM_PARALLEL_JOBS))
117-
118-
# # Run C++ tests with verbose output
119-
# echo "=== Running C++ Unit Tests ==="
120-
# ctest --test-dir build -j$NUM_PARALLEL_JOBS
121-
122-
# - name: PyTorch C++ Lint
123-
# # timeout-minutes: 5
124-
# env:
125-
# CPP_ONLY: 1
126-
# TE_PATH: .
127-
# run: |
128-
# # Activate conda environment
129-
# source /opt/miniconda3/etc/profile.d/conda.sh
130-
# conda activate flagscale-train
131-
132-
# # Run C++ lint checks
133-
# echo "=== Running C++ Lint Checks ==="
134-
# bash ./qa/L0_pytorch_lint/test.sh || true
135-
136-
# echo ""
137-
# echo "-----------------------------------------------------"
138-
# 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"
139-
# echo "-----------------------------------------------------"
140-
# continue-on-error: true
141-
142-
# - name: PyTorch Python Lint
143-
# # timeout-minutes: 5
144-
# env:
145-
# PYTHON_ONLY: 1
146-
# TE_PATH: .
147-
# run: |
148-
# # Activate conda environment
149-
# source /opt/miniconda3/etc/profile.d/conda.sh
150-
# conda activate flagscale-train
151-
152-
# # Run PyTorch lint checks
153-
# echo "=== Running PyTorch Lint Checks ==="
154-
# bash ./qa/L0_pytorch_lint/test.sh || true
155-
156-
# echo ""
157-
# echo "-----------------------------------------------------"
158-
# 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"
159-
# echo "-----------------------------------------------------"
160-
# continue-on-error: true
161-
162-
# - name: Run L0 PyTorch Debug Unit Tests
163-
# # timeout-minutes: 10
164-
# env:
165-
# TE_PATH: .
166-
# run: |
167-
# # Activate conda environment
168-
# source /opt/miniconda3/etc/profile.d/conda.sh
169-
# conda activate flagscale-train
170-
171-
# # Run debug unit tests
172-
# echo "=== Running L0 PyTorch Debug Unit Tests ==="
173-
# bash ./qa/L0_pytorch_debug_unittest/test.sh
93+
- name: Run L0 C++ Unit Tests
94+
# timeout-minutes: 60
95+
env:
96+
TE_PATH: .
97+
run: |
98+
# Activate conda environment
99+
source /opt/miniconda3/etc/profile.d/conda.sh
100+
conda activate flagscale-train
101+
102+
# Get TE library paths with robust detection
103+
TE_LIB_PATH=$(pip3 show transformer-engine | grep -E "Location:|Editable project location:" | tail -n 1 | awk '{print $NF}')
104+
TE_CPP_LIB_PATH="${TE_LIB_PATH}/transformer_engine"
105+
106+
# Set environment variables for build
107+
export CMAKE_PREFIX_PATH="${TE_CPP_LIB_PATH}:${CMAKE_PREFIX_PATH}"
108+
export LD_LIBRARY_PATH="${TE_CPP_LIB_PATH}:${LD_LIBRARY_PATH}"
109+
NUM_PHYSICAL_CORES=$(nproc)
110+
NUM_PARALLEL_JOBS=$(nproc)
111+
112+
# Build and run C++ tests
113+
cd $TE_PATH/tests/cpp
114+
cmake -GNinja -Bbuild . -DTE_LIB_PATH="${TE_CPP_LIB_PATH}"
115+
cmake --build build
116+
export OMP_NUM_THREADS=$((NUM_PHYSICAL_CORES / NUM_PARALLEL_JOBS))
117+
118+
# Run C++ tests with verbose output
119+
echo "=== Running C++ Unit Tests ==="
120+
ctest --test-dir build -j$NUM_PARALLEL_JOBS
121+
122+
- name: PyTorch C++ Lint
123+
# timeout-minutes: 5
124+
env:
125+
CPP_ONLY: 1
126+
TE_PATH: .
127+
run: |
128+
# Activate conda environment
129+
source /opt/miniconda3/etc/profile.d/conda.sh
130+
conda activate flagscale-train
131+
132+
# Run C++ lint checks
133+
echo "=== Running C++ Lint Checks ==="
134+
bash ./qa/L0_pytorch_lint/test.sh || true
135+
136+
echo ""
137+
echo "-----------------------------------------------------"
138+
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"
139+
echo "-----------------------------------------------------"
140+
continue-on-error: true
141+
142+
- name: PyTorch Python Lint
143+
# timeout-minutes: 5
144+
env:
145+
PYTHON_ONLY: 1
146+
TE_PATH: .
147+
run: |
148+
# Activate conda environment
149+
source /opt/miniconda3/etc/profile.d/conda.sh
150+
conda activate flagscale-train
151+
152+
# Run PyTorch lint checks
153+
echo "=== Running PyTorch Lint Checks ==="
154+
bash ./qa/L0_pytorch_lint/test.sh || true
155+
156+
echo ""
157+
echo "-----------------------------------------------------"
158+
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"
159+
echo "-----------------------------------------------------"
160+
continue-on-error: true
161+
162+
- name: Run L0 PyTorch Debug Unit Tests
163+
# timeout-minutes: 10
164+
env:
165+
TE_PATH: .
166+
run: |
167+
# Activate conda environment
168+
source /opt/miniconda3/etc/profile.d/conda.sh
169+
conda activate flagscale-train
170+
171+
# Run debug unit tests
172+
echo "=== Running L0 PyTorch Debug Unit Tests ==="
173+
bash ./qa/L0_pytorch_debug_unittest/test.sh
174174
175175
- name: Run L0 PyTorch Core Unit Tests
176176
# timeout-minutes: 10

0 commit comments

Comments
 (0)