{"id":18711217,"url":"https://github.com/rocm/pyrsmi","last_synced_at":"2026-03-03T01:38:13.422Z","repository":{"id":184951307,"uuid":"633576953","full_name":"ROCm/pyrsmi","owner":"ROCm","description":"python package of rocm-smi-lib","archived":false,"fork":false,"pushed_at":"2025-12-13T03:53:29.000Z","size":308,"stargazers_count":24,"open_issues_count":9,"forks_count":10,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-12-14T17:57:59.824Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ROCm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-04-27T20:17:58.000Z","updated_at":"2025-11-25T02:01:05.000Z","dependencies_parsed_at":"2023-07-31T04:47:31.141Z","dependency_job_id":"ab693709-66e6-4021-943c-00c0f7fa6bce","html_url":"https://github.com/ROCm/pyrsmi","commit_stats":null,"previous_names":["radeonopencompute/pyrsmi","rocm/pyrsmi"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ROCm/pyrsmi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ROCm%2Fpyrsmi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ROCm%2Fpyrsmi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ROCm%2Fpyrsmi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ROCm%2Fpyrsmi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ROCm","download_url":"https://codeload.github.com/ROCm/pyrsmi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ROCm%2Fpyrsmi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30029705,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T00:31:48.536Z","status":"ssl_error","status_checked_at":"2026-03-03T00:30:56.176Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T12:37:55.664Z","updated_at":"2026-03-03T01:38:13.406Z","avatar_url":"https://github.com/ROCm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pyrsmi\n### Python Bindings for System Management Library for AMD GPUs\n--------\n- `pyrsmi` is a python package of rocm-smi-lib, for providing a limited features of ROCm System Management Library for assisting Python development involving AMD GPUs.\n- It is based on (`rocm-smi-lib`)[https://github.com/RadeonOpenCompute/rocm_smi_lib], so its scope of support should be similar to that of the latter.\n\n## Requirements\n- `pyrsmi` runs on latest ROCm-supported Instinct MI-series GPU systems. Scope of tested systems is limited; please create tickets for any issues encountered.\n\n## How to install from source\n- Clone this repo: \n  - `git clone https://github.com/ROCm/pyrsmi`\n  - cd pyrsmi\n- `python -m pip install -e .`\n- `pyrsmi` can be installed as PyPA-compatible Python package.\n\n## How to install Python packages\n- Install `build` package:\n  - `pip install build`\n- At the top directory (where setup.py is), run: `python -m build`\n- Then by default packages (both sdist and wheel) will be built under `dist` directory.\n- The packages can be either installed with `pip install`, or be uploaded to PyPI (release or test) repo, or an artifactory of your choice. The latter can be installed liked beflow.\n\n## How to install from PyPI\n- **NOTE:** Release versions are available at pypi.org, and the package can be installed with :\n  -  `python -m pip install pyrsmi`\n\n## How to use `pyrsmi`\n- Environment setup:\n  - `pyrsmi` searches for `rocm-smi` library from default ROCm environment variable `ROCM_PATH`. So, for standard ROCm installation, the library will be automatically detected. In some unusual case where the ROCm installation is moved, make sure to set the environment variable as so :\n    ```bash\n    $ mv /opt/rocm/ /usr/local/xyz/\n    $ export ROCM_PATH=/usr/local/xyz/\n    ```\n- Running in python:\n    ```python\n    from pyrsmi import rocml\n\n    rocml.smi_initialize()\n    print(rocml.smi_get_device_count())\n    rocml.smi_shutdown()\n    ```\n\n## Examples\n- Examples directory contains a number of code snippets showing how to use the package.\n- It also contains an example showing how to use pyrsmi to create a web-based system monitoring tool that displays various dashboards of system status, including memory, CPU/GPU utilization and process names. \n\n## List of API functions\n\n- The list is not exhaustive. Please refer to the code for missing functions.\n\n| Function | Description | Argument | Return Type | Note |\n| -------- | ----------- | -------  | ----------  | ---- |\n| smi_initialize | initialize rsmi | None | None |  |\n| smi_shutdown   | shut down rsmi  | None | None |  |\n| smi_get_version | get version of rsmi  | None | str | 'major.minor.patch' |\n| smi_get_kernel_version | get version of ROCm kernel driver  | None | str | |\n| smi_get_device_id | get device id of GPU devices  | None | uint64 | id of devices |\n| smi_get_device_count | get number of GPU devices  | None | int | num of devices |\n| smi_get_device_name  | get name of GPU devices  | None | str | |\n| smi_get_device_unique_id   | get unique id of GPU devices  | None | int | 64bit integer |\n| smi_get_device_utilization | get device utilization in % busy | device_id | int |  |\n| smi_get_device_memory_used | get device memory usage | device_id | int | in Bytes, type 'VRAM' |\n| smi_get_device_memory_total | get device's total memory | device_id | int | in Bytes, type 'VRAM' |\n| smi_get_device_memory_busy | get percentage of time busy accessing memory | device_id | int | in percent time |\n| smi_get_device_memory_reserved_pages | get info of reserved device memory | device_id | (# pages, ptr to block) | |\n| smi_get_device_pcie_bandwidth | get device's estimated PCIe bandwidth | device_id | float | in Bytes/sec |\n| smi_get_device_compute_process | get list of pid of processes running on the system | None | List[int] |  |\n| smi_get_device_average_power | get device's average power | device_id | float | power in Watt |\n| smi_get_device_xgmi_error_status | get XGMI error status for the device | device_id | int |  |\n| smi_reset_device_xgmi_error | get device's average power | device_id | float | power in Watt |\n| smi_get_device_compute_partition | get device's compute partition | device_id | str | e.g. 'SPX', 'CPX' |\n| smi_get_device_memory_partition | get device's memory partition | device_id | str | e.g. 'NPS1' |\n| smi_get_device_link_type | gets hops and types of link between two devices | (device_id, device_id) | (int, int) | (n_hops, type) |\n| smi_get_device_uuid | gets UUID of the device | (device_id, format) | str | default with 'GPU-' prefix |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frocm%2Fpyrsmi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frocm%2Fpyrsmi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frocm%2Fpyrsmi/lists"}