tpu-info
CLI tool to view TPU metrics
What it is and what it does
tpu-info is a command-line diagnostic tool for Google Cloud TPU environments that queries the libtpu runtime to expose hardware and performance metrics. It runs on machines with attached TPU devices and requires an active ML workload (JAX or PyTorch/XLA) to access full utilization data; without a workload, it can still detect TPU devices but will not report runtime metrics.
The tool offers two modes: a static snapshot mode that prints current metrics once, and a streaming mode that refreshes and displays metrics continuously at a configurable interval. Metrics include HBM memory usage, duty cycle, TensorCore utilization, buffer transfer latencies, host compute latency, and gRPC TCP performance. Recent versions added support for Pygrain and Orbax performance metrics from the local Prometheus server.
Use it for:
- Monitor TPU memory and compute utilization in real time while running ML training or inference workloads to identify bottlenecks.
- Capture a one-time snapshot of TPU metrics for debugging or performance analysis of a specific computation.
- Diagnose TPU device availability and libtpu version compatibility before launching a workload.
- Track buffer transfer and gRPC latencies to optimize data pipeline performance on TPU clusters.
- Stream continuous metrics during development to watch TensorCore utilization and duty cycle as you iterate on model code.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
CLI tool that detects Cloud TPU devices and reads runtime metrics from libtpu, including memory usage and duty cycle, in both static snapshot and live streaming modes.
Yes, if you work with Cloud TPU and need visibility into runtime metrics and device diagnostics. The tool is actively maintained, has no known vulnerabilities, and low install friction. It is purpose-built for TPU environments and requires an active workload to be useful; install it only if you have TPU hardware and supported ML frameworks available.
Install
tpu-info on PyPI
pip
pip install tpu-infouv
uv add tpu-infopoetry
poetry add tpu-infoInstalling tpu-info
Before you install
Low install friction with a pure-Python wheel distribution. Active maintenance with a recent release; last commit was 39 days ago. Six runtime dependencies are all stable, widely-used libraries.
License in practice
Apache-2.0 permissive license allows use in commercial and proprietary projects with minimal restrictions; you must include a copy of the license and state any material changes.
Quickstart
pip install tpu-info
# Then run the CLI command in a terminal where a TPU workload is active:
$ tpu-info
# or for streaming mode:
$ tpu-info --streaming --rate 2
Requires an active TPU workload running a supported ML framework (JAX or PyTorch/XLA) on the same machine to access libtpu utilization metrics; without a workload, device detection may still work but runtime metrics will not be available.
Verify before relying
- Whether the package works on all Python versions from 3.8 onwards or if there are known incompatibilities (e.g., Python 3.12+ environment note in docs suggests possible limitations).
- Whether Pygrain and Orbax metrics support (added in 0.14.2) requires those frameworks to be installed or if they are optional integrations.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — grpcio, immutabledict, packaging, prometheus-client, protobuf, rich |
| Maintenance | actively maintained — 39 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 270,511/month — #8,234 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: tpu_info-0.14.2-py3-none-any.whl
Tags
More Monitoring packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
opentelemetry-semantic-conventionsProvides generated Python code for…
permissive · top 100 on PyPI
opentelemetry-sdkProvides the reference implementation of the…
permissive · top 100 on PyPI
opentelemetry-apiProvides the abstract API and interfaces for…
permissive · top 100 on PyPI
opentelemetry-exporter-otlp-proto-httpExports OpenTelemetry observability data to an…
permissive · top 1,000 on PyPI
opentelemetry-instrumentationProvides automatic instrumentation commands and…
permissive · top 1,000 on PyPI
libtpulibtpu is the runtime library that enables JAX,…
unclear · top 5,000 on PyPI
cloud-tpu-diagnosticsCollects stack traces and diagnostic data from…
unclear · top 15,000 on PyPI
tpu-inferencetpu-inference is a hardware plugin for vLLM…
permissive · top 15,000 on PyPI
slurm-usageCollects and preserves SLURM job efficiency…
permissive · top 15,000 on PyPI
google-cloud-mldiagnosticsCollects metrics, configs, and performance…
permissive · top 15,000 on PyPI
google-cloud-tpuProvides a Python client library to interact…
permissive · top 15,000 on PyPI
pathwaysutilsProvides cloud-specific integrations and…
permissive · top 15,000 on PyPI
cloud-accelerator-diagnosticsMonitors, debugs, and profiles workloads…
unclear · top 15,000 on PyPI
snowflake-cli-labsThis package has been renamed and is now a…
permissive · top 15,000 on PyPI
tokamaxTokamax provides custom accelerator kernels for…
permissive · top 15,000 on PyPI