tpu-info CLI Tool
tpu-info is a command-line interface (CLI) tool designed for detecting Cloud TPU devices and extracting runtime metrics from the `libtpu` library. These metrics include memory usage and duty cycle, providing insights into TPU utilization. It supports both static, one-time snapshots and a live streaming mode for continuous monitoring. The current version is 0.10.0, released on March 17, 2026, indicating an active development and release cadence.
Warnings
- gotcha tpu-info will not display any utilization data if there is no active TPU workload running with a supported ML framework (like JAX or PyTorch/XLA). Ensure your model is actively processing data on the TPU.
- breaking Outdated versions of `tpu-info` or the underlying `libtpu` library may be missing new metrics and features, or might be incompatible with your environment. Releases from before 2024, in particular, may have compatibility issues.
- deprecated Versions of `tpu-info` prior to 0.8.1 might trigger a `DeprecationWarning` in Python 3.11+ due to issues related to `enum` classes.
Install
-
pip install tpu-info -
pip install git+https://github.com/google/cloud-accelerator-diagnostics/#subdirectory=tpu_info
Quickstart
# First, ensure a JAX or PyTorch/XLA workload is running on your Cloud TPU. # Example with JAX (run this in a Python environment connected to TPU): # import jax # import jax.numpy as jnp # t = jnp.ones((1000, 1000)) # This creates an active workload on TPU # Then, on the same machine, open a new terminal and run: tpu-info