Skip to content

Commit c0bb9a5

Browse files
TE wheel CI: skip aiter's fragile compiler-ABI probe (TORCH_DONT_CHECK_COMPILER_ABI=1), drop dead build env vars, and bound build parallelism to nproc-10 (180 only on >200-CPU hosts).
1 parent 48f6e7a commit c0bb9a5

1 file changed

Lines changed: 16 additions & 4 deletions

File tree

.github/workflows/build_rocm_transformer_engine_wheel_weekly.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,16 +117,28 @@ jobs:
117117
export USE_ROCM=1
118118
export HIP_PATH=/opt/rocm
119119
export NVTE_FRAMEWORK=jax
120-
export CMAKE_BUILD_PARALLEL_LEVEL=64
121120
export NVTE_USE_ROCM=1
122121
export NVTE_FUSED_ATTN_AOTRITON=0
123-
export NVTE_BUILD_MAX_JOBS=180
122+
# Bound build parallelism
123+
NCPU="$(nproc)"
124+
if [ "${NCPU}" -gt 200 ]; then
125+
BUILD_JOBS=180
126+
else
127+
BUILD_JOBS=$((NCPU - 10))
128+
[ "${BUILD_JOBS}" -lt 1 ] && BUILD_JOBS=1
129+
fi
130+
echo "Detected ${NCPU} CPUs -> using ${BUILD_JOBS} build jobs"
131+
export CMAKE_BUILD_PARALLEL_LEVEL="${BUILD_JOBS}"
132+
export NVTE_BUILD_MAX_JOBS="${BUILD_JOBS}"
133+
134+
# CK-JIT sets CXX to the cxx_interceptor wrapper; aiter's unguarded ABI
135+
# probe (`check_compiler_ok_for_platform` -> `[CXX, "-v"]`) then aborts the
136+
# build when the wrapper's `-v` exits non-zero. Skip that check.
137+
export TORCH_DONT_CHECK_COMPILER_ABI=1
124138
125139
echo "=== Building TE wheel for ${SELECTOR} (gfx=${GFX_ARCH}) ==="
126140
pushd TransformerEngine >/dev/null
127141
rm -rf build dist
128-
export PYTHONPATH="$(pwd)/3rdparty/hipify_torch${PYTHONPATH:+:${PYTHONPATH}}"
129-
export PYTORCH_ROCM_ARCH="${GFX_ARCH}"
130142
export NVTE_ROCM_ARCH="${GFX_ARCH}"
131143
python3 setup.py bdist_wheel
132144
wheel_path="$(

0 commit comments

Comments
 (0)