--- id: tpu-info version: "0.14.2" license: Apache-2.0 license_treatment: permissive maintenance: active --- # tpu-info — CLI tool to view TPU metrics License: permissive · Maintenance: active · Downloads: 270.5K/mo ## 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 above — 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 pip install tpu-info uv add tpu-info poetry add tpu-info ## Installing 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_current - Install friction: low - Maintenance: active - Downloads: 270.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags TPU metrics monitoring, cloud TPU diagnostics, libtpu utilization viewer, TPU memory and duty cycle, TPU performance metrics CLI, TPU device detection, TPU runtime monitoring tool, tpu-diagnostics, ml-infrastructure [View on SkillFed](https://skillfed.io/packages/tpu-info) · [View on PyPI](https://pypi.org/project/tpu-info/)