diff --git a/.jenkins/pytorch/build.sh b/.jenkins/pytorch/build.sh index 7d8324330e6..8730b61c00d 100755 --- a/.jenkins/pytorch/build.sh +++ b/.jenkins/pytorch/build.sh @@ -7,6 +7,13 @@ # shellcheck disable=SC2034 COMPACT_JOB_NAME="${BUILD_ENVIRONMENT}" +# Temp: use new sccache +if [[ -n "$IN_CIRCLECI" && "$BUILD_ENVIRONMENT" == *rocm* ]]; then + # Download customized sccache + sudo curl --retry 3 http://repo.radeon.com/misc/.sccache_amd/sccache -o /opt/cache/bin/sccache + sudo chmod 755 /opt/cache/bin/sccache +fi + source "$(dirname "${BASH_SOURCE[0]}")/common.sh" # For distributed, four environmental configs: @@ -126,7 +133,7 @@ if [[ "$BUILD_ENVIRONMENT" == *rocm* ]]; then # ROCm CI is using Caffe2 docker images, which needs these wrapper # scripts to correctly use sccache. - if [ -n "${SCCACHE_BUCKET}" ]; then + if [[ -n "${SCCACHE_BUCKET}" && -z "$IN_CIRCLECI" ]]; then mkdir -p ./sccache SCCACHE="$(which sccache)" @@ -150,8 +157,8 @@ if [[ "$BUILD_ENVIRONMENT" == *rocm* ]]; then export PATH="$CACHE_WRAPPER_DIR:$PATH" fi - # Set ROCM_ARCH to gtx900 and gtx906 - if [[ -n "$CIRCLECI" ]]; then + if [[ -n "$IN_CIRCLECI" ]]; then + # Set ROCM_ARCH to gtx900 and gtx906 in CircleCI echo "Limiting PYTORCH_ROCM_ARCH to gfx90[06] for CircleCI builds" export PYTORCH_ROCM_ARCH="gfx900;gfx906" fi