From 85a114c6b8c9e48554791e94c8cb0a2f41eae4e3 Mon Sep 17 00:00:00 2001 From: RJ Ascani Date: Mon, 8 Jun 2026 13:51:10 -0700 Subject: [PATCH] Cap PyTorch build parallelism for all GCC docker images The gcc14 docker build was intermittently timing out on linux.4xlarge runners because it built PyTorch from source with unlimited parallelism, unlike gcc11 which capped MAX_JOBS=6. Generalize the guard to all GCC variants so gcc14, gcc15, and future additions get the same protection. Images that set SKIP_PYTORCH (gcc9-nopytorch, cuda-windows) are unaffected because the existing SKIP_PYTORCH guard excludes them. Fixes #19881 Co-Authored-By: Claude Opus 4.6 (1M context) --- .ci/docker/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ci/docker/build.sh b/.ci/docker/build.sh index 673b5b4fd4b..4205605bd35 100755 --- a/.ci/docker/build.sh +++ b/.ci/docker/build.sh @@ -102,7 +102,7 @@ esac TORCH_VERSION=$(cat ci_commit_pins/pytorch.txt) BUILD_DOCS=1 -if [[ "${GCC_VERSION:-}" == "11" && -z "${SKIP_PYTORCH:-}" ]]; then +if [[ -n "${GCC_VERSION:-}" && -z "${SKIP_PYTORCH:-}" ]]; then PYTORCH_BUILD_MAX_JOBS=6 fi