Skip to content

Update torch pin to 2.11 release candidate#18287

Merged
mergennachin merged 7 commits intomainfrom
mergennachin/update_to_release_candidate
Mar 18, 2026
Merged

Update torch pin to 2.11 release candidate#18287
mergennachin merged 7 commits intomainfrom
mergennachin/update_to_release_candidate

Conversation

@mergennachin
Copy link
Contributor

@mergennachin mergennachin commented Mar 18, 2026

Trying to pin to nightly 3.18 but the some linux cuda wheels weren't successfully built last night.

#18187

Need to pin to stable release candidate due to time criticality.

Will need to revert this PR and pin normally to torch nightlies

mergennachin and others added 4 commits March 18, 2026 07:05
Fix parakeet/voxtral realtime export using PyTorch release. In both
`export_parakeet_tdt.py` and `export_voxtral_rt.py`, replaced the manual
decomposition dictionary with `torch.export.default_decompositions()`
and added the custom `_linear_bias_decomposition` for
`torch.ops.aten.linear.default`.
Copilot AI review requested due to automatic review settings March 18, 2026 11:41
@pytorch-bot
Copy link

pytorch-bot bot commented Mar 18, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/18287

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 Awaiting Approval, 1 New Failure, 9 Cancelled Jobs, 3 Unrelated Failures

As of commit af00588 with merge base b1373e8 (image):

AWAITING APPROVAL - The following workflow needs approval before CI can run:

NEW FAILURE - The following job has failed:

CANCELLED JOBS - The following jobs were cancelled. Please retry:

BROKEN TRUNK - The following jobs failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 18, 2026
@github-actions
Copy link

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the repository’s PyTorch integration toward the 2.11 release/RC line, adjusts dependency installation sources, and incorporates a ROCm-specific complex math workaround alongside export decomposition fixes for Metal-related flows.

Changes:

  • Switch PyTorch install flows to use the PyTorch “test” wheel index and pin torch/vision/audio versions for that path.
  • Update model export scripts (parakeet/voxtral realtime) to use torch.export.default_decompositions() plus a custom linear-bias decomposition.
  • Add a HIP-specific complex<float> pow implementation intended to mitigate a ROCm 7.2 numerical regression.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
torch_pin.py Adjusts torch pin metadata (nightly pin no longer a live Python constant).
runtime/core/portable_type/c10/c10/util/complex_math.h Adds HIP-specific pow specialization for complex<float> using FMA-based multiplication.
install_requirements.py Moves install base URL to PyTorch “test” index and hardcodes torch/vision/audio versions for the “nightly” path.
exir/sym_util.py Uses guarding_hint_or_throw when available, falling back to deprecated size_hint.
examples/models/voxtral_realtime/export_voxtral_rt.py Uses default decompositions table with a custom linear decomposition override.
examples/models/parakeet/export_parakeet_tdt.py Uses default decompositions table with a custom linear decomposition override.
.ci/scripts/utils.sh Pins torchaudio/torchvision to release branches instead of commit-pin files.
.ci/scripts/test_wheel_package_qnn.sh Switches torch install to PyTorch “test” index and removes NIGHTLY_VERSION usage.
.ci/docker/common/install_pytorch.sh Pins torchaudio/torchvision to release branches in Docker build.
.ci/docker/ci_commit_pins/pytorch.txt Changes PyTorch pin from a commit SHA to release/2.11.
Comments suppressed due to low confidence (1)

install_requirements.py:28

  • install_requirements.py still describes "nightly" behavior and references NIGHTLY_VERSION/hud.pytorch.org nightly pins, but the script now installs from the /whl/test index and no longer uses NIGHTLY_VERSION. Please update these top-of-file notes to match the new release/RC/test-index workflow so users don’t follow stale instructions.
# The pip repository that hosts nightly torch packages.
# This will be dynamically set based on CUDA availability and CUDA backend enabled/disabled.
TORCH_URL_BASE = "https://download.pytorch.org/whl/test"

# Since ExecuTorch often uses main-branch features of pytorch, only the nightly
# pip versions will have the required features.
#
# NOTE: If a newly-fetched version of the executorch repo changes the value of
# NIGHTLY_VERSION, you should re-run this script to install the necessary
# package versions.
#
# NOTE: If you're changing, make the corresponding change in .ci/docker/ci_commit_pins/pytorch.txt
# by picking the hash from the same date in
# https://hud.pytorch.org/hud/pytorch/pytorch/nightly/ @lint-ignore

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 18, 2026 11:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR temporarily shifts ExecuTorch’s PyTorch dependency strategy from a date-stamped nightly pin to a PyTorch 2.11 release-candidate/stable track (motivated by missing/broken nightly CUDA wheels), and updates a ROCm-specific complex math implementation to avoid a ROCm 7.2 regression.

