Gate jax[tpu] dependency behind a Linux platform marker - #2132
Open
howl-anderson wants to merge 1 commit into
Open
Gate jax[tpu] dependency behind a Linux platform marker#2132howl-anderson wants to merge 1 commit into
howl-anderson wants to merge 1 commit into
Conversation
libtpu only ships Linux wheels, so the hard jax[tpu] dependency made the package uninstallable on macOS and installed an unneeded TPU runtime on other non-TPU platforms. Keep jax[tpu] on Linux and depend on plain jax elsewhere, with the same version constraints. Fixes google#2047
howl-anderson
requested review from
abheesht17,
hgao327,
jiangyangmu,
lc5211,
s-noghabi,
sizhit2,
tianshub and
wang2yn84
as code owners
September 6, 2026 16:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2047.
Implements option 2 as requested in #2047 (comment): keep
jax[tpu]as a hard dependency on Linux (so downstream libraries like qwix, metrax, and orbax that reinstall JAX keep working in the nightly regression), and depend on plainjaxon other platforms where libtpu ships no wheels.Version constraints are unchanged on both branches (
>=0.6.0,!=0.7.2,<0.11.1). On Linux (including TPU hosts and CI) the resolved dependency set is identical to before, so this is fully backward-compatible; on macOS the package becomes installable, and other non-Linux platforms no longer pull in the TPU runtime.