{"id":45906,"library":"pyrsmi","title":"pyrsmi","description":"Python bindings for AMD ROCm System Management Interface (SMI). Provides programmatic access to AMD GPU metrics such as temperature, power, memory usage, and PCIe status. Current version 1.1.0, released April 2025. Active development, monthly releases.","status":"active","version":"1.1.0","language":"python","source_language":"en","source_url":"https://github.com/ROCm/pyrsmi","tags":["amd","gpu","system-management","rocm","hardware-monitoring"],"install":[{"cmd":"pip install pyrsmi","lang":"bash","label":"PyPI install"}],"dependencies":[],"imports":[{"wrong":"import pyrsmi.rsmi as rsmi","symbol":"rsmi","correct":"import pyrsmi"}],"quickstart":{"code":"import pyrsmi.rsmi as rsmi\nrsmi.rsmi_init(0)\ncount = rsmi.rsmi_num_monitor_devices()\nprint(f\"Found {count} AMD GPU(s)\")\nfor i in range(count):\n    temp, _ = rsmi.rsmi_dev_temp_metric_get(i, 0, rsmi.RSMI_TEMP_CURRENT)\n    print(f\"GPU {i} temp: {temp}°C\")\nrsmi.rsmi_shut_down()","lang":"python","description":"Initialize RSMI, enumerate AMD GPUs, print their current temperatures, and shutdown."},"warnings":[{"fix":"Wrap usage with init/shutdown calls, or use context manager if available.","message":"Must call rsmi_init() before any other function, and rsmi_shut_down() at the end. Failure to do so leads to crashes or undefined behavior.","severity":"gotcha","affected_versions":"all"},{"fix":"Always use 0 for default initialization.","message":"rsmi_init(0) expects 0 as the initialization flag. Passing other values may cause initialization failure.","severity":"gotcha","affected_versions":"all"},{"fix":"Check return status (0 == RSMI_STATUS_SUCCESS) after each call.","message":"Functions like rsmi_dev_temp_metric_get return a tuple (metric_value, err_code). Always check err_code for success (0). Ignoring return code can result in silent errors.","severity":"gotcha","affected_versions":"all"},{"fix":"Verify GPU compatibility at https://rocm.docs.amd.com/en/latest/release/gpu_os_support.html","message":"Not all AMD GPUs are supported. Older or consumer cards (e.g., Radeon RX series) may not work with RSMI. Only official ROCm-supported GPUs (mostly MI series and some Radeon Pro) are guaranteed.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'1.1.0':29 '2025':32 'access':13 'activ':33 'amd':5,15,37 'april':31 'bind':3 'current':27 'develop':34 'gpu':16,38 'hardwar':44 'hardware-monitor':43 'interfac':9 'manag':8,41 'memori':22 'metric':17 'monitor':45 'month':35 'pcie':25 'power':21 'programmat':12 'provid':11 'pyrsmi':1 'python':2 'releas':30,36 'rocm':6,42 'smi':10 'status':26 'system':7,40 'system-manag':39 'temperatur':20 'usag':23 'version':28","created_at":"2026-06-07T12:57:19.041172+00:00","updated_at":"2026-06-07T12:57:19.041172+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/ROCm/pyrsmi","github":"https://github.com/ROCm/pyrsmi","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}