[SWDEV-463406] Update API with fields for gfx_clock_below_host_limit and low_utilization violations
Updated API with fields for gfx_clock_below_host_limit and low_utilization violations Change-Id: I25647bae6e7b785f44dab024272767658688bcad --------- Signed-off-by: Scaffidi, Salvatore <Salvatore.Scaffidi@amd.com> Signed-off-by: Arif, Maisam <Maisam.Arif@amd.com> Co-authored-by: Charis Poag <Charis.Poag@amd.com>
Este cometimento está contido em:
cometido por
GitHub
ascendente
490132748f
cometimento
3793be7735
@@ -28,6 +28,7 @@ from .amdsmi_exception import *
|
||||
import sys
|
||||
import math
|
||||
from time import localtime, asctime, time
|
||||
import json
|
||||
|
||||
MAX_NUM_PROCESSES = 1024
|
||||
|
||||
@@ -1559,7 +1560,9 @@ def amdsmi_get_hsmp_metrics_table(
|
||||
"mtbl_ppt_residency_acc": mtbl.ppt_residency_acc,
|
||||
"mtbl_socket_thm_residency_acc": mtbl.socket_thm_residency_acc,
|
||||
"mtbl_vr_thm_residency_acc": mtbl.vr_thm_residency_acc,
|
||||
"mtbl_hbm_thm_residency_acc": mtbl.hbm_thm_residency_acc
|
||||
"mtbl_hbm_thm_residency_acc": mtbl.hbm_thm_residency_acc,
|
||||
"mtbl_gfx_clk_below_host_residency_acc": mtbl.gfx_clk_below_host_residency_acc,
|
||||
"mtbl_low_utilization_residency_acc": mtbl.low_utilization_residency_acc
|
||||
}
|
||||
|
||||
def amdsmi_first_online_core_on_cpu_socket(
|
||||
@@ -2035,7 +2038,7 @@ def amdsmi_get_violation_status(
|
||||
processor_handle, ctypes.byref(violation_status))
|
||||
)
|
||||
|
||||
return {
|
||||
dict_return = {
|
||||
"reference_timestamp": _validate_if_max_uint(violation_status.reference_timestamp, MaxUIntegerTypes.UINT64_T),
|
||||
"violation_timestamp": _validate_if_max_uint(violation_status.violation_timestamp, MaxUIntegerTypes.UINT64_T),
|
||||
"acc_counter": _validate_if_max_uint(violation_status.acc_counter, MaxUIntegerTypes.UINT64_T),
|
||||
@@ -2044,17 +2047,21 @@ def amdsmi_get_violation_status(
|
||||
"acc_socket_thrm": _validate_if_max_uint(violation_status.acc_socket_thrm, MaxUIntegerTypes.UINT64_T), #TVIOL
|
||||
"acc_vr_thrm": _validate_if_max_uint(violation_status.acc_vr_thrm, MaxUIntegerTypes.UINT64_T),
|
||||
"acc_hbm_thrm": _validate_if_max_uint(violation_status.acc_hbm_thrm, MaxUIntegerTypes.UINT64_T),
|
||||
"acc_gfx_clk_below_host_limit": _validate_if_max_uint(violation_status.acc_gfx_clk_below_host_limit, MaxUIntegerTypes.UINT64_T),
|
||||
"per_prochot_thrm": _validate_if_max_uint(violation_status.per_prochot_thrm, MaxUIntegerTypes.UINT64_T, isActivity=True),
|
||||
"per_ppt_pwr": _validate_if_max_uint(violation_status.per_ppt_pwr, MaxUIntegerTypes.UINT64_T, isActivity=True), #PVIOL
|
||||
"per_socket_thrm": _validate_if_max_uint(violation_status.per_socket_thrm, MaxUIntegerTypes.UINT64_T, isActivity=True), #TVIOL
|
||||
"per_vr_thrm": _validate_if_max_uint(violation_status.per_vr_thrm, MaxUIntegerTypes.UINT64_T, isActivity=True),
|
||||
"per_hbm_thrm": _validate_if_max_uint(violation_status.per_hbm_thrm, MaxUIntegerTypes.UINT64_T, isActivity=True),
|
||||
"per_gfx_clk_below_host_limit": _validate_if_max_uint(violation_status.per_gfx_clk_below_host_limit, MaxUIntegerTypes.UINT64_T, isActivity=True),
|
||||
"active_prochot_thrm": _validate_if_max_uint(violation_status.active_prochot_thrm, MaxUIntegerTypes.UINT8_T, isBool=True),
|
||||
"active_ppt_pwr": _validate_if_max_uint(violation_status.active_ppt_pwr, MaxUIntegerTypes.UINT8_T, isBool=True), #PVIOL
|
||||
"active_socket_thrm": _validate_if_max_uint(violation_status.active_socket_thrm, MaxUIntegerTypes.UINT8_T, isBool=True), #TVIOL
|
||||
"active_vr_thrm": _validate_if_max_uint(violation_status.active_vr_thrm, MaxUIntegerTypes.UINT8_T, isBool=True),
|
||||
"active_hbm_thrm": _validate_if_max_uint(violation_status.active_hbm_thrm, MaxUIntegerTypes.UINT8_T, isBool=True)
|
||||
"active_hbm_thrm": _validate_if_max_uint(violation_status.active_hbm_thrm, MaxUIntegerTypes.UINT8_T, isBool=True),
|
||||
"active_gfx_clk_below_host_limit": _validate_if_max_uint(violation_status.active_gfx_clk_below_host_limit, MaxUIntegerTypes.UINT8_T, isBool=True),
|
||||
}
|
||||
return dict_return
|
||||
|
||||
def amdsmi_get_gpu_total_ecc_count(
|
||||
processor_handle: amdsmi_wrapper.amdsmi_processor_handle,
|
||||
|
||||
@@ -727,18 +727,21 @@ struct_amdsmi_violation_status_t._fields_ = [
|
||||
('acc_socket_thrm', ctypes.c_uint64),
|
||||
('acc_vr_thrm', ctypes.c_uint64),
|
||||
('acc_hbm_thrm', ctypes.c_uint64),
|
||||
('acc_gfx_clk_below_host_limit', ctypes.c_uint64),
|
||||
('per_prochot_thrm', ctypes.c_uint64),
|
||||
('per_ppt_pwr', ctypes.c_uint64),
|
||||
('per_socket_thrm', ctypes.c_uint64),
|
||||
('per_vr_thrm', ctypes.c_uint64),
|
||||
('per_hbm_thrm', ctypes.c_uint64),
|
||||
('per_gfx_clk_below_host_limit', ctypes.c_uint64),
|
||||
('active_prochot_thrm', ctypes.c_ubyte),
|
||||
('active_ppt_pwr', ctypes.c_ubyte),
|
||||
('active_socket_thrm', ctypes.c_ubyte),
|
||||
('active_vr_thrm', ctypes.c_ubyte),
|
||||
('active_hbm_thrm', ctypes.c_ubyte),
|
||||
('PADDING_0', ctypes.c_ubyte * 3),
|
||||
('reserved', ctypes.c_uint64 * 30),
|
||||
('active_gfx_clk_below_host_limit', ctypes.c_ubyte),
|
||||
('PADDING_0', ctypes.c_ubyte * 2),
|
||||
('reserved', ctypes.c_uint64 * 3),
|
||||
]
|
||||
|
||||
amdsmi_violation_status_t = struct_amdsmi_violation_status_t
|
||||
@@ -791,6 +794,19 @@ amdsmi_card_form_factor_t = ctypes.c_uint32 # enum
|
||||
class struct_amdsmi_pcie_info_t(Structure):
|
||||
pass
|
||||
|
||||
class struct_pcie_static_(Structure):
|
||||
pass
|
||||
|
||||
struct_pcie_static_._pack_ = 1 # source:False
|
||||
struct_pcie_static_._fields_ = [
|
||||
('max_pcie_width', ctypes.c_uint16),
|
||||
('PADDING_0', ctypes.c_ubyte * 2),
|
||||
('max_pcie_speed', ctypes.c_uint32),
|
||||
('pcie_interface_version', ctypes.c_uint32),
|
||||
('slot_type', amdsmi_card_form_factor_t),
|
||||
('reserved', ctypes.c_uint64 * 10),
|
||||
]
|
||||
|
||||
class struct_pcie_metric_(Structure):
|
||||
pass
|
||||
|
||||
@@ -811,19 +827,6 @@ struct_pcie_metric_._fields_ = [
|
||||
('reserved', ctypes.c_uint64 * 12),
|
||||
]
|
||||
|
||||
class struct_pcie_static_(Structure):
|
||||
pass
|
||||
|
||||
struct_pcie_static_._pack_ = 1 # source:False
|
||||
struct_pcie_static_._fields_ = [
|
||||
('max_pcie_width', ctypes.c_uint16),
|
||||
('PADDING_0', ctypes.c_ubyte * 2),
|
||||
('max_pcie_speed', ctypes.c_uint32),
|
||||
('pcie_interface_version', ctypes.c_uint32),
|
||||
('slot_type', amdsmi_card_form_factor_t),
|
||||
('reserved', ctypes.c_uint64 * 10),
|
||||
]
|
||||
|
||||
struct_amdsmi_pcie_info_t._pack_ = 1 # source:False
|
||||
struct_amdsmi_pcie_info_t._fields_ = [
|
||||
('pcie_static', struct_pcie_static_),
|
||||
@@ -1120,16 +1123,6 @@ amdsmi_process_handle_t = ctypes.c_uint32
|
||||
class struct_amdsmi_proc_info_t(Structure):
|
||||
pass
|
||||
|
||||
class struct_engine_usage_(Structure):
|
||||
pass
|
||||
|
||||
struct_engine_usage_._pack_ = 1 # source:False
|
||||
struct_engine_usage_._fields_ = [
|
||||
('gfx', ctypes.c_uint64),
|
||||
('enc', ctypes.c_uint64),
|
||||
('reserved', ctypes.c_uint32 * 12),
|
||||
]
|
||||
|
||||
class struct_memory_usage_(Structure):
|
||||
pass
|
||||
|
||||
@@ -1141,6 +1134,16 @@ struct_memory_usage_._fields_ = [
|
||||
('reserved', ctypes.c_uint32 * 10),
|
||||
]
|
||||
|
||||
class struct_engine_usage_(Structure):
|
||||
pass
|
||||
|
||||
struct_engine_usage_._pack_ = 1 # source:False
|
||||
struct_engine_usage_._fields_ = [
|
||||
('gfx', ctypes.c_uint64),
|
||||
('enc', ctypes.c_uint64),
|
||||
('reserved', ctypes.c_uint32 * 12),
|
||||
]
|
||||
|
||||
struct_amdsmi_proc_info_t._pack_ = 1 # source:False
|
||||
struct_amdsmi_proc_info_t._fields_ = [
|
||||
('name', ctypes.c_char * 256),
|
||||
|
||||
Criar uma nova questão referindo esta
Bloquear um utilizador