Changes:

  • Switch installation logic to use the PyTorch whl/test index and pin torch/torchvision/torchaudio to 2.11/0.26 versions.
  • Update CI/docker scripts to use release/* refs for PyTorch domain libraries and set the PyTorch pin file to release/2.11.
  • Add a HIP-specific pow(complex<float>, complex<float>) specialization using an FMA-preserving multiply to mitigate ROCm 7.2 numerical regression.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
torch_pin.py Comments out NIGHTLY_VERSION to reflect temporary non-nightly pin.
runtime/core/portable_type/c10/c10/util/complex_math.h Adds HIP specialization for complex pow to address ROCm regression.
install_requirements.py Points installs at whl/test and hard-pins torch/domain versions.
exir/sym_util.py Uses guarding_hint_or_throw when available, with fallback to deprecated size_hint.
examples/models/voxtral_realtime/export_voxtral_rt.py Uses default_decompositions() table and overrides linear decomposition.
examples/models/parakeet/export_parakeet_tdt.py Same decomposition-table approach for Metal export.
.ci/scripts/utils.sh Pins audio/vision to release/* refs instead of commit pins.
.ci/scripts/test_wheel_package_qnn.sh Stops composing nightly torch version; installs torch==${TORCH_VERSION} from whl/test (extra index).
.ci/docker/common/install_pytorch.sh Pins audio/vision to release/* refs in Docker build.
.ci/docker/ci_commit_pins/pytorch.txt Changes PyTorch pin from a SHA to release/2.11.
Comments suppressed due to low confidence (1)

install_requirements.py:69

  • torch_url is derived from the PyTorch wheel index (CPU/CUDA via determine_torch_url), but it’s passed via --extra-index-url. Now that torch==2.11.0 exists on PyPI, pip may prefer the PyPI (CPU) wheel over the CUDA wheel from download.pytorch.org, and it also won’t reliably select a release-candidate from the whl/test index. To ensure the intended wheel is installed, prefer making torch_url the primary index (--index-url) for the torch/vision/audio installs (and keep PyPI as an extra index for other deps).
    torch_url = determine_torch_url(TORCH_URL_BASE)

    # pip packages needed by exir.
    TORCH_PACKAGE = [
        # Setting use_pytorch_nightly to false to test the pinned PyTorch commit. Note
        # that we don't need to set any version number there because they have already
        # been installed on CI before this step, so pip won't reinstall them
        ("torch==2.11.0" if use_pytorch_nightly else "torch"),
    ]

    # Install the requirements for core ExecuTorch package.
    # `--extra-index-url` tells pip to look for package
    # versions on the provided URL if they aren't available on the default URL.
    subprocess.run(
        [
            sys.executable,
            "-m",
            "pip",
            "install",
            "-r",
            "requirements-dev.txt",
            *TORCH_PACKAGE,
            "--extra-index-url",
            torch_url,
        ],

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines 15 to 20
# The pip repository that hosts nightly torch packages.
# This will be dynamically set based on CUDA availability and CUDA backend enabled/disabled.
TORCH_NIGHTLY_URL_BASE = "https://download.pytorch.org/whl/nightly"
TORCH_URL_BASE = "https://download.pytorch.org/whl/test"

# Since ExecuTorch often uses main-branch features of pytorch, only the nightly
# pip versions will have the required features.
echo "=== [$LABEL] Install torch==${TORCH_VERSION} ==="

# Install torch based on the pinned PyTorch version, preferring the PyTorch test index
"$PIPBIN" install torch=="${TORCH_VERSION}" --extra-index-url "https://download.pytorch.org/whl/test"
@@ -1,2 +1,2 @@
TORCH_VERSION = "2.11.0"
NIGHTLY_VERSION = "dev20260215"
# NIGHTLY_VERSION = "dev20260318" Temporarily pinning to stable release candidate. Revert https://github.com/pytorch/executorch/pull/18287
@@ -1,2 +1,2 @@
TORCH_VERSION = "2.11.0"
NIGHTLY_VERSION = "dev20260215"
# NIGHTLY_VERSION = "dev20260318" Temporarily pinning to stable release candidate. Revert https://github.com/pytorch/executorch/pull/18287
@@ -1 +1 @@
659af3c353e49b35c191cdd2dba3b3c79d0e6822
release/2.11 No newline at end of file
Comment on lines +144 to 147
TORCHAUDIO_VERSION=release/2.11
export TORCHAUDIO_VERSION
TORCHVISION_VERSION=$(cat .github/ci_commit_pins/vision.txt)
TORCHVISION_VERSION=release/0.26
export TORCHVISION_VERSION
Comment on lines +35 to 38
TORCHAUDIO_VERSION=release/2.11
export TORCHAUDIO_VERSION
TORCHVISION_VERSION=$(cat .github/ci_commit_pins/vision.txt)
TORCHVISION_VERSION=release/0.26
export TORCHVISION_VERSION
Comment on lines 48 to 117
@@ -114,20 +108,12 @@ def install_requirements(use_pytorch_nightly):

def install_optional_example_requirements(use_pytorch_nightly):
# Determine the appropriate PyTorch URL based on CUDA delegate status
torch_url = determine_torch_url(TORCH_NIGHTLY_URL_BASE)
torch_url = determine_torch_url(TORCH_URL_BASE)

print("Installing torch domain libraries")
DOMAIN_LIBRARIES = [
(
f"torchvision==0.26.0.{NIGHTLY_VERSION}"
if use_pytorch_nightly
else "torchvision"
),
(
f"torchaudio==2.11.0.{NIGHTLY_VERSION}"
if use_pytorch_nightly
else "torchaudio"
),
("torchvision==0.26.0" if use_pytorch_nightly else "torchvision"),
("torchaudio==2.11.0" if use_pytorch_nightly else "torchaudio"),
]
@mergennachin mergennachin merged commit b40d6fe into main Mar 18, 2026
349 of 358 checks passed
@mergennachin mergennachin deleted the mergennachin/update_to_release_candidate branch March 18, 2026 13:48
@mergennachin mergennachin temporarily deployed to upload-benchmark-results March 18, 2026 14:45 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/cuda ciflow/metal CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants