ROCm / pyrsmi

python package of rocm-smi-lib
MIT License
18 stars 6 forks source link

pyrsmi

Python Bindings for System Management Library for AMD GPUs


Requirements

How to install from source

How to install Python packages

How to install from PyPI

How to use pyrsmi

Examples

List of API functions

Function Description Argument Return Type Note
smi_initialize initialize rsmi None None
smi_shutdown shut down rsmi None None
smi_get_version get version of rsmi None str 'major.minor.patch'
smi_get_kernel_version get version of ROCm kernel driver None str
smi_get_device_id get device id of GPU devices None uint64 id of devices
smi_get_device_count get number of GPU devices None int num of devices
smi_get_device_name get name of GPU devices None str
smi_get_device_unique_id get unique id of GPU devices None int 64bit integer
smi_get_device_utilization get device utilization in % busy device_id int
smi_get_device_memory_used get device memory usage device_id int in Bytes, type 'VRAM'
smi_get_device_memory_total get device's total memory device_id int in Bytes, type 'VRAM'
smi_get_device_memory_busy get percentage of time busy accessing memory device_id int in percent time
smi_get_device_memory_reserved_pages get info of reserved device memory device_id (# pages, ptr to block)
smi_get_device_pcie_bandwidth get device's estimated PCIe bandwidth device_id float in Bytes/sec
smi_get_device_compute_process get list of pid of processes running on the system None List[int]
smi_get_device_average_power get device's average power device_id float power in Watt
smi_get_device_xgmi_error_status get XGMI error status for the device device_id int
smi_reset_device_xgmi_error get device's average power device_id float power in Watt
smi_get_device_compute_partition get device's compute partition device_id str e.g. 'SPX', 'CPX'
smi_get_device_memory_partition get device's memory partition device_id str e.g. 'NPS1'
smi_get_device_link_type gets hops and types of link between two devices (device_id, device_id) (int, int) (n_hops, type)
smi_get_device_uuid gets UUID of the device (device_id, format) str default with 'GPU-' prefix