jax-ml/jax · error · NotImplementedError
TPU generation is not supported
Error message
TPU generation is not supported
What it means
TpuInfo.get_sublane_tiling was called for a TPU generation (other than 5/5e/6/7/8 handled above) whose sublane tiling rules are unknown to this JAX version.
Source
Thrown at jax/_src/tpu_info.py:294
def get_sublane_tiling(self, dtype: dtypes.DType) -> int:
"""Returns the sublane tiling for the given itemsize.
Note that this is a heurustic and depends on the settings of the XLA flags.
"""
bitwidth = dtypes.itemsize_bits(dtype)
if self.generation < 7:
# Caveat: before TPU7x, by default XLA does not use large 2nd minor tiling
# but it can be enabled by setting the flag
# xla_tpu_enable_large_2nd_minor_layout_for_x16.
if bitwidth == 16 or bitwidth == 32:
return self.num_sublanes
else:
# Large 2nd minor tiling is enabled for other types.
return self.num_sublanes * (32 // bitwidth)
# XLA allows large 2nd minor tiling by default starting with TPU7x.
if self.generation == 7 or self.generation == 8:
return self.num_sublanes * (32 // bitwidth)
raise NotImplementedError("TPU generation is not supported")
def is_tpu_device() -> bool:
return chip_version_from_device_kind(get_device_kind()) is not None
registry: dict[str, Callable[[], TpuInfo]] = {}
def _get_tpu_info_impl(chip_version: ChipVersion, num_cores: int) -> TpuInfo:
"""Returns the TPU hardware info for the given chip version and core count.
Note that all information is *per-TensorCore* so you would need to multiply by
`num_cores` to obtain the total for the chip.
Args:
chip_version: The TPU chip version.
num_cores: The number of TensorCores per chip for this configuration. ThisView on GitHub (pinned to 1e1c6a8fc0)
Solutions
- Upgrade JAX/jaxlib to a version supporting your TPU generation
- Pin workloads to supported generations
Defensive patterns
Strategy: fallback
Validate before calling
from jax._src.tpu_info import TpuInfo assert info.generation in (5,6,7,8)
Try / catch
try:
tiling = info.get_sublane_tiling(bw)
except NotImplementedError:
tiling = None # compute fallback Prevention
- Upgrade JAX before running on new TPU generations
When it happens
Trigger: Running on a newer TPU generation (e.g. TPU9+) with an older JAX that lacks tiling rules, or a corrupted generation parse.
Common situations: Cloud TPU images with newer chips than the installed JAX supports.
Related errors
- Pallas TPU requires a recent libtpu version (at least 0.0.46
- stop_gradient only works on valid JAX arrays, but input argu
- Unknown GPU platform for __dlpack__: {platform_version}
- __dlpack__ device only supported for TPU pinned host memory
- `buffer_callback` not supported on {platform} backend.
AI-assisted analysis of jax-ml/jax@1e1c6a8fc0 (2026-08-27).
Data as JSON: /api/errors/a28ed4f3daf94a3b.
Report an issue: GitHub.