Merge amd-staging into amd-master 20230302
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com> Change-Id: I17c723b907c988754d2da5d04092c1d435e29cc1
Этот коммит содержится в:
@@ -1440,6 +1440,9 @@ def setComputePartition(deviceList, computePartitionType):
|
||||
None)
|
||||
elif ret == rsmi_status_t.RSMI_STATUS_PERMISSION:
|
||||
printLog(device, 'Permission denied', None)
|
||||
elif ret == rsmi_status_t.RSMI_STATUS_SETTING_UNAVAILABLE:
|
||||
printLog(device, 'Requested setting (%s) is unavailable for current device'
|
||||
%computePartitionType, None)
|
||||
elif ret == rsmi_status_t.RSMI_STATUS_NOT_SUPPORTED:
|
||||
printLog(device, 'Not supported on the given system', None)
|
||||
else:
|
||||
@@ -1558,13 +1561,12 @@ def showAllConcise(deviceList):
|
||||
else:
|
||||
gpu_busy = 'Unsupported'
|
||||
memInfo = getMemInfo(device, 'vram')
|
||||
if memInfo[0] == None or memInfo[1] == None:
|
||||
mem_use = 'N/A'
|
||||
else:
|
||||
mem_use_pct = 0
|
||||
if memInfo[0] != None and memInfo[1] != None and float(memInfo[1]) != 0:
|
||||
mem_use_pct = '% 3.0f%%' % (100 * (float(memInfo[0]) / float(memInfo[1])))
|
||||
values['card%s' % (str(device))] = [device, temp, avgPwr, sclk, mclk, fan, str(perf).lower(), pwrCap,
|
||||
mem_use_pct, gpu_busy]
|
||||
val_widths = {}
|
||||
val_widths = {}
|
||||
for device in deviceList:
|
||||
val_widths[device] = [len(str(val)) + 2 for val in values['card%s' % (str(device))]]
|
||||
max_widths = head_widths
|
||||
|
||||
@@ -69,7 +69,8 @@ class rsmi_status_t(c_int):
|
||||
RSMI_STATUS_UNEXPECTED_DATA = 0xF
|
||||
RSMI_STATUS_BUSY = 0x10
|
||||
RSMI_STATUS_REFCOUNT_OVERFLOW = 0x11
|
||||
RSMI_STATUS_AMDGPU_RESTART_ERR = 0x12
|
||||
RSMI_STATUS_SETTING_UNAVAILABLE = 0x12
|
||||
RSMI_STATUS_AMDGPU_RESTART_ERR = 0x13
|
||||
RSMI_STATUS_UNKNOWN_ERROR = 0xFFFFFFFF
|
||||
|
||||
|
||||
@@ -93,6 +94,7 @@ rsmi_status_verbose_err_out = {
|
||||
rsmi_status_t.RSMI_STATUS_UNEXPECTED_DATA: 'Unexpected data received',
|
||||
rsmi_status_t.RSMI_STATUS_BUSY: 'Busy - resources are preventing call the ability to execute',
|
||||
rsmi_status_t.RSMI_STATUS_REFCOUNT_OVERFLOW: 'Data overflow - data exceeded INT32_MAX',
|
||||
rsmi_status_t.RSMI_STATUS_SETTING_UNAVAILABLE: 'Requested setting is unavailable for current device',
|
||||
rsmi_status_t.RSMI_STATUS_AMDGPU_RESTART_ERR: 'Could not successfully restart the amdgpu driver',
|
||||
rsmi_status_t.RSMI_STATUS_UNKNOWN_ERROR: 'Unknown error occured'
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user