Add fix to display correct GPU Memory Activity and GFX Activity value.
Driver mem fills in 0xFF for all for the metrices not supported for that ASIC.
So if 0xFF is detected, return RSMI_STATUS_NOT_SUPPORTED
Signed-off-by: Divya Shikre <DivyaUday.Shikre@amd.com>
Change-Id: I86a38148c7a288ea0db94893f685560eaac098ab
[ROCm/rocm_smi_lib commit: 7b1daaef96]
Cette révision appartient à :
@@ -1604,7 +1604,7 @@ def getCoarseGrainUtil(device, typeName=None):
|
||||
utilization_counters[i].type = c_int(i)
|
||||
|
||||
ret = rocmsmi.rsmi_utilization_count_get(device, utilization_counters, length, byref(timestamp))
|
||||
if rsmi_ret_ok(ret, device):
|
||||
if rsmi_ret_ok(ret, device, typeName, True):
|
||||
return utilization_counters
|
||||
return -1
|
||||
|
||||
@@ -1624,6 +1624,9 @@ def showGpuUse(deviceList):
|
||||
if util_counters != -1:
|
||||
for ut_counter in util_counters:
|
||||
printLog(device, utilization_counter_name[ut_counter.type], ut_counter.val)
|
||||
else:
|
||||
printLog(device, 'GFX Activity', 'N/A')
|
||||
|
||||
printLogSpacer()
|
||||
|
||||
|
||||
@@ -1713,6 +1716,8 @@ def showMemUse(deviceList):
|
||||
if util_counters != -1:
|
||||
for ut_counter in util_counters:
|
||||
printLog(device, utilization_counter_name[ut_counter.type], ut_counter.val)
|
||||
else:
|
||||
printLog(device, 'Memory Activity', 'N/A')
|
||||
printLogSpacer()
|
||||
|
||||
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur