pyrsmi
Python System Management Library for AMD GPUs
What it is and what it does
pyrsmi is a Python wrapper around AMD's System Management Interface (SMI) library for monitoring and controlling AMD Instinct MI-series GPUs. It exposes functions to enumerate devices, query memory (total, used, reserved pages), measure utilization and power consumption, and retrieve device identifiers and metadata. Version 1.0+ migrated from the deprecated rocm-smi-lib to the modern amdsmi backend, maintaining backward-compatible APIs while adding access to PCIe metrics and extended telemetry.
The package is designed for system administrators, monitoring tools, and GPU-aware applications running on Linux with ROCm 6.0+. It requires explicit initialization and shutdown calls and returns -1 or empty strings on error. The optional amdsmi Python package is recommended for correct device naming and improved compatibility in containerized environments, though the core library functions work without it.
Use it for:
- Monitor GPU utilization, memory usage, and power consumption in real-time dashboards or logging systems.
- Enumerate and identify AMD Instinct GPUs in a system for resource allocation and scheduling.
- Track memory allocation patterns and reserved pages for debugging GPU memory issues.
- Build automated thermal or power management tools that query fan RPM and average power draw.
- Integrate GPU telemetry into cluster management or containerized workload orchestration systems.
- Retrieve device UUIDs and identifiers in formats compatible with ROCm, raw, or NVIDIA conventions.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides Python bindings to monitor and manage AMD Instinct MI-series GPUs via the AMD SMI Library, offering device enumeration, memory tracking, utilization metrics, and power monitoring.
Yes, if you have AMD Instinct MI-series GPUs on a ROCm 6.0+ Linux system and need Python-based GPU monitoring or management. The package has no runtime dependencies, permissive licensing, and active maintenance. The aging status reflects time since release rather than abandonment. Install friction is low. Verify that your ROCm installation includes libamd_smi.so and consider installing the optional amdsmi package for full device naming support.
Install
pyrsmi on PyPI
pip
pip install pyrsmiuv
uv add pyrsmipoetry
poetry add pyrsmiInstalling pyrsmi
Before you install
Low install friction with no runtime dependencies. Maintenance status is aging—last commit 2025-12-15 with 254 days since release—but the package is actively maintained on GitHub. Requires ROCm 6.0+ and the libamd_smi.so library to be present on the system.
License in practice
MIT License (permissive) allows unrestricted use, modification, and distribution in both open and closed-source projects with minimal obligations.
Quickstart
pip install pyrsmi
from pyrsmi import rocml
rocml.smi_initialize()
num_gpus = rocml.smi_get_device_count()
for i in range(num_gpus):
name = rocml.smi_get_device_name(i)
util = rocml.smi_get_device_utilization(i)
print(f"GPU {i}: {name}, Utilization: {util}%")
rocml.smi_shutdown()
Requires ROCm 6.0 or later with libamd_smi.so library installed; Linux OS only; AMD Instinct MI-series GPU required; Python 3.9 or later.
Verify before relying
- Whether the amdsmi package is truly optional or required for core functionality beyond device naming.
- Performance improvement claims ('10-50x faster UUID retrieval') and backward compatibility scope.
- Thread-safety guarantees and behavior under concurrent access patterns.
- Support matrix for specific MI-series models beyond the tested MI350X, MI300X, MI250X, MI210.
Package facts
| License | MIT License (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | aging — 254 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 116,328/month — #12,210 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyrsmi-1.1.0-py2.py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
hip-pythonProvides low-level Python and Cython bindings…
permissive · top 15,000 on PyPI
gpustatDisplays real-time NVIDIA GPU status, memory…
permissive · top 5,000 on PyPI
GPUtilGPUtil queries NVIDIA GPU status and…
permissive · top 15,000 on PyPI
py3nvmlProvides Python 3 bindings to query NVIDIA GPU…
permissive · top 15,000 on PyPI
flydslFlyDSL is a Python DSL and embedded MLIR…
permissive · top 15,000 on PyPI
quadrantsQuadrants is a high-performance compiler that…
permissive · top 15,000 on PyPI
nixl-cu13NIXL provides Python bindings to accelerate…
permissive · top 15,000 on PyPI
torch-directmlEnables PyTorch to use DirectML for GPU…
permissive · top 15,000 on PyPI
nvgpuQueries and monitors NVIDIA GPUs on a machine,…
permissive · top 15,000 on PyPI
vastaiProvides a CLI and Python SDK for managing GPU…
permissive · top 5,000 on PyPI