[SWDEV-496693] GPU metrics 1.7

Changes:
    - Added new GPU metrics:
      1) XGMI link status - Up/Down; 1 = up; 0 = down
      2) Graphics clocks below host limit (per XCP)
         accumulators -> used to help calculate a violation status
      3) VRAM max bandwidth at max memory clock
    - Updated rocm-smi --showmetrics to include new metrics.
    Units/values reflect as indicated by driver, may differ
    from AMD SMI or other ROCm SMI interfaces which
    use these fields.
    - N/A fields means the device does not support providing this
    data.

Change-Id: I17b313345f15070a76b3a30dd8d5645d212d601b
Signed-off-by: Charis Poag <Charis.Poag@amd.com>


[ROCm/rocm_smi_lib commit: 4de2168866]
This commit is contained in:
Charis Poag
2024-12-12 17:56:09 -06:00
parent 5d7555e586
commit 7b3c814501
8 changed files with 969 additions and 6 deletions
@@ -663,6 +663,7 @@ amdgpu_xcp_metrics_t._fields_ = [
('jpeg_busy', c_uint16 * 32),
('vcn_busy', c_uint16 * 4),
('gfx_busy_acc', c_uint64 * 8),
('gfx_below_host_limit_acc', c_uint64 * 8),
]
xcp_stats_t = amdgpu_xcp_metrics_t
@@ -739,5 +740,7 @@ rsmi_gpu_metrics_t._fields_ = [
('num_partition', c_uint16),
('xcp_stats', xcp_stats_t * 8),
('pcie_lc_perf_other_end_recovery', c_uint32),
('vram_max_bandwidth', c_uint64),
('xgmi_link_status', c_uint16 * 8),
]
amdsmi_gpu_metrics_t = rsmi_gpu_metrics_t