Skip to content

Start using py3.12 for TPU. #21000

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

vanbasten23
Copy link
Collaborator

@vanbasten23 vanbasten23 commented Jul 15, 2025

Essential Elements of an Effective PR Description Checklist

  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.

Purpose

PyTorch/XLA (starting 07/14/2025) has dropped support for python 3.10 (the current python version that vLLM on TPU is using) and the next JAX version 0.7 will also drop support Python <3.11. This PR update the python version used in TPU to 3.12, consistent with the python version used for GPU.

Test Plan

CI

Test Result

TPU CI passed.

(Optional) Documentation Update

Copy link

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

🚀

Copy link

mergify bot commented Jul 15, 2025

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @vanbasten23.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request updates the TPU Dockerfile and requirements to use Python 3.12. There is a potential issue with mismatched nightly dates between the base image and the installed packages. Please ensure the dates are aligned.

Comment on lines 21 to 24
torch==2.9.0.dev20250714
torchvision==0.24.0.dev20250714
torch_xla[tpu, pallas] @ https://storage.googleapis.com/pytorch-xla-releases/wheels/tpuvm/torch_xla-2.9.0.dev20250714-cp39-cp39-linux_x86_64.whl ; python_version == "3.9"
torch_xla[tpu, pallas] @ https://storage.googleapis.com/pytorch-xla-releases/wheels/tpuvm/torch_xla-2.9.0.dev20250714-cp310-cp310-linux_x86_64.whl ; python_version == "3.10"
torch_xla[tpu, pallas] @ https://storage.googleapis.com/pytorch-xla-releases/wheels/tpuvm/torch_xla-2.9.0.dev20250714-cp311-cp311-linux_x86_64.whl ; python_version == "3.11"
torch_xla[tpu, pallas] @ https://storage.googleapis.com/pytorch-xla-releases/wheels/tpuvm/torch_xla-2.9.0.dev20250714-cp312-cp312-linux_x86_64.whl ; python_version == "3.12"
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The dates of these nightly packages (20250714) do not match the NIGHTLY_DATE (20250124) used for the base Docker image in docker/Dockerfile.tpu. Using mismatched dates can lead to runtime incompatibilities. Please align these dates to ensure a stable build.

@vanbasten23 vanbasten23 force-pushed the xiowei/update_torch_xla_to_20250714 branch from 7435fd5 to d410d8e Compare July 15, 2025 17:02
@mergify mergify bot removed the needs-rebase label Jul 15, 2025
@vanbasten23 vanbasten23 marked this pull request as ready for review July 15, 2025 17:58
@vanbasten23 vanbasten23 requested a review from hmellor as a code owner July 15, 2025 23:35
@mergify mergify bot added documentation Improvements or additions to documentation tpu Related to Google TPUs labels Jul 15, 2025
@vanbasten23 vanbasten23 requested a review from yaochengji July 15, 2025 23:43
Signed-off-by: Xiongfei Wei <isaacwxf23@gmail.com>
Signed-off-by: Xiongfei Wei <isaacwxf23@gmail.com>
Signed-off-by: Xiongfei Wei <isaacwxf23@gmail.com>
Signed-off-by: Xiongfei Wei <isaacwxf23@gmail.com>
@vanbasten23 vanbasten23 force-pushed the xiowei/update_torch_xla_to_20250714 branch from 6d3fdac to 2ae4713 Compare July 16, 2025 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/build documentation Improvements or additions to documentation tpu Related to Google TPUs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant