Skip to content

[Refactor][TPU] Remove torch_xla path and use tpu-inference#30808

Merged
DarkLight1337 merged 13 commits intovllm-project:mainfrom
weiyu0824:task/remove-xla-path-new
Jan 7, 2026
Merged

[Refactor][TPU] Remove torch_xla path and use tpu-inference#30808
DarkLight1337 merged 13 commits intovllm-project:mainfrom
weiyu0824:task/remove-xla-path-new

Conversation

@weiyu0824
Copy link
Copy Markdown
Contributor

@weiyu0824 weiyu0824 commented Dec 16, 2025

Purpose

Removes torch_xla related code paths as this backend is now deprecated. To run vLLM on TPU, users should now install and use tpu-inference.

Test Plan

  • Triggered tpu-inference CI/CD pipeline.
  • Verified that removal does not impact non-TPU backends.

Test Result

What has been removed
  • Classes previously migrated to tpu-inference, this is guarded by USE_TPU_INFERENCE before.
  • Functions explicitly used torch_xla.
  • All TPU-related test files (migrated to tpu-inference repo)
Pending Removal
  • Update README.md
  • Update Dockerfile.tpu

@github-actions
Copy link
Copy Markdown

👋 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 ask your reviewers to trigger select CI tests on top of fastcheck CI.

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.

If you have any questions, please reach out to us on Slack at https://slack.vllm.ai.

🚀

@mergify mergify bot added the v1 label Dec 16, 2025
@mergify
Copy link
Copy Markdown

mergify bot commented Dec 16, 2025

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

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

@mergify mergify bot added tpu Related to Google TPUs needs-rebase labels Dec 16, 2025
Copy link
Copy Markdown
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 is a significant refactoring that removes the deprecated torch_xla based TPU backend. The changes are extensive, involving the deletion of numerous files and code blocks related to the old TPU implementation, including tests, model runners, workers, and various utility functions. The new approach mandates the use of the tpu-inference package for TPU support, and the codebase now reflects this by either importing from tpu-inference or failing with a clear error message if the package is not installed. The code removal appears to be clean and thorough, and the new dependency model is explicit and well-defined. The changes are consistent with the stated purpose of the pull request and represent a solid step forward in simplifying the TPU backend support.

@mergify
Copy link
Copy Markdown

mergify bot commented Dec 16, 2025

Documentation preview: https://vllm--30808.org.readthedocs.build/en/30808/

@mergify mergify bot added documentation Improvements or additions to documentation ci/build deepseek Related to DeepSeek models frontend llama Related to Llama models multi-modality Related to multi-modality (#4194) new-model Requests to new models performance Performance-related issues qwen Related to Qwen models gpt-oss Related to GPT-OSS models nvidia labels Dec 16, 2025
@mergify mergify bot added the rocm Related to AMD ROCm label Dec 16, 2025
@mergify mergify bot added the tool-calling label Dec 16, 2025
@mergify mergify bot added the kv-connector label Dec 16, 2025
@weiyu0824 weiyu0824 closed this Dec 16, 2025
@weiyu0824 weiyu0824 force-pushed the task/remove-xla-path-new branch from 7f4717f to f21f5ea Compare December 16, 2025 20:32
@weiyu0824 weiyu0824 force-pushed the task/remove-xla-path-new branch from 99193f9 to 57a924e Compare December 22, 2025 22:29
@mergify
Copy link
Copy Markdown

mergify bot commented Dec 22, 2025

Hi @weiyu0824, the pre-commit checks have failed. Please run:

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy or markdownlint failing?
mypy and markdownlint are run differently in CI. If the failure is related to either of these checks, please use the following commands to run them locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10
# For markdownlint
pre-commit run --hook-stage manual markdownlint

@weiyu0824 weiyu0824 requested a review from ApostaC as a code owner December 22, 2025 23:42
@weiyu0824 weiyu0824 force-pushed the task/remove-xla-path-new branch from 907769b to c2c433a Compare December 22, 2025 23:44
@mergify
Copy link
Copy Markdown

mergify bot commented Dec 22, 2025

Hi @weiyu0824, the pre-commit checks have failed. Please run:

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy or markdownlint failing?
mypy and markdownlint are run differently in CI. If the failure is related to either of these checks, please use the following commands to run them locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10
# For markdownlint
pre-commit run --hook-stage manual markdownlint

@weiyu0824 weiyu0824 force-pushed the task/remove-xla-path-new branch from c2c433a to 48755c1 Compare December 23, 2025 00:40
@mergify
Copy link
Copy Markdown

mergify bot commented Dec 23, 2025

Hi @weiyu0824, the pre-commit checks have failed. Please run:

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy or markdownlint failing?
mypy and markdownlint are run differently in CI. If the failure is related to either of these checks, please use the following commands to run them locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10
# For markdownlint
pre-commit run --hook-stage manual markdownlint

@weiyu0824 weiyu0824 force-pushed the task/remove-xla-path-new branch 2 times, most recently from 0539c87 to edb6b94 Compare December 23, 2025 04:08
@mergify
Copy link
Copy Markdown

mergify bot commented Dec 23, 2025

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

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

@mergify mergify bot added the needs-rebase label Dec 23, 2025
@weiyu0824 weiyu0824 force-pushed the task/remove-xla-path-new branch from edb6b94 to 373a222 Compare December 23, 2025 18:09
@weiyu0824
Copy link
Copy Markdown
Contributor Author

Affected by #31044 (comment)

@mergify
Copy link
Copy Markdown

mergify bot commented Dec 29, 2025

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

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

@mergify
Copy link
Copy Markdown

mergify bot commented Jan 6, 2026

Hi @weiyu0824, the pre-commit checks have failed. Please run:

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Then, commit the changes and push to your branch.

For future commits, pre-commit will run automatically on changed files before each commit.

Tip

Is mypy or markdownlint failing?
mypy and markdownlint are run differently in CI. If the failure is related to either of these checks, please use the following commands to run them locally:
# For mypy (substitute "3.10" with the failing version if needed)
pre-commit run --hook-stage manual mypy-3.10
# For markdownlint
pre-commit run --hook-stage manual markdownlint

weiyu0824 and others added 12 commits January 7, 2026 03:30
Signed-off-by: Wei-Yu Lin <weiyulin@google.com>
Signed-off-by: Wei-Yu Lin <weiyulin@google.com>
Signed-off-by: Wei-Yu Lin <weiyulin@google.com>
…mplementation

Signed-off-by: Wei-Yu Lin <weiyulin@google.com>
Signed-off-by: Wei-Yu Lin <weiyulin@google.com>
Signed-off-by: Wei-Yu Lin <weiyulin@google.com>
Signed-off-by: Wei-Yu Lin <weiyulin@google.com>
Signed-off-by: Wei-Yu Lin <weiyulin@google.com>
Signed-off-by: Wei-Yu Lin <weiyulin@google.com>
Signed-off-by: Wei-Yu Lin <weiyulin@google.com>
Signed-off-by: Wei-Yu Lin <weiyulin@google.com>
Signed-off-by: Wei-Yu Lin <weiyulin@google.com>
@mergify
Copy link
Copy Markdown

mergify bot commented Jan 7, 2026

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

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

Signed-off-by: weiyu <62784299+weiyu0824@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/build deepseek Related to DeepSeek models documentation Improvements or additions to documentation frontend gpt-oss Related to GPT-OSS models kv-connector llama Related to Llama models multi-modality Related to multi-modality (#4194) new-model Requests to new models nvidia performance Performance-related issues qwen Related to Qwen models ready ONLY add when PR is ready to merge/full CI is needed rocm Related to AMD ROCm speculative-decoding structured-output tool-calling tpu Related to Google TPUs v1

Projects

Status: Done
Status: Done
Status: Done
Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants