skillfed

pyrsmi

Python System Management Library for AMD GPUs

pyrsmi v1.1.0 116.3K downloads/30d#12,210 on PyPI25
Permissive license MIT License AGING released

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 pyrsmi

uv

uv add pyrsmi

poetry

poetry add pyrsmi

Installing 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

Development Status :: 3 - AlphaIntended Audience :: DevelopersIntended Audience :: System AdministratorsLicense :: OSI Approved :: MIT LicenseOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTopic :: System :: HardwareTopic :: System :: Systems Administration

Tags

AMD GPU monitoring pythonrocm system management interfaceAMD instinct MI series controlGPU memory utilization trackingAMD SMI library bindingsGPU power and thermal monitoringAMD compute device management
gpu-managementrocmsystem-monitoring

More Python Modules packages