TPU Monitoring Dashboard
Project description
TPU-TOP
A modern, terminal-based monitoring dashboard for Google Cloud TPUs, designed to give you real-time visibility into your machine's performance.
[!NOTE] This tool was inspired by the nvitop project for GPUs. This is a community project and not an official Google product.
GitHub Repository | PyPI Project
Project Overview
tpu-top provides a visual, interactive TUI (Terminal User Interface) to monitor system and TPU resources. It is specifically tailored for high-performance computing environments like GKE (Google Kubernetes Engine) where deep learning models are trained on TPUs.
What You Can See
- TPU Memory & Utilization: Real-time memory usage, TensorCore utilization, and raw duty cycle for each TPU device.
- History Graphs: Visual graphs with timeline markers showing the history of CPU (with core count), RAM (with GiB usage), and TPU usage.
- Duty Cycle History: A dedicated panel showing the history of TPU duty cycle.
- PIDs per TPU: A dedicated process list showing which PIDs are utilizing specific TPU devices, including their host RAM and CPU impact.
- Active HLO Ops: Current HLO operations executing on each TPU core (Tensor Cores and Sparse Cores).
Calculations Explained
TensorCore Utilization
This metric measures the percentage of time the Tensor Cores on the TPU chip were actively executing a program. It is read from the libtpu library (if available). If libtpu metrics are not available, it falls back to reporting the raw duty cycle.
Duty Cycle
This metric measures the active execution time of the TPU chip as reported by the TPU driver via the tpu-info library. It represents the overall proportion of time the accelerator was busy, regardless of whether it was executing massive matrix multiplications or standard operations.
Installation
From PyPI (Recommended)
pip install tpu-top
From Source
You can also install tpu-top directly from the source directory.
Prerequisites
Ensure you have Python 3.10+ and access to a Cloud TPU environment. The tool relies on tpu-info to communicate with the TPU driver.
Standard Source Install
Navigate to the project root directory and run:
pip install .
Developer Install
If you are making modifications and want them to reflect immediately:
pip install -e .
How to Use
Once installed, you can launch the dashboard from anywhere in your terminal:
tpu-top
Running Tests
To validate changes, run the unit tests:
python -m unittest test_main.py
(Note: If testing inside a GKE container, ensure dependencies are installed in your target environment).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tpu_top-0.1.5.tar.gz.
File metadata
- Download URL: tpu_top-0.1.5.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ea8466866ea86d16d537cf8438f70ae35f076c868ae84bce16ab5ae6a5713e4
|
|
| MD5 |
439f110fba74184b18ffbbd70811c0f8
|
|
| BLAKE2b-256 |
236399acddec87d2b4c65abb8e86b732a7d57ca0b47e0a8c36a720d35982c2e5
|
File details
Details for the file tpu_top-0.1.5-py3-none-any.whl.
File metadata
- Download URL: tpu_top-0.1.5-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df9ff7eff5c8b3b558a654e35611b2b963b25709636c6926ec56186236815a64
|
|
| MD5 |
c86d4f00146f549a8f1e84277f2479c4
|
|
| BLAKE2b-256 |
1d60992b8e93d919145a37bddb515ca7c8e7c361ce4cec25d93f7efb4fd56000
|