mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
Use new sccache for RocM builds (#42134)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/42134 Reviewed By: seemethere Differential Revision: D22782146 Pulled By: malfet fbshipit-source-id: 85ba69a705600e30ae0eddbf654298b3dc6f96ed
This commit is contained in:
committed by
Facebook GitHub Bot
parent
6bd88f581a
commit
2bc7dae2fc
@ -7,6 +7,13 @@
|
|||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
COMPACT_JOB_NAME="${BUILD_ENVIRONMENT}"
|
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"
|
source "$(dirname "${BASH_SOURCE[0]}")/common.sh"
|
||||||
|
|
||||||
# For distributed, four environmental configs:
|
# 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
|
# ROCm CI is using Caffe2 docker images, which needs these wrapper
|
||||||
# scripts to correctly use sccache.
|
# scripts to correctly use sccache.
|
||||||
if [ -n "${SCCACHE_BUCKET}" ]; then
|
if [[ -n "${SCCACHE_BUCKET}" && -z "$IN_CIRCLECI" ]]; then
|
||||||
mkdir -p ./sccache
|
mkdir -p ./sccache
|
||||||
|
|
||||||
SCCACHE="$(which sccache)"
|
SCCACHE="$(which sccache)"
|
||||||
@ -150,8 +157,8 @@ if [[ "$BUILD_ENVIRONMENT" == *rocm* ]]; then
|
|||||||
export PATH="$CACHE_WRAPPER_DIR:$PATH"
|
export PATH="$CACHE_WRAPPER_DIR:$PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Set ROCM_ARCH to gtx900 and gtx906
|
if [[ -n "$IN_CIRCLECI" ]]; then
|
||||||
if [[ -n "$CIRCLECI" ]]; then
|
# Set ROCM_ARCH to gtx900 and gtx906 in CircleCI
|
||||||
echo "Limiting PYTORCH_ROCM_ARCH to gfx90[06] for CircleCI builds"
|
echo "Limiting PYTORCH_ROCM_ARCH to gfx90[06] for CircleCI builds"
|
||||||
export PYTORCH_ROCM_ARCH="gfx900;gfx906"
|
export PYTORCH_ROCM_ARCH="gfx900;gfx906"
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user