Skip to main content

gpu-scope

A modern, Textual-based TUI for watching GPU engagement on a node — in the spirit of nvtop, built on Rich/Textual, and covering NVIDIA, AMD, and Apple Silicon.

status

Features

  • Live per-GPU panels: utilization, memory, temperature, power, fan, clocks, encoder/decoder engagement, and a rolling utilization sparkline.
  • Per-GPU process table (PID, name, device memory) — NVIDIA only for now.
  • Adjustable refresh rate (+ / - at runtime).
  • Backend-pluggable, three vendors today:
    • NVIDIA — via NVML (nvidia-ml-py). Full field coverage, including per-process memory.
    • AMD — via the rocm-smi CLI (ROCm must be installed). Utilization, memory, temperature, power, fan, clocks; no per-process view yet. Parses rocm-smi's JSON defensively (case-insensitive key matching) to tolerate key-name drift across ROCm versions, but hasn't been run against real ROCm hardware — if a field looks off, please open an issue with your rocm-smi -a --json output.
    • Apple Silicon — via ioreg's IOAccelerator registry (no sudo required, macOS only). Utilization and a GPU-attributed memory figure (against total unified memory, there's no separate VRAM pool). Apple doesn't expose temperature/power/fan/clocks/per-process GPU stats without powermetrics, which requires root — those fields show as —.
  • A demo backend with synthetic data, so you can preview the UI on a machine with no GPU at all.

Adding a vendor means writing one GpuBackend subclass that returns HostSnapshot/GpuSnapshot objects — the app and widgets are backend-agnostic.

Install

pip install gpu-scope

The project is gpu-scope end to end — gpu-top was blocked by PyPI's typosquat-similarity check against an unrelated existing package (gputop). The gpu-top name lives on as a second command, installed alongside gpu-scope and pointing at the exact same program, for anyone used to typing it.

One install gets every backend — there's nothing to opt into. NVIDIA support (nvidia-ml-py) ships as a core dependency: it's a small, pure-Python ctypes wrapper with no platform-specific build, so it installs cleanly everywhere and simply reports "unavailable" at runtime on a machine with no NVIDIA driver. AMD and Apple need no extra pip packages at all — they shell out to system tools (rocm-smi, ioreg) instead. The one thing pip can't do for you: AMD support only activates if ROCm's rocm-smi is on your PATH (a system package, install it via your distro/ROCm docs).

pip install gpu-scope[nvidia] is still accepted (as a no-op) if you're used to typing an extra — it doesn't install anything beyond the plain command above.

Installing from source instead: pip install "git+https://github.com/matplo/gpu-scope.git".

Usage

gpu-scope                  # auto-detects the first available backend (gpu-top works identically)
gpu-scope --backend demo   # synthetic data, no GPU required
gpu-scope --list-backends  # show what's available on this host
gpu-scope --interval 0.5   # poll twice a second

Running with no GPU present, or forcing --backend nvidia/--backend amd on a host without that vendor's tooling, exits with a short explanation and a --backend demo suggestion instead of a driver-library stack trace.

Keys: q quit · + / - refresh rate · d toggle light/dark theme.

Architecture

gpu_scope/
├── models.py          # GpuSnapshot / GpuProcess / HostSnapshot dataclasses
├── backends/
│   ├── base.py         # GpuBackend ABC — open() / poll() / close()
│   ├── nvidia.py        # NVML-backed implementation
│   ├── amd.py             # rocm-smi (CLI + JSON) implementation
│   ├── apple.py            # ioreg IOAccelerator implementation
│   └── demo.py               # synthetic backend for development/preview
├── widgets/
│   ├── meters.py         # Rich-renderable bars/sparklines (no extra deps)
│   └── gpu_panel.py       # the per-GPU card widget
├── app.py               # Textual App: layout + polling loop
└── cli.py                # argparse entry point (`gpu-scope` / `gpu-top`)

Development

pip install -e ".[dev]"
pytest
gpu-scope --backend demo   # preview the UI with synthetic data, no GPU required

For live Textual devtools (a separate log console while the TUI runs), see the Textual docs — in short, run textual console in one terminal and textual run --dev "gpu_scope.cli:main" in another.

License

MIT

Metadata

Release files for gpu-scope 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gpu-scope 0.2.0
File Size Uploaded Provenance Actions
gpu_scope-0.2.0.tar.gz 21.6 kB With provenance Details for gpu_scope-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gpu-scope 0.2.0
File Interpreter ABI Platform Actions
gpu_scope-0.2.0-py3-none-any.whl Python 3 none any Details for gpu_scope-0.2.0-py3-none-any.whl

Total release size: 43.7 kB

Release files / gpu_scope-0.2.0.tar.gz

Download URL gpu_scope-0.2.0.tar.gz
Size 21.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a9675a9561d1e2913428c615c974d4b51737d94185e17ee9385193ec8449ad81
BLAKE2b-256 checksum
How to use checksums
053c8847ea65409aaea1119a4a3420da18fcfcb718c5393f84210ad95721f4fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.

Transparency log

Release files / gpu_scope-0.2.0-py3-none-any.whl

Download URL gpu_scope-0.2.0-py3-none-any.whl
Size 22.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9e206a1762e26ec76830f986993f081ffd45581bdbc37a5a482a84be298b6eb9
BLAKE2b-256 checksum
How to use checksums
208b8fb97019f0c31e95ba6fdc7b39a1d86ff1cddee66c7bb82b69bf35ae1896
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.

Transparency log

Security for gpu-scope 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for gpu_scope-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 11, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page