[SWDEV-530633] Use gpu_metric speed and BW for xgmi (#366)
The xgmi command was showing pcie bit rate and bandwidth instead of xgmi. Corrected the API to get xgmi data from gpu metric. Added python API for amdsmi_get_link_metrics. Modified the amdsmi_link_metrics struct. Added check to confirm non zero partition got xgmi command. --------- Signed-off-by: Bindhiya Kanangot Balakrishnan <Bindhiya.KanangotBalakrishnan@amd.com> Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
This commit is contained in:
committed by
GitHub
parent
2e8aaf02c9
commit
2eff0b3764
@@ -1153,8 +1153,6 @@ class struct__links(Structure):
|
||||
struct__links._pack_ = 1 # source:False
|
||||
struct__links._fields_ = [
|
||||
('bdf', amdsmi_bdf_t),
|
||||
('bit_rate', ctypes.c_uint32),
|
||||
('max_bandwidth', ctypes.c_uint32),
|
||||
('link_type', amdsmi_link_type_t),
|
||||
('PADDING_0', ctypes.c_ubyte * 4),
|
||||
('read', ctypes.c_uint64),
|
||||
@@ -1165,6 +1163,8 @@ struct__links._fields_ = [
|
||||
struct_amdsmi_link_metrics_t._pack_ = 1 # source:False
|
||||
struct_amdsmi_link_metrics_t._fields_ = [
|
||||
('num_links', ctypes.c_uint32),
|
||||
('bit_rate', ctypes.c_uint32),
|
||||
('max_bandwidth', ctypes.c_uint32),
|
||||
('PADDING_0', ctypes.c_ubyte * 4),
|
||||
('links', struct__links * 64),
|
||||
('reserved', ctypes.c_uint64 * 7),
|
||||
|
||||
Reference in New Issue
Block a user