[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>
此提交包含在:
@@ -3550,6 +3550,7 @@ def showGPUMetrics(deviceList):
|
||||
clock_unit="MHz"
|
||||
fan_speed="rpm"
|
||||
percent_unit="%"
|
||||
vram_max_bw="GB/s"
|
||||
pcie_acc_unit="GB/s"
|
||||
pcie_lanes_unit="Lanes"
|
||||
pcie_speed_unit="0.1 GT/s"
|
||||
@@ -3558,6 +3559,7 @@ def showGPUMetrics(deviceList):
|
||||
time_unit="ns"
|
||||
time_unit_10="10ns resolution"
|
||||
count="Count"
|
||||
link_status="Up/Down"
|
||||
no_unit = None
|
||||
|
||||
for device in deviceList:
|
||||
@@ -3765,6 +3767,14 @@ def showGPUMetrics(deviceList):
|
||||
"value": validateIfMaxUint(gpu_metrics.pcie_lc_perf_other_end_recovery, UIntegerTypes.UINT32_T),
|
||||
"unit": count,
|
||||
},
|
||||
"vram_max_bandwidth": {
|
||||
"value": validateIfMaxUint(gpu_metrics.vram_max_bandwidth, UIntegerTypes.UINT64_T),
|
||||
"unit": vram_max_bw,
|
||||
},
|
||||
"xgmi_link_status": {
|
||||
"value": validateIfMaxUint(list(gpu_metrics.xgmi_link_status), UIntegerTypes.UINT16_T),
|
||||
"unit": link_status,
|
||||
},
|
||||
"num_partition": {
|
||||
"value": validateIfMaxUint(gpu_metrics.num_partition, UIntegerTypes.UINT16_T),
|
||||
"unit": no_unit,
|
||||
@@ -3785,6 +3795,10 @@ def showGPUMetrics(deviceList):
|
||||
"value": gpu_metrics.xcp_stats,
|
||||
"unit": percent_unit,
|
||||
},
|
||||
"xcp_stats.gfx_below_host_limit_acc": {
|
||||
"value": gpu_metrics.xcp_stats,
|
||||
"unit": percent_unit,
|
||||
},
|
||||
}
|
||||
|
||||
printLog(device, 'Metric Version and Size (Bytes)',
|
||||
@@ -3819,6 +3833,12 @@ def showGPUMetrics(deviceList):
|
||||
for _, val in enumerate(item.gfx_busy_acc):
|
||||
print_xcp_detail.append(validateIfMaxUint(val, UIntegerTypes.UINT64_T))
|
||||
printLog(device, k + " (" + str(v["unit"]) + ")", str(print_xcp_detail), xcp=str(curr_xcp))
|
||||
if 'xcp_stats.gfx_below_host_limit_acc' in k:
|
||||
for curr_xcp, item in enumerate(v['value']):
|
||||
print_xcp_detail = []
|
||||
for _, val in enumerate(item.gfx_below_host_limit_acc):
|
||||
print_xcp_detail.append(validateIfMaxUint(val, UIntegerTypes.UINT64_T))
|
||||
printLog(device, k + " (" + str(v["unit"]) + ")", str(print_xcp_detail), xcp=str(curr_xcp))
|
||||
|
||||
if int(device) < (len(deviceList) - 1):
|
||||
printLogSpacer()
|
||||
|
||||
@@ -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
|
||||
|
||||
新增問題並參考
封鎖使用者