xpustat
Authors: Salah Eddine Bekhouche, Hichem Telli
A unified accelerator stat tool — think gpustat, but for every vendor.
Supported backends
| Status | Vendor | Device | CLI tool | Filter key |
|---|---|---|---|---|
| ✅ Tested | AMD | Radeon RX 7900 XTX (gfx1100) | amd-smi |
amd |
| ✅ Tested | NVIDIA | NVIDIA L4 (cc8.9), TITAN V (cc7.0) | nvidia-smi |
nvidia |
| 🔲 Untested | Intel | Gaudi / Gaudi 2 / Gaudi 3 | hl-smi |
gaudi |
| 🔲 Untested | Intel | Arc / Data Center GPU | xpu-smi |
intel |
| ✅ Tested | Huawei | Ascend 910B2 | ascend-dmi / npu-smi |
huawei |
| 🔲 Untested | Hygon | DCU | hy-smi |
hygon |
| 🔲 Untested | Cambricon | MLU | cnmon |
cambricon |
| 🔲 Untested | Moore Threads | MTT GPU | mthreads-gmi |
moorethreads |
Legend: ✅ Tested on real hardware — 🔲 Implemented, awaiting hardware test
Backends whose management tool is not installed are silently skipped.
Running Vendor Hardware Tests
If you have access to specific hardware, you can help us verify the implementation by running the standalone test scripts found in the vendor_devices_tests/ directory:
# Example: Testing the Huawei backend on a machine with Ascend NPUs
python vendor_devices_tests/test_huawei.py
# Example: Testing the NVIDIA backend
python vendor_devices_tests/test_nvidia.py
If the test successfully outputs your hardware metrics, please let us know so we can update the backend status to ✅ Tested!
Install
pip
pip install xpustat
conda
conda install -c conda-forge xpustat
CLI usage
xpustat # coloured table of all detected devices
xpustat -pui # watch mode, showing processes (-p), users (-u), refreshing every 1.0s (-i)
xpustat -i 2 # watch mode, refresh every 2 seconds
xpustat -i 1 -n 10 # 10 refreshes then exit
xpustat -a # show everything (util, temp, power, arch, user, pid, cmd)
xpustat -f nvidia amd # show only NVIDIA and AMD
xpustat --no-color # plain text, no ANSI codes
xpustat --json # raw JSON output
xpustat --version
Example output:
xpustat 0.1.0 · myhost · Fri May 22 11:24:00 2026
──────────────────────────────────────────────────────────────────────────
[NVIDIA] #0 Tesla V100 │ 1,024 / 32,768 MB ███░░░░░░░░░░░░░ 3%
[AMD ] #0 Radeon RX 7900 XTX │ 26 / 24,560 MB ░░░░░░░░░░░░░░░░ 0%
[HUAWEI] #0:0 Ascend 310 │ 2,703 / 8,192 MB █████░░░░░░░░░░░ 33%
Example output with processes, users, and watch mode (xpustat -pui):
xpustat 0.1.0 · salah-amd · Fri May 29 10:07:57 2026
──────────────────────────────────────────────────────────
[AMD ] #0 Radeon RX 7900 XTX │ 17,918 / 24,560 MB ████████████░░░░ 72%
└─ salah/348504(17480M)
refreshing every 1.0s · Ctrl+C to quit
Python API
import xpustat
# Query everything at once (parallel by default)
stats = xpustat.query_all()
print(stats) # XPUStatCollection(nvidia=0, amd=1, ...)
print(stats.amd[0].name) # "Radeon RX 7900 XTX"
print(stats.amd[0].mem_used_mb) # 26
# As a dict (JSON-serialisable)
import json
print(json.dumps(stats.to_dict(), indent=2))
# Query a single vendor
from xpustat import NvidiaGPUStatCollection
gpus = NvidiaGPUStatCollection.new_query()
Version history
0.2.0
- Fix AMD GPUs not being detected when
amd-smireports"N/A"sections or idle GPUs (e.g. ROCm 10 with an iGPU present) - Flicker-free watch mode: frames are redrawn in place on the alternate screen
0.1.0
- Initial release
- Support for NVIDIA, AMD, Intel Gaudi, Intel Arc/GPU, Huawei Ascend, Hygon DCU, Cambricon MLU, Moore Threads
Metadata
Release files for xpustat 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| xpustat-0.2.0.tar.gz | 28.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| xpustat-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 60.7 kB
Release files / xpustat-0.2.0.tar.gz
| Download URL | xpustat-0.2.0.tar.gz |
|---|---|
| Size | 28.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
60863e1c0b158ce81221a17e738a38e3285b531e3258bd7841f43f6784e3e07a
|
|
BLAKE2b-256 checksum How to use checksums |
a6310ea5fd53552012ce1060c170f42d5cb6f6144e3720bfd7a2dc8cbc34dd71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / xpustat-0.2.0-py3-none-any.whl
| Download URL | xpustat-0.2.0-py3-none-any.whl |
|---|---|
| Size | 31.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
93b1ac2cc69709ad04928ab67732240b49cc4a401442ce4bc2c62508fab46306
|
|
BLAKE2b-256 checksum How to use checksums |
4e73565da3a385a247276cb29278f0156888c15417706fb5e70160854cfc6c9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Security for xpustat 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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.