mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +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
|
||||
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
|
||||
|
Reference in New Issue
Block a user