{"id":18711147,"url":"https://github.com/rocm/rocm_smi_lib","last_synced_at":"2025-12-12T00:48:30.401Z","repository":{"id":41124973,"uuid":"108874242","full_name":"ROCm/rocm_smi_lib","owner":"ROCm","description":"ROCm SMI LIB ","archived":false,"fork":false,"pushed_at":"2025-05-12T12:05:01.000Z","size":12376,"stargazers_count":134,"open_issues_count":30,"forks_count":53,"subscribers_count":36,"default_branch":"amd-staging","last_synced_at":"2025-05-12T13:24:33.458Z","etag":null,"topics":["sysadmin","trace"],"latest_commit_sha":null,"homepage":"https://rocm.docs.amd.com/projects/rocm_smi_lib/en/latest/","language":"C++","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":".github/CONTRIBUTING.md","funding":null,"license":"License.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-10-30T15:58:46.000Z","updated_at":"2025-05-09T00:12:06.000Z","dependencies_parsed_at":"2023-12-18T22:43:40.613Z","dependency_job_id":"4a15d52b-c17c-48d5-ac79-22e68c54dca1","html_url":"https://github.com/ROCm/rocm_smi_lib","commit_stats":{"total_commits":375,"total_committers":26,"mean_commits":"14.423076923076923","dds":0.6053333333333333,"last_synced_commit":"ab58b590b98580c279ea4446eafe043b526e8305"},"previous_names":["rocm/rocm_smi_lib","radeonopencompute/rocm_smi_lib"],"tags_count":116,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ROCm%2Frocm_smi_lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ROCm%2Frocm_smi_lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ROCm%2Frocm_smi_lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ROCm%2Frocm_smi_lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ROCm","download_url":"https://codeload.github.com/ROCm/rocm_smi_lib/tar.gz/refs/heads/amd-staging","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254553959,"owners_count":22090417,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["sysadmin","trace"],"created_at":"2024-11-07T12:37:18.425Z","updated_at":"2025-12-12T00:48:30.363Z","avatar_url":"https://github.com/ROCm.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🛠️ Maintenance Mode Notice 🛠️\n\nStarting with ROCm 6.5, only critical bug fixes will be applied to ROCm-SMI.\nFor a seamless experience and continued support, please switch to [AMD-SMI](https://github.com/ROCm/amdsmi).\n\n## Use C++ in ROCm SMI\n\n### Device Indices\n\nMany of the functions in the library take a \"device index\". The device index is a number greater than or equal to 0, and less than the number of devices detected, as determined by `rsmi_num_monitor_devices()`. The index is used to distinguish the detected devices from one another. It is important to note that a device may end up with a different index after a reboot, so an index should not be relied upon to be constant over reboots.\n\n## Hello ROCm SMI\n\nThe only required ROCm-SMI call for any program that wants to use ROCm-SMI is the `rsmi_init()` call. This call initializes some internal data structures that will be used by subsequent ROCm-SMI calls.\n\nWhen ROCm-SMI is no longer being used, `rsmi_shut_down()` should be called. This provides a way to do any releasing of resources that ROCm-SMI may have held. In many cases, this may have no effect, but may be necessary in future versions of the library.\n\nA simple \"Hello World\" type program that displays the device ID of detected devices would look like this:\n\n```c\n#include \u003cstdint.h\u003e\n#include \"rocm_smi/rocm_smi.h\"\nint main() {\n  rsmi_status_t ret;\n  uint32_t num_devices;\n  uint16_t dev_id;\n\n  // We will skip return code checks for this example, but it\n  // is recommended to always check this as some calls may not\n  // apply for some devices or ROCm releases\n\n  ret = rsmi_init(0);\n  ret = rsmi_num_monitor_devices(\u0026num_devices);\n\n  for (int i=0; i \u003c num_devices; ++i) {\n    ret = rsmi_dev_id_get(i, \u0026dev_id);\n    // dev_id holds the device ID of device i, upon a\n    // successful call\n  }\n  ret = rsmi_shut_down();\n  return 0;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frocm%2Frocm_smi_lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frocm%2Frocm_smi_lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frocm%2Frocm_smi_lib/lists"}