Revert Major ABI break for amdsmi_get_violation_status()
Changes: - This aligns back to original struct naming for ROCm 7.0. This removes any Major ABI breakages for updates for 7.0 release. - Minor ABI breakage is required since there were additions to the header. Refer to changelog for these updates. Change-Id: If35af74eac6beac8c267d05ce789b7761ed24bff Signed-off-by: Charis Poag <Charis.Poag@amd.com>
Этот коммит содержится в:
коммит произвёл
Arif, Maisam
родитель
c45a53d751
Коммит
d3b73fac82
@@ -2448,7 +2448,7 @@ def amdsmi_get_violation_status(
|
||||
"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),
|
||||
"acc_gfx_clk_below_host_limit_pwr": list(violation_status.acc_gfx_clk_below_host_limit_pwr),
|
||||
"acc_gfx_clk_below_host_limit_thrm": list(violation_status.acc_gfx_clk_below_host_limit_thrm),
|
||||
"acc_gfx_clk_below_host_limit_thm": list(violation_status.acc_gfx_clk_below_host_limit_thm),
|
||||
"acc_gfx_clk_below_host_limit_total": list(violation_status.acc_gfx_clk_below_host_limit_total),
|
||||
"acc_low_utilization": list(violation_status.acc_low_utilization),
|
||||
"per_prochot_thrm": _validate_if_max_uint(violation_status.per_prochot_thrm, MaxUIntegerTypes.UINT64_T, isActivity=True),
|
||||
@@ -2458,7 +2458,7 @@ def amdsmi_get_violation_status(
|
||||
"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),
|
||||
"per_gfx_clk_below_host_limit_pwr": list(violation_status.per_gfx_clk_below_host_limit_pwr),
|
||||
"per_gfx_clk_below_host_limit_thrm": list(violation_status.per_gfx_clk_below_host_limit_thrm),
|
||||
"per_gfx_clk_below_host_limit_thm": list(violation_status.per_gfx_clk_below_host_limit_thm),
|
||||
"per_gfx_clk_below_host_limit_total": list(violation_status.per_gfx_clk_below_host_limit_total),
|
||||
"per_low_utilization": list(violation_status.per_low_utilization),
|
||||
"active_prochot_thrm": _validate_if_max_uint(violation_status.active_prochot_thrm, MaxUIntegerTypes.UINT8_T, isBool=True),
|
||||
@@ -2468,7 +2468,7 @@ def amdsmi_get_violation_status(
|
||||
"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),
|
||||
"active_gfx_clk_below_host_limit_pwr": list(violation_status.active_gfx_clk_below_host_limit_pwr),
|
||||
"active_gfx_clk_below_host_limit_thrm": list(violation_status.active_gfx_clk_below_host_limit_thrm),
|
||||
"active_gfx_clk_below_host_limit_thm": list(violation_status.active_gfx_clk_below_host_limit_thm),
|
||||
"active_gfx_clk_below_host_limit_total": list(violation_status.active_gfx_clk_below_host_limit_total),
|
||||
"active_low_utilization": list(violation_status.active_low_utilization),
|
||||
}
|
||||
@@ -2480,12 +2480,12 @@ def amdsmi_get_violation_status(
|
||||
for val in xcp_metrics:
|
||||
xcp_detail.append(_validate_if_max_uint(val, MaxUIntegerTypes.UINT64_T))
|
||||
dict_return['acc_gfx_clk_below_host_limit_pwr'][xcp_index] = xcp_detail
|
||||
if 'acc_gfx_clk_below_host_limit_thrm' in dict_return:
|
||||
for xcp_index, xcp_metrics in enumerate(dict_return['acc_gfx_clk_below_host_limit_thrm']):
|
||||
if 'acc_gfx_clk_below_host_limit_thm' in dict_return:
|
||||
for xcp_index, xcp_metrics in enumerate(dict_return['acc_gfx_clk_below_host_limit_thm']):
|
||||
xcp_detail = []
|
||||
for val in xcp_metrics:
|
||||
xcp_detail.append(_validate_if_max_uint(val, MaxUIntegerTypes.UINT64_T))
|
||||
dict_return['acc_gfx_clk_below_host_limit_thrm'][xcp_index] = xcp_detail
|
||||
dict_return['acc_gfx_clk_below_host_limit_thm'][xcp_index] = xcp_detail
|
||||
if 'acc_low_utilization' in dict_return:
|
||||
for xcp_index, xcp_metrics in enumerate(dict_return['acc_low_utilization']):
|
||||
xcp_detail = []
|
||||
@@ -2505,12 +2505,12 @@ def amdsmi_get_violation_status(
|
||||
for val in xcp_metrics:
|
||||
xcp_detail.append(_validate_if_max_uint(val, MaxUIntegerTypes.UINT64_T, isActivity=True))
|
||||
dict_return['per_gfx_clk_below_host_limit_pwr'][xcp_index] = xcp_detail
|
||||
if 'per_gfx_clk_below_host_limit_thrm' in dict_return:
|
||||
for xcp_index, xcp_metrics in enumerate(dict_return['per_gfx_clk_below_host_limit_thrm']):
|
||||
if 'per_gfx_clk_below_host_limit_thm' in dict_return:
|
||||
for xcp_index, xcp_metrics in enumerate(dict_return['per_gfx_clk_below_host_limit_thm']):
|
||||
xcp_detail = []
|
||||
for val in xcp_metrics:
|
||||
xcp_detail.append(_validate_if_max_uint(val, MaxUIntegerTypes.UINT64_T, isActivity=True))
|
||||
dict_return['per_gfx_clk_below_host_limit_thrm'][xcp_index] = xcp_detail
|
||||
dict_return['per_gfx_clk_below_host_limit_thm'][xcp_index] = xcp_detail
|
||||
if 'per_low_utilization' in dict_return:
|
||||
for xcp_index, xcp_metrics in enumerate(dict_return['per_low_utilization']):
|
||||
xcp_detail = []
|
||||
@@ -2530,12 +2530,12 @@ def amdsmi_get_violation_status(
|
||||
for val in xcp_metrics:
|
||||
xcp_detail.append(_validate_if_max_uint(val, MaxUIntegerTypes.UINT8_T, isBool=True))
|
||||
dict_return['active_gfx_clk_below_host_limit_pwr'][xcp_index] = xcp_detail
|
||||
if 'active_gfx_clk_below_host_limit_thrm' in dict_return:
|
||||
for xcp_index, xcp_metrics in enumerate(dict_return['active_gfx_clk_below_host_limit_thrm']):
|
||||
if 'active_gfx_clk_below_host_limit_thm' in dict_return:
|
||||
for xcp_index, xcp_metrics in enumerate(dict_return['active_gfx_clk_below_host_limit_thm']):
|
||||
xcp_detail = []
|
||||
for val in xcp_metrics:
|
||||
xcp_detail.append(_validate_if_max_uint(val, MaxUIntegerTypes.UINT8_T, isBool=True))
|
||||
dict_return['active_gfx_clk_below_host_limit_thrm'][xcp_index] = xcp_detail
|
||||
dict_return['active_gfx_clk_below_host_limit_thm'][xcp_index] = xcp_detail
|
||||
if 'active_low_utilization' in dict_return:
|
||||
for xcp_index, xcp_metrics in enumerate(dict_return['active_low_utilization']):
|
||||
xcp_detail = []
|
||||
|
||||
@@ -871,15 +871,15 @@ struct_amdsmi_violation_status_t._fields_ = [
|
||||
('active_gfx_clk_below_host_limit', ctypes.c_ubyte),
|
||||
('PADDING_0', ctypes.c_ubyte * 2),
|
||||
('acc_gfx_clk_below_host_limit_pwr', ctypes.c_uint64 * 8 * 8),
|
||||
('acc_gfx_clk_below_host_limit_thrm', ctypes.c_uint64 * 8 * 8),
|
||||
('acc_gfx_clk_below_host_limit_thm', ctypes.c_uint64 * 8 * 8),
|
||||
('acc_low_utilization', ctypes.c_uint64 * 8 * 8),
|
||||
('acc_gfx_clk_below_host_limit_total', ctypes.c_uint64 * 8 * 8),
|
||||
('per_gfx_clk_below_host_limit_pwr', ctypes.c_uint64 * 8 * 8),
|
||||
('per_gfx_clk_below_host_limit_thrm', ctypes.c_uint64 * 8 * 8),
|
||||
('per_gfx_clk_below_host_limit_thm', ctypes.c_uint64 * 8 * 8),
|
||||
('per_low_utilization', ctypes.c_uint64 * 8 * 8),
|
||||
('per_gfx_clk_below_host_limit_total', ctypes.c_uint64 * 8 * 8),
|
||||
('active_gfx_clk_below_host_limit_pwr', ctypes.c_ubyte * 8 * 8),
|
||||
('active_gfx_clk_below_host_limit_thrm', ctypes.c_ubyte * 8 * 8),
|
||||
('active_gfx_clk_below_host_limit_thm', ctypes.c_ubyte * 8 * 8),
|
||||
('active_low_utilization', ctypes.c_ubyte * 8 * 8),
|
||||
('active_gfx_clk_below_host_limit_total', ctypes.c_ubyte * 8 * 8),
|
||||
('reserved', ctypes.c_uint64 * 8 * 8),
|
||||
@@ -902,22 +902,22 @@ amdsmi_frequency_range_t = struct_amdsmi_frequency_range_t
|
||||
class union_amdsmi_bdf_t(Union):
|
||||
pass
|
||||
|
||||
class struct_amdsmi_bdf_t(Structure):
|
||||
class struct_bdf_(Structure):
|
||||
pass
|
||||
|
||||
struct_amdsmi_bdf_t._pack_ = 1 # source:False
|
||||
struct_amdsmi_bdf_t._fields_ = [
|
||||
struct_bdf_._pack_ = 1 # source:False
|
||||
struct_bdf_._fields_ = [
|
||||
('function_number', ctypes.c_uint64, 3),
|
||||
('device_number', ctypes.c_uint64, 5),
|
||||
('bus_number', ctypes.c_uint64, 8),
|
||||
('domain_number', ctypes.c_uint64, 48),
|
||||
]
|
||||
|
||||
class struct_bdf_(Structure):
|
||||
class struct_amdsmi_bdf_t(Structure):
|
||||
pass
|
||||
|
||||
struct_bdf_._pack_ = 1 # source:False
|
||||
struct_bdf_._fields_ = [
|
||||
struct_amdsmi_bdf_t._pack_ = 1 # source:False
|
||||
struct_amdsmi_bdf_t._fields_ = [
|
||||
('function_number', ctypes.c_uint64, 3),
|
||||
('device_number', ctypes.c_uint64, 5),
|
||||
('bus_number', ctypes.c_uint64, 8),
|
||||
@@ -962,6 +962,21 @@ 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),
|
||||
('max_pcie_interface_version', ctypes.c_uint32),
|
||||
('PADDING_1', ctypes.c_ubyte * 4),
|
||||
('reserved', ctypes.c_uint64 * 9),
|
||||
]
|
||||
|
||||
class struct_pcie_metric_(Structure):
|
||||
pass
|
||||
|
||||
@@ -982,21 +997,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),
|
||||
('max_pcie_interface_version', ctypes.c_uint32),
|
||||
('PADDING_1', ctypes.c_ubyte * 4),
|
||||
('reserved', ctypes.c_uint64 * 9),
|
||||
]
|
||||
|
||||
struct_amdsmi_pcie_info_t._pack_ = 1 # source:False
|
||||
struct_amdsmi_pcie_info_t._fields_ = [
|
||||
('pcie_static', struct_pcie_static_),
|
||||
|
||||
Ссылка в новой задаче
Block a user