Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
1f706b9
[release 2.13] Apply Release only changes to 2.13 branch (#186959)
atalman Jun 10, 2026
da8ca4e
[release 2.13] Remove docker image pinning from s390x manywheel build…
atalman Jun 10, 2026
9bf3d71
Update torch-xpu-ops commit pin (#186978)
pytorchbot Jun 10, 2026
d7a7b7d
Fetch tags in unified manywheel build job so release tags are detecte…
atalman Jun 11, 2026
4854fb2
Full git fetch on tag pushes so release manywheel builds detect the t…
pytorchbot Jun 11, 2026
92c0135
Followup - Full git fetch on tag pushes so release manywheel builds d…
pytorchbot Jun 11, 2026
a3aa2c6
Full git fetch on tag pushes so macOS release wheel builds detect the…
pytorchbot Jun 12, 2026
0aae031
[release/2.13] Revert "Skip cudagraphs for kernel-free inductor graph…
atalman Jun 15, 2026
bd111ef
[release/2.13] Revert "Make topk deterministic under deterministic al…
atalman Jun 15, 2026
ab96ed2
[BE] Make spmd_type a CI rather than CD dependency (#187345)
pytorchbot Jun 15, 2026
ed46103
[release/2.13] Revert "[HOP][Dynamic Shapes] Ignore discarded unbacke…
atalman Jun 16, 2026
1c965a7
[CD] Bump 13.0 builds to 13.0.3 (#187099)
pytorchbot Jun 16, 2026
6e54ac8
Skip TestMultiprocessingDeviceType on XPU due to lack of IPC support …
pytorchbot Jun 16, 2026
6673e3b
[xpu][fix] Include kernel_compile_result.h in aoti xpu.h header (#187…
pytorchbot Jun 16, 2026
730dfa1
Handle pyzes import failures gracefully on machines without level zer…
pytorchbot Jun 16, 2026
25d05d1
Revert XPU device-wide synchronization (#187423)
pytorchbot Jun 22, 2026
a6ab33a
[SDPA] Fix 32-bit offset overflow in mem-efficient attention forward …
pytorchbot Jun 22, 2026
645f777
Revert "Preserve FX graph cache guard provenance (#184193)" (#187666)
frgossen Jun 22, 2026
9845bb2
Fix Windows libtorch x86_64 and arm64 packages overwriting each other…
pytorchbot Jun 23, 2026
af333cf
Fix bmm outer product Triton launch on non-current CUDA device (#187983)
pytorchbot Jun 23, 2026
07c4675
[xpu] Fix LSTM oneDNN Integration (#187560)
pytorchbot Jun 25, 2026
058146d
Revive CUDA 12.9 nightly binary builds (#186015) (#188162)
atalman Jun 25, 2026
79715e4
[MPS] Migrate argmin/argmax from MPSGraph to Metal (#188160)
malfet Jun 25, 2026
4e077a7
Remove setuptools upper bound (#188190)
pytorchbot Jun 25, 2026
9330813
Fix build_with_debinfo.py broken by CONFIGURE_DEPENDS globbing (#188192)
pytorchbot Jun 25, 2026
aaac2bf
[release/2.13] Revert "[Reland] Port D104346887/PR 182675 for index_a…
atalman Jun 25, 2026
0bb9b5b
[release/2.13] Revert "dynamo: round-trip torch.cuda.stream ctx mgr a…
atalman Jun 25, 2026
78e737a
[release/2.13] Revert "Tighten generalized scatter graph target (#184…
frgossen Jun 26, 2026
9cabb45
[release/2.13] Update manywheel docker image pin to 78e737ad (#188409)
atalman Jun 29, 2026
0bdbc26
[release/2.13] Add CUDA 12.9 to TORCH_CUDA_ARCH_LIST tables (#188443)
atalman Jun 29, 2026
7986b06
[release/2.13] Bump binary build timeout 280 -> 400 minutes (#188551)
atalman Jun 30, 2026
3e3e24b
[release/2.13] Restrict cuda-bindings to Python < 3.15 for CUDA 12.9 …
atalman Jun 30, 2026
cf30153
[release/2.13] Strip +PTX from CUDA arch list on release/RC builds (#…
atalman Jul 3, 2026
fbfda3b
Make DDP tests accelerator-agnostic
svskvar Mar 2, 2026
4c4d704
Add env setup hooks to distributed test base classes
svskvar Mar 9, 2026
8a47d73
Make Tensor parallel tests backend agnostic
svskvar Mar 9, 2026
dd08f01
Support bf16 compress hooks for accelerator backends beyond CUDA/XPU
svskvar Mar 17, 2026
39f72a9
Add device agnostic changes for common/c10d test cases (#9)
aws-kingrj Mar 18, 2026
52ff7d4
adding test backends device agnostic changes (#11)
aws-kingrj Mar 23, 2026
acbe970
Make Checkpoint Tests Backend Agnostic
svskvar Mar 24, 2026
7828962
add new c10d ops test for privateuse1 (#13)
aws-kingrj Mar 31, 2026
4995c14
Cap world_size to 8 in TensorParallelAPITests
svskvar Apr 1, 2026
79ab114
Revert "Add env setup hooks to distributed test base classes" (#22)
svskvar Apr 4, 2026
c9361b0
Make FSDP v2 tests device-agnostic for PrivateUse1 backends (#24)
AbigailFernandes Apr 6, 2026
1b58146
feat: get supported dtypes with device_availability api for OpInfo dt…
AbigailFernandes Apr 6, 2026
ee19d46
fix: remove stale hooks usage (#28)
AbigailFernandes Apr 7, 2026
a17c6a9
feat: add gradcheck support for different precision (#2)
aws-dixuan Apr 7, 2026
3edb0e8
fix: set world_size for fsdp threaded class to avoid 128 world size (…
AbigailFernandes Apr 7, 2026
4e316a4
adding test_join, quantization, serialization (#23)
aws-kingrj Apr 7, 2026
2a1eef5
Make FSDP v1 tests device-agnostic for PrivateUse1 backends (#26)
AbigailFernandes Apr 7, 2026
24b1d88
Make distributed composable tests device-agnostic for PrivateUse1 (#29)
AbigailFernandes Apr 10, 2026
2b3c22d
feat: Make dynamo tests device-agnostic for PrivateUse1 backends (#31)
AbigailFernandes Apr 16, 2026
01e7007
test: Add privateuse1 device support to test instantiation (#37)
aws-quqian Apr 18, 2026
ba77c51
fix: update error messages to be device agnostic for fsdp v1 (#35)
AbigailFernandes Apr 20, 2026
c6455dd
adding fix for backend_str for fsdp test (#40)
aws-kingrj Apr 21, 2026
626ac41
Make distributed tensor tests accelerator-agnostic (#36)
svskvar Apr 21, 2026
4cd5bb7
device agnostic changes for profiler tests (#38)
aws-kingrj Apr 22, 2026
bf84b00
Respect device capability for complex dtype support in test_pow, test…
AbigailFernandes May 2, 2026
49abaf1
test: gate 2j sample in reference_inputs_where on dtype.is_complex (#50)
AbigailFernandes May 3, 2026
c1d86fa
test: skip device-declared unsupported dtypes in test_dtypes (#51)
AbigailFernandes May 4, 2026
9520e98
test: exclude uint8 from nn.functional.threshold test dtypes (#58)
aws-quqian Jun 9, 2026
42760e8
fix: exclude pytest capture handlers from _handler_watcher count chec…
aws-arashj Jun 16, 2026
5d7ce61
fix: filter pytest handlers by module in _handler_watcher (#63)
aws-arashj Jun 18, 2026
f062d5a
fix: make LoggingTensor log records safe for pytest's formatting hand…
aws-lchangni Jun 26, 2026
afed16b
Make map broadcast tests device-agnostic (#70)
aws-charansg Jul 20, 2026
f323603
Device-generalize dynamo tests to run on accelerator backends (#74)
aws-alexk Jul 23, 2026
2f54c75
Device-generalize dynamo test constants for accelerator backends (#75)
aws-alexk Jul 24, 2026
ff5f6bb
Fix PT2.13 patch replay regressions
aws-mengchiy Jul 27, 2026
5e2aa7d
Device-generalize more dynamo tests to run on accelerator backends
aws-alexk Aug 4, 2026
8423db2
[dynamo] define module-level device_type in test_misc.py
aws-alexk Aug 7, 2026
3eed1b6
Fix fp32 non-associative gradient summation test threshold (#94)
philliptay Aug 10, 2026
aeddd2d
adjust tolerance for float32 all-reduce accuracy
aws-zhenguo Aug 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .ci/docker/common/install_conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ if [ -n "$ANACONDA_PYTHON_VERSION" ]; then
# Install some other packages, including those needed for Python test reporting
pip_install -r /opt/conda/requirements-ci.txt

# Installed spmd-types with --no-deps to avoid pulling torch dependency at this point
pip_install --no-deps spmd-types==0.2.1

if [ -n "$DOCS" ]; then
apt-get update
apt-get -y install expect-dev
Expand Down
17 changes: 15 additions & 2 deletions .ci/libtorch/extract_libtorch_from_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,16 +234,23 @@ def create_libtorch_zip(
return zip_path


def compute_zip_prefix(platform: str, desired_cuda: str, libtorch_variant: str) -> str:
def compute_zip_prefix(
platform: str, desired_cuda: str, libtorch_variant: str, arch: str
) -> str:
"""Compute the zip filename prefix matching existing naming conventions.

Linux: libtorch-shared-with-deps
macOS: libtorch-macos-arm64
Windows: libtorch-win-shared-with-deps (or libtorch-win-arm64-shared-with-deps)

The arch component keeps the Windows x86_64 and arm64 packages from
sharing a filename and overwriting each other in the upload bucket.
"""
if platform == "macos":
return "libtorch-macos-arm64"
elif platform == "windows":
if arch == "arm64":
return f"libtorch-win-arm64-{libtorch_variant}"
return f"libtorch-win-{libtorch_variant}"
else:
return f"libtorch-{libtorch_variant}"
Expand Down Expand Up @@ -273,6 +280,12 @@ def main() -> None:
default="shared-with-deps",
help="Libtorch variant (shared-with-deps, etc.)",
)
parser.add_argument(
"--arch",
default="x86_64",
choices=["x86_64", "arm64"],
help="Target architecture (used to disambiguate Windows package names)",
)
parser.add_argument(
"--git-hash",
default="",
Expand Down Expand Up @@ -316,7 +329,7 @@ def main() -> None:

# Compute zip prefix
zip_prefix = compute_zip_prefix(
args.platform, args.desired_cuda, args.libtorch_variant
args.platform, args.desired_cuda, args.libtorch_variant, args.arch
)

# Split debug symbols on Linux
Expand Down
32 changes: 29 additions & 3 deletions .ci/manywheel/build_env_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@
"x86_64": {50, 60, 70, 75, 80, 86, 90},
"aarch64": {80, 90},
},
"12.9": {
"x86_64": {75, 80, 86, 90, 100, 120},
"aarch64": {80, 90, 100, 120},
},
"13.0": {
"x86_64": {75, 80, 86, 90, 100, 120},
"aarch64": {80, 90, 100, 110, 120},
Expand All @@ -84,14 +88,35 @@
},
}

# Architectures we additionally emit PTX for (forward-compat for newer GPUs).
# Architectures we additionally emit PTX for on nightly/dev builds
# (forward-compat for newer GPUs). Release/RC wheels ship SASS-only to keep
# libtorch_cuda.so size down; see _ptx_arches().
_PTX_ARCHES: set[int] = {120}


def _is_release_build() -> bool:
"""True for release / RC binary builds (vs nightly / dev builds).

Binary builds off a git tag (releases and RCs, e.g. v2.13.0 / v2.13.0-rc1)
get a ``PYTORCH_BUILD_VERSION`` with no ``.dev<date>`` suffix, while
nightlies do -- see .ci/pytorch/binary_populate_env.sh, which relies on the
same ``dev`` check for Triton pinning. A missing/empty version (local or
non-binary builds) is treated as non-release, so PTX is kept.
"""
version = os.environ.get("PYTORCH_BUILD_VERSION", "")
return bool(version) and "dev" not in version


def _ptx_arches() -> set[int]:
"""PTX arches for this build: empty on release/RC, forward-compat set otherwise."""
return set() if _is_release_build() else _PTX_ARCHES


def torch_cuda_arch_list(cuda_version: str, arch: str) -> str:
"""Format TORCH_CUDA_ARCH_LIST for the wheel build (";"-separated).

Returns e.g. "8.0;9.0;10.0;11.0;12.0+PTX" for cuda 13.x aarch64.
Returns e.g. "8.0;9.0;10.0;11.0;12.0+PTX" for cuda 13.x aarch64 on
nightly builds; release/RC builds omit the +PTX suffix (see _ptx_arches()).

CUDA 13.x dropped sm_50/60/70, so we must NOT leave this empty --
CMake's defaults still include compute_50 which nvcc 13 rejects with
Expand All @@ -102,8 +127,9 @@ def torch_cuda_arch_list(cuda_version: str, arch: str) -> str:
archs = TORCH_CUDA_ARCH_LIST_TABLE[cuda_version].get(arch)
if not archs:
raise SystemExit(f"no TORCH_CUDA_ARCH_LIST for cuda {cuda_version} on {arch}")
ptx_arches = _ptx_arches()
return ";".join(
f"{cc // 10}.{cc % 10}" + ("+PTX" if cc in _PTX_ARCHES else "")
f"{cc // 10}.{cc % 10}" + ("+PTX" if cc in ptx_arches else "")
for cc in sorted(archs)
)

Expand Down
9 changes: 0 additions & 9 deletions .ci/pytorch/binary_populate_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,6 @@ if [[ "$PACKAGE_TYPE" =~ .*wheel.* && -n "$PYTORCH_BUILD_VERSION" && "$PYTORCH_B
fi
fi

if [[ "$PACKAGE_TYPE" =~ .*wheel.* ]]; then
SPMD_TYPES_REQUIREMENT="spmd-types==0.2.1"
if [[ -z "${PYTORCH_EXTRA_INSTALL_REQUIREMENTS:-}" ]]; then
export PYTORCH_EXTRA_INSTALL_REQUIREMENTS="${SPMD_TYPES_REQUIREMENT}"
else
export PYTORCH_EXTRA_INSTALL_REQUIREMENTS="${PYTORCH_EXTRA_INSTALL_REQUIREMENTS} | ${SPMD_TYPES_REQUIREMENT}"
fi
fi

USE_GLOO_WITH_OPENSSL="OFF"
if [[ "$GPU_ARCH_TYPE" =~ .*aarch64.* ]]; then
USE_GOLD_LINKER="OFF"
Expand Down
14 changes: 14 additions & 0 deletions .ci/pytorch/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,20 @@ if [[ "$BUILD_ENVIRONMENT" != *libtorch* ]]; then
python -m build --wheel --no-isolation
fi
pip_install_whl "$(echo dist/*.whl)"

# Smoke-test tools/build_with_debinfo.py against the real build tree: it must
# still emit a debug-rebuild plan with a -g compile and the libtorch_python
# relink. This guards against build-system changes (e.g. a new
# CONFIGURE_DEPENDS glob scheme) silently breaking the tool, which only works
# on a from-source build that test jobs don't have. --dry-run reads the tree
# without rebuilding, so it leaves the checkout clean (assert_git_not_dirty).
if [[ -f build/compile_commands.json ]] && command -v ninja > /dev/null && grep -q "csrc/Module.cpp" build/compile_commands.json; then
debinfo_plan="$(python tools/build_with_debinfo.py --dry-run torch/csrc/Module.cpp)"
echo "${debinfo_plan}"
grep -qE ' -g( |$)' <<< "$debinfo_plan" || { echo "ERROR: build_with_debinfo --dry-run emitted no -g debug compile flag"; exit 1; }
grep -q 'libtorch_python' <<< "$debinfo_plan" || { echo "ERROR: build_with_debinfo --dry-run emitted no libtorch_python link command"; exit 1; }
fi

if [[ "$BUILD_ENVIRONMENT" == *full-debug* ]]; then
# Regression test for https://github.com/pytorch/pytorch/issues/164297
# Torch should be importable and that's about it
Expand Down
2 changes: 1 addition & 1 deletion .ci/pytorch/common_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ function install_torchrec_and_fbgemm() {

function clone_pytorch_xla() {
if [[ ! -d ./xla ]]; then
git clone --recursive --quiet https://github.com/pytorch/xla.git
git clone --recursive -b r2.13 https://github.com/pytorch/xla.git
pushd xla
# pin the xla hash so that we don't get broken by changes to xla
git checkout "$(cat ../.github/ci_commit_pins/xla.txt)"
Expand Down
2 changes: 1 addition & 1 deletion .github/ci_commit_pins/xla.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
41398bfff334fc8d3b1c00be6ea8cc5411f6d6bf
r2.13
4 changes: 2 additions & 2 deletions .github/scripts/filter_test_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
}

# The link to the published list of disabled jobs
DISABLED_JOBS_URL = "https://ossci-metrics.s3.amazonaws.com/disabled-jobs.json"
DISABLED_JOBS_URL = "https://ossci-metrics.s3.amazonaws.com/disabled-jobs.json?versionId=Oekxne_7ooz8C5nmynVmrc5UzuZ875Tr"
# and unstable jobs
UNSTABLE_JOBS_URL = "https://ossci-metrics.s3.amazonaws.com/unstable-jobs.json"
UNSTABLE_JOBS_URL = "https://ossci-metrics.s3.amazonaws.com/unstable-jobs.json?versionId=V37EHozs4nE3_iE8GfJ8sctdQzmU9zPH"

# Some constants used to handle disabled and unstable jobs
JOB_NAME_SEP = "/"
Expand Down
69 changes: 51 additions & 18 deletions .github/scripts/generate_binary_build_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,17 @@
REPO_ROOT = SCRIPT_DIR.parent.parent


CUDA_ARCHES = ["12.6", "13.0", "13.2"]
CUDA_ARCHES = ["12.6", "12.9", "13.0", "13.2"]
CUDA_STABLE = "13.0"
CUDA_ARCHES_FULL_VERSION = {
"12.6": "12.6.3",
"13.0": "13.0.2",
"12.9": "12.9.1",
"13.0": "13.0.3",
"13.2": "13.2.1",
}
CUDA_ARCHES_CUDNN_VERSION = {
"12.6": "9",
"12.9": "9",
"13.0": "9",
"13.2": "9",
}
Expand All @@ -47,14 +49,11 @@

CUDA_AARCH64_ARCHES = [
"12.6-aarch64",
"12.9-aarch64",
"13.0-aarch64",
"13.2-aarch64",
]


# WARNING: For CUDA 13.0, cublas is pinned to a version range rather
# than an exact version. A broken cublas release within that range will be
# silently pulled in.
PYTORCH_EXTRA_INSTALL_REQUIREMENTS = {
"12.6": (
"cuda-toolkit[nvrtc,cudart,cupti,cufft,curand,cusolver,cusparse,cublas,cufile,nvjitlink,nvtx]==12.6.3; platform_system == 'Linux' | "
Expand All @@ -64,9 +63,16 @@
"nvidia-nccl-cu12==2.29.3; platform_system == 'Linux' | "
"nvidia-nvshmem-cu12==3.4.5; platform_system == 'Linux'"
),
"12.9": (
"cuda-toolkit[nvrtc,cudart,cupti,cufft,curand,cusolver,cusparse,cublas,cufile,nvjitlink,nvtx]==12.9.1; platform_system == 'Linux' | "
"cuda-bindings>=12.9.4,<13; platform_system == 'Linux' and python_version < '3.15' | "
"nvidia-cudnn-cu12==9.20.0.48; platform_system == 'Linux' | "
"nvidia-cusparselt-cu12==0.8.1; platform_system == 'Linux' | "
"nvidia-nccl-cu12==2.29.7; platform_system == 'Linux' | "
"nvidia-nvshmem-cu12==3.4.5; platform_system == 'Linux'"
),
"13.0": (
"cuda-toolkit[nvrtc,cudart,cupti,cufft,curand,cusolver,cusparse,cufile,nvjitlink,nvtx]==13.0.2; platform_system == 'Linux' | "
"nvidia-cublas>=13.1.0.3,<=13.1.1.3; platform_system == 'Linux' | "
"cuda-toolkit[nvrtc,cudart,cupti,cufft,curand,cusolver,cusparse,cublas,cufile,nvjitlink,nvtx]==13.0.3; platform_system == 'Linux' | "
"cuda-bindings>=13.0.3,<14; platform_system == 'Linux' and python_version < '3.15' | "
"nvidia-cudnn-cu13==9.20.0.48; platform_system == 'Linux' | "
"nvidia-cusparselt-cu13==0.8.1; platform_system == 'Linux' | "
Expand Down Expand Up @@ -304,6 +310,24 @@ def arch_type(arch_version: str) -> str:
"cpu-s390x": "manylinuxs390x-builder:cpu-s390x",
}

# RELEASE-ONLY: pin the manywheel builder images to a fixed build so the release
# uses a reproducible toolchain instead of main's floating tags. The suffix is
# the .ci/docker tree hash (`git rev-parse HEAD:.ci/docker`), i.e. the same tag
# .github/actions/binary-docker-build publishes. Only linux manywheel builds run
# inside these containers, so only those images are pinned. s390x is excluded:
# its builder images are built locally on self-hosted runners and never published
# to docker.io under the pinned tag, so pinning it breaks the image pull.
DOCKER_IMAGE_PIN = "78e737ad29420ffc4800e677c51e2a852caf8359"
MANYWHEEL_OSES = ("linux", "linux-aarch64")


def wheel_container_image_tag_prefix(arch_version: str, os: str) -> str:
tag_prefix = WHEEL_CONTAINER_IMAGES[arch_version].split(":")[1]
if os in MANYWHEEL_OSES:
return f"{tag_prefix}-{DOCKER_IMAGE_PIN}"
return tag_prefix


RELEASE = "release"
DEBUG = "debug"

Expand Down Expand Up @@ -344,7 +368,9 @@ def generate_libtorch_matrix(
if arches is None:
arches = ["cpu"]
if os == "windows":
arches += CUDA_ARCHES
# CUDA 12.9 is only built for Linux
windows_cuda_arches = list_without(CUDA_ARCHES, ["12.9"])
arches += windows_cuda_arches
if libtorch_variants is None:
libtorch_variants = [
"shared-with-deps",
Expand Down Expand Up @@ -397,7 +423,9 @@ def generate_wheels_matrix(
if os == "linux":
arches += CUDA_ARCHES + ROCM_ARCHES + XPU_ARCHES
elif os == "windows":
arches += CUDA_ARCHES + XPU_ARCHES
# CUDA 12.9 is only built for Linux
windows_cuda_arches = list_without(CUDA_ARCHES, ["12.9"])
arches += windows_cuda_arches + XPU_ARCHES
elif os == "linux-aarch64":
# Separate new if as the CPU type is different and
# uses different build/test scripts
Expand Down Expand Up @@ -439,7 +467,7 @@ def generate_wheels_matrix(
# cuda linux wheels require PYTORCH_EXTRA_INSTALL_REQUIREMENTS to install

if (
arch_version in ["13.2", "13.0", "12.6"]
arch_version in ["13.2", "13.0", "12.9", "12.6"]
and os == "linux"
or arch_version in CUDA_AARCH64_ARCHES
):
Expand All @@ -453,9 +481,9 @@ def generate_wheels_matrix(
"container_image": WHEEL_CONTAINER_IMAGES[arch_version].split(
":"
)[0],
"container_image_tag_prefix": WHEEL_CONTAINER_IMAGES[
arch_version
].split(":")[1],
"container_image_tag_prefix": wheel_container_image_tag_prefix(
arch_version, os
),
"package_type": package_type,
"pytorch_extra_install_requirements": (
PYTORCH_EXTRA_INSTALL_REQUIREMENTS[
Expand Down Expand Up @@ -484,9 +512,9 @@ def generate_wheels_matrix(
"container_image": WHEEL_CONTAINER_IMAGES[arch_version].split(
":"
)[0],
"container_image_tag_prefix": WHEEL_CONTAINER_IMAGES[
arch_version
].split(":")[1],
"container_image_tag_prefix": wheel_container_image_tag_prefix(
arch_version, os
),
"package_type": package_type,
"build_name": f"{package_type}-py{python_version}-{gpu_arch_type}{gpu_arch_version}".replace(
".", "_"
Expand Down Expand Up @@ -516,6 +544,7 @@ def generate_libtorch_extraction_configs(
uses to add an extraction job that depends on that wheel's build job.
"""
preferred_python = "3.11" if os == "windows-arm64" else "3.10"
arch = "arm64" if os == "windows-arm64" else "x86_64"

# Group wheel configs by (gpu_arch_type, gpu_arch_version)
arch_to_config: dict[tuple[str, str], dict[str, str]] = {}
Expand All @@ -532,7 +561,10 @@ def generate_libtorch_extraction_configs(

desired_cuda = source_config["desired_cuda"]
libtorch_variant = "shared-with-deps"
build_name = f"libtorch-{gpu_arch_type}{gpu_arch_version}-{libtorch_variant}-release".replace(
# Include arch in the build name so windows x86_64 and arm64 libtorch
# packages don't share a name and overwrite each other on upload.
arch_tag = f"{arch}-" if os == "windows-arm64" else ""
build_name = f"libtorch-{arch_tag}{gpu_arch_type}{gpu_arch_version}-{libtorch_variant}-release".replace(
".", "_"
)

Expand All @@ -546,6 +578,7 @@ def generate_libtorch_extraction_configs(
"desired_cuda": desired_cuda,
"gpu_arch_type": gpu_arch_type,
"gpu_arch_version": gpu_arch_version,
"arch": arch,
}
)

Expand Down
4 changes: 2 additions & 2 deletions .github/templates/common.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{%- set upload_artifact_action = "actions/upload-artifact@v4.4.0" -%}
{%- set download_artifact_action = "actions/download-artifact@v4.1.7" -%}

{%- set timeout_minutes = 280 -%}
{%- set timeout_minutes = 400 -%}
{%- set timeout_minutes_windows_binary = 360 -%}

{%- macro concurrency(build_environment) -%}
Expand Down Expand Up @@ -32,7 +32,7 @@ concurrency:
{%- macro setup_ec2_windows() -%}
!{{ display_ec2_information() }}
- name: "[FB EMPLOYEES] Enable SSH (Click me for login details)"
uses: pytorch/test-infra/.github/actions/setup-ssh@main
uses: pytorch/test-infra/.github/actions/setup-ssh@release/2.13
continue-on-error: true
with:
github-secret: ${{ secrets.GITHUB_TOKEN }}
Expand Down
7 changes: 5 additions & 2 deletions .github/templates/linux_binary_build_workflow.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ jobs:
get-label-type:
if: github.repository_owner == 'pytorch'
name: get-label-type
uses: pytorch/pytorch/.github/workflows/_runner-determinator.yml@main
uses: pytorch/pytorch/.github/workflows/_runner-determinator.yml@release/2.13
with:
triggering_actor: ${{ github.triggering_actor }}
issue_owner: ${{ github.event.pull_request.user.login || github.event.issue.user.login }}
Expand Down Expand Up @@ -173,7 +173,10 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
fetch-depth: 2
# Full fetch on tag pushes so the release tag is visible to
# `git describe --tags --exact`; nightlies stay shallow for speed.
fetch-depth: ${{ github.ref_type != 'tag' && 2 || 0 }}
fetch-tags: ${{ github.ref_type == 'tag' }}
submodules: recursive
show-progress: false
- name: Populate binary env
Expand Down
Loading