Skip to content

Conversation

@PetarTerziev-UL
Copy link
Contributor

@PetarTerziev-UL PetarTerziev-UL commented Nov 27, 2025

Summary

coremltools versions prior to 9.0 did not support Python 3.13. Now executorch uses 9.0, we can finally enable building wheels with Python 3.13.

Fixes #8292

Test plan

Python test suite ran and compared against a dev install of the target branchh in a 3.12 virtual environment.

@pytorch-bot
Copy link

pytorch-bot bot commented Nov 27, 2025

🔗 Helpful Links

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

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

⏳ 160 Pending, 2 Unrelated Failures

As of commit 56002a2 with merge base 31aa8d3 (image):

FLAKY - The following job failed but was likely due to flakiness present on trunk:

UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:

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 Nov 27, 2025
@PetarTerziev-UL
Copy link
Contributor Author

I need to add a "release notes: misc" label, but I don't seem to have the ability to.

@PetarTerziev-UL
Copy link
Contributor Author

the tests under examples/models/llama3_2_vision/preprocess hang on a call into AOTInductor when torch nightly is installed.

Need to look into this further.

@PetarTerziev-UL
Copy link
Contributor Author

the tests under examples/models/llama3_2_vision/preprocess hang on a call into AOTInductor when torch nightly is installed.

Need to look into this further.

Things are better in with a newer nightly build of torch, so I've bumped the pinned version as part of this PR too.

@PetarTerziev-UL PetarTerziev-UL marked this pull request as ready for review December 1, 2025 15:10
@mergennachin mergennachin added ciflow/trunk ciflow/binaries ciflow/binaries/all Release PRs with this label will build wheels for all python versions labels Dec 1, 2025
@mergennachin mergennachin added the release notes: build Changes related to build, including dependency upgrades, build flags, optimizations, etc. label Dec 1, 2025
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 adds Python 3.13 support to ExecuTorch now that coremltools 9.0 (which supports Python 3.13) is available. The changes update version constraints, documentation, and CI/CD workflows to enable building wheels for Python 3.13.

Key changes:

  • Update Python version constraint from <3.13 to <3.14 in pyproject.toml
  • Add Python 3.13 to wheel building workflows and documentation
  • Remove Python 3.13 warning from CoreML troubleshooting documentation
  • Update nightly version pin (unrelated maintenance update)

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pyproject.toml Add Python 3.13 classifier, update requires-python constraint to <3.14, add py313 to ruff target-version
torch_pin.py Update nightly version from dev20251025 to dev20251124
docs/source/*.md Update Python version requirements from 3.10-3.12 to 3.10-3.13 across multiple documentation files
docs/source/backends/coreml/coreml-troubleshooting.md Remove outdated Python 3.13 compatibility warning
README-wheel.md Add Python 3.13 to list of supported versions
.github/workflows/*.yml Add "3.13" to Python version matrices for wheel building workflows

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

pyproject.toml Outdated
]

# Python dependencies required for use.
# coremltools has issue with python 3.13, see https://github.com/apple/coremltools/issues/2487
Copy link

Copilot AI Dec 1, 2025

Choose a reason for hiding this comment

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

The comment is now outdated since Python 3.13 is being supported. Either remove the comment entirely or update it to reflect that the issue was resolved in coremltools 9.0 (e.g., '# coremltools 9.0+ supports python 3.13, see apple/coremltools#2487').

Suggested change
# coremltools has issue with python 3.13, see https://github.com/apple/coremltools/issues/2487
# coremltools 9.0+ supports python 3.13, see https://github.com/apple/coremltools/issues/2487

Copilot uses AI. Check for mistakes.
pyproject.toml Outdated
]

# Python dependencies required for use.
# coremltools has issue with python 3.13, see https://github.com/apple/coremltools/issues/2487
Copy link
Contributor

Choose a reason for hiding this comment

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

Delete this comment?

@larryliu0820 larryliu0820 added the release notes: misc Miscellaneous label Dec 1, 2025
@larryliu0820
Copy link
Contributor

@PetarTerziev-UL can you please bump the nightly version of pytorch to 1122 instead? I think the nightly job failed to build 1124 nightly.

@pytorch-bot pytorch-bot bot removed ciflow/trunk ciflow/binaries ciflow/binaries/all Release PRs with this label will build wheels for all python versions labels Dec 2, 2025
@PetarTerziev-UL
Copy link
Contributor Author

@PetarTerziev-UL can you please bump the nightly version of pytorch to 1122 instead? I think the nightly job failed to build 1124 nightly.

Done! Is there a way to check nightly job statuses? I was looking at wheels available at download.pytorch.org and drawing assumptions.

Copilot AI review requested due to automatic review settings December 3, 2025 07:59
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

Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.


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

# specified by `requires-python`. TODO: Remove this once we support these older
# versions of python and can expand the `requires-python` range.
target-version = ["py38", "py39", "py310", "py311", "py312"]
target-version = ["py38", "py39", "py310", "py311", "py312", "py313"]
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

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

The target-version includes py38 and py39, but requires-python specifies >=3.10. This mismatch means Ruff is configured to support Python versions below the project's minimum requirement. Either remove py38 and py39 from target-version to align with requires-python, or update the comment on line 132-133 to explain why these older versions are still targeted.

Suggested change
target-version = ["py38", "py39", "py310", "py311", "py312", "py313"]
target-version = ["py310", "py311", "py312", "py313"]

Copilot uses AI. Check for mistakes.
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

Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.


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


// Compile-time switch to control how assertions are logged inside CUDA kernels.
// If C10_CUDA_VERBOSE_ASSERT is defined, CUDA_KERNEL_ASSERT_VERBOSE will
// take addition information passed to the macro and forward them to
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

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

Corrected spelling of 'addition' to 'additional'.

Suggested change
// take addition information passed to the macro and forward them to
// take additional information passed to the macro and forward them to

Copilot uses AI. Check for mistakes.
@mergennachin
Copy link
Contributor

@PetarTerziev-UL

Do you need specifically torch 11-22 nightly?

I am trying to upgrade to 11-20 in this PR

#16198

@PetarTerziev-UL
Copy link
Contributor Author

@PetarTerziev-UL

Do you need specifically torch 11-22 nightly?

I am trying to upgrade to 11-20 in this PR

#16198

@mergennachin Nope, that's also fine. Happy to wait for that to go in first?

mergennachin added a commit that referenced this pull request Dec 11, 2025
Upgrading the torch pin, that would be useful for
#16004

Also incorporating issues found by @PetarTerziev-UL
coremltools versions prior to 9.0 did not support Python 3.13. Now
executorch uses 9.0, we can finally enable building wheels with
Python 3.13.
Copilot AI review requested due to automatic review settings December 12, 2025 18:00
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

Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.


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

@pytorch-bot
Copy link

pytorch-bot bot commented Dec 12, 2025

To add the ciflow label ciflow/trunk please first approve the workflows that are awaiting approval (scroll to the bottom of this page).

This helps ensure we don't trigger CI on this PR until it is actually authorized to do so. Please ping one of the reviewers if you do not have access to approve and run workflows.

@mergennachin mergennachin merged commit 4aaa3ae into pytorch:main Dec 12, 2025
327 of 340 checks passed
@kirklandsign
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/binaries ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. release notes: build Changes related to build, including dependency upgrades, build flags, optimizations, etc. release notes: misc Miscellaneous

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Python 3.13

4 participants