Skip to content

Commit 34fed00

Browse files
committed
Another tweak
1 parent 3b1938f commit 34fed00

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.ci/scripts/utils.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,15 @@ install_pytorch_and_domains() {
7474
local cached_torch_wheel="https://gha-artifacts.s3.us-east-1.amazonaws.com/${torch_wheel_path}/${torch_wheel_name}"
7575
# Cache PyTorch wheel is only needed on MacOS, Linux CI already has this as part
7676
# of the Docker image
77+
local torch_wheel_not_found=0
7778
if [[ "${system_name}" == "Darwin" ]]; then
78-
pip install "${cached_torch_wheel}" || TORCH_WHEEL_NOT_FOUND=1
79+
pip install "${cached_torch_wheel}" || torch_wheel_not_found=1
7980
else
80-
TORCH_WHEEL_NOT_FOUND=1
81+
torch_wheel_not_found=1
8182
fi
8283

8384
# Found no such wheel, we will build it from source then
84-
if [[ "${TORCH_WHEEL_NOT_FOUND:-0}" == "1" ]]; then
85+
if [[ "${torch_wheel_not_found}" == "1" ]]; then
8586
echo "No cached wheel found, continue with building PyTorch at ${TORCH_VERSION}"
8687

8788
git submodule update --init --recursive

0 commit comments

Comments
 (0)