ROCm SMI Python CLI: Add showevent Functionality
Implement showevent functionality in the ROCm SMI Python CLI.
It can be called using --showevents with any combination of:
VM_FAULT, THERMAL_THROTTLE, and/or GPU_RESET
For example:
./rocm-smi --showevents VM_FAULT, THERMAL_THROTTLE, GPU_RESET
Signed-off-by: Ori Messinger <Ori.Messinger@amd.com>
Change-Id: I905fd9c949e91423b79833a04ab89d6ba3760e62
[ROCm/amdsmi commit: a9e7e5a475]
Tento commit je obsažen v:
@@ -86,6 +86,18 @@ class rsmi_dev_perf_level_t(c_int):
|
||||
RSMI_DEV_PERF_LEVEL_UNKNOWN = 0x100
|
||||
|
||||
|
||||
notification_type_names = ['VM_FAULT', 'THERMAL_THROTTLE', 'GPU_RESET']
|
||||
|
||||
|
||||
class rsmi_evt_notification_type_t(c_int):
|
||||
RSMI_EVT_NOTIF_VMFAULT = 0
|
||||
RSMI_EVT_NOTIF_FIRST = RSMI_EVT_NOTIF_VMFAULT
|
||||
RSMI_EVT_NOTIF_THERMAL_THROTTLE = 1
|
||||
RSMI_EVT_NOTIF_GPU_PRE_RESET = 2
|
||||
RSMI_EVT_NOTIF_GPU_POST_RESET = 3
|
||||
RSMI_EVT_NOTIF_LAST = RSMI_EVT_NOTIF_GPU_POST_RESET
|
||||
|
||||
|
||||
class rsmi_voltage_metric_t(c_int):
|
||||
RSMI_VOLT_CURRENT = 0
|
||||
RSMI_VOLT_FIRST = RSMI_VOLT_CURRENT
|
||||
@@ -506,6 +518,12 @@ class rsmi_error_count_t(Structure):
|
||||
('uncorrectable_err', c_uint64)]
|
||||
|
||||
|
||||
class rsmi_evt_notification_data_t(Structure):
|
||||
_fields_ = [('dv_ind', c_uint32),
|
||||
('event', rsmi_evt_notification_type_t),
|
||||
('message', c_char*64)]
|
||||
|
||||
|
||||
class rsmi_process_info_t(Structure):
|
||||
_fields_ = [('process_id', c_uint32),
|
||||
('pasid', c_uint32),
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele