Skip to content

Commit 912f458

Browse files
using p10 runner
1 parent 7246fff commit 912f458

File tree

1 file changed

+41
-41
lines changed

1 file changed

+41
-41
lines changed

.ci/pytorch/build.sh

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -303,49 +303,49 @@ else
303303
fi
304304
pip_install_whl "$(echo dist/*.whl)"
305305

306-
# # TODO: I'm not sure why, but somehow we lose verbose commands
307-
# set -x
308-
309-
# assert_git_not_dirty
310-
# # Copy ninja build logs to dist folder
311-
# mkdir -p dist
312-
# if [ -f build/.ninja_log ]; then
313-
# cp build/.ninja_log dist
314-
# fi
315-
316-
# if [[ "$BUILD_ENVIRONMENT" == *rocm* ]]; then
317-
# # remove sccache wrappers post-build; runtime compilation of MIOpen kernels does not yet fully support them
318-
# sudo rm -f /opt/cache/bin/cc
319-
# sudo rm -f /opt/cache/bin/c++
320-
# sudo rm -f /opt/cache/bin/gcc
321-
# sudo rm -f /opt/cache/bin/g++
322-
# pushd /opt/rocm/llvm/bin
323-
# if [[ -d original ]]; then
324-
# sudo mv original/clang .
325-
# sudo mv original/clang++ .
326-
# fi
327-
# sudo rm -rf original
328-
# popd
329-
# fi
330-
331-
# CUSTOM_TEST_ARTIFACT_BUILD_DIR=${CUSTOM_TEST_ARTIFACT_BUILD_DIR:-"build/custom_test_artifacts"}
332-
# CUSTOM_TEST_USE_ROCM=$([[ "$BUILD_ENVIRONMENT" == *rocm* ]] && echo "ON" || echo "OFF")
333-
# CUSTOM_TEST_MODULE_PATH="${PWD}/cmake/public"
334-
# mkdir -pv "${CUSTOM_TEST_ARTIFACT_BUILD_DIR}"
306+
# TODO: I'm not sure why, but somehow we lose verbose commands
307+
set -x
308+
309+
assert_git_not_dirty
310+
# Copy ninja build logs to dist folder
311+
mkdir -p dist
312+
if [ -f build/.ninja_log ]; then
313+
cp build/.ninja_log dist
314+
fi
335315

336-
# # Build custom operator tests.
337-
# CUSTOM_OP_BUILD="${CUSTOM_TEST_ARTIFACT_BUILD_DIR}/custom-op-build"
338-
# CUSTOM_OP_TEST="$PWD/test/custom_operator"
339-
# python --version
340-
# SITE_PACKAGES="$(python -c 'import site; print(";".join([x for x in site.getsitepackages()] + [x + "/torch" for x in site.getsitepackages()]))')"
316+
if [[ "$BUILD_ENVIRONMENT" == *rocm* ]]; then
317+
# remove sccache wrappers post-build; runtime compilation of MIOpen kernels does not yet fully support them
318+
sudo rm -f /opt/cache/bin/cc
319+
sudo rm -f /opt/cache/bin/c++
320+
sudo rm -f /opt/cache/bin/gcc
321+
sudo rm -f /opt/cache/bin/g++
322+
pushd /opt/rocm/llvm/bin
323+
if [[ -d original ]]; then
324+
sudo mv original/clang .
325+
sudo mv original/clang++ .
326+
fi
327+
sudo rm -rf original
328+
popd
329+
fi
341330

342-
# mkdir -p "$CUSTOM_OP_BUILD"
343-
# pushd "$CUSTOM_OP_BUILD"
344-
# cmake "$CUSTOM_OP_TEST" -DCMAKE_PREFIX_PATH="$SITE_PACKAGES" -DPython_EXECUTABLE="$(which python)" \
345-
# -DCMAKE_MODULE_PATH="$CUSTOM_TEST_MODULE_PATH" -DUSE_ROCM="$CUSTOM_TEST_USE_ROCM"
346-
# make VERBOSE=1
347-
# popd
348-
# assert_git_not_dirty
331+
CUSTOM_TEST_ARTIFACT_BUILD_DIR=${CUSTOM_TEST_ARTIFACT_BUILD_DIR:-"build/custom_test_artifacts"}
332+
CUSTOM_TEST_USE_ROCM=$([[ "$BUILD_ENVIRONMENT" == *rocm* ]] && echo "ON" || echo "OFF")
333+
CUSTOM_TEST_MODULE_PATH="${PWD}/cmake/public"
334+
mkdir -pv "${CUSTOM_TEST_ARTIFACT_BUILD_DIR}"
335+
336+
# Build custom operator tests.
337+
CUSTOM_OP_BUILD="${CUSTOM_TEST_ARTIFACT_BUILD_DIR}/custom-op-build"
338+
CUSTOM_OP_TEST="$PWD/test/custom_operator"
339+
python --version
340+
SITE_PACKAGES="$(python -c 'import site; print(";".join([x for x in site.getsitepackages()] + [x + "/torch" for x in site.getsitepackages()]))')"
341+
342+
mkdir -p "$CUSTOM_OP_BUILD"
343+
pushd "$CUSTOM_OP_BUILD"
344+
cmake "$CUSTOM_OP_TEST" -DCMAKE_PREFIX_PATH="$SITE_PACKAGES" -DPython_EXECUTABLE="$(which python)" \
345+
-DCMAKE_MODULE_PATH="$CUSTOM_TEST_MODULE_PATH" -DUSE_ROCM="$CUSTOM_TEST_USE_ROCM"
346+
make VERBOSE=1
347+
popd
348+
assert_git_not_dirty
349349

350350
# # Build jit hook tests
351351
# JIT_HOOK_BUILD="${CUSTOM_TEST_ARTIFACT_BUILD_DIR}/jit-hook-build"

0 commit comments

Comments
 (0)