Merge amd-dev into amd-master 20240124 Part 2

Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: Ied8b8a6ede28e78cf5b246fc969a753b41b6f104
此提交包含在:
Maisam Arif
2024-01-24 07:53:25 -06:00
當前提交 3f53b626f9
共有 3 個檔案被更改,包括 19 行新增10 行删除
+2
查看文件
@@ -329,6 +329,8 @@ class AMDSMICommands():
asic_info['rev_id'] = hex(asic_info['rev_id'])
if asic_info['asic_serial'] != '':
asic_info['asic_serial'] = hex(int(asic_info['asic_serial'], base=16))
else:
asic_info['asic_serial'] = "N/A"
if asic_info['oam_id'] == 0xFFFF: # uint 16 max
asic_info['oam_id'] = "N/A"
static_dict['asic'] = asic_info
+7 -6
查看文件
@@ -358,11 +358,12 @@ class AmdSmiProcessorType(IntEnum):
NON_AMD_GPU = amdsmi_wrapper.NON_AMD_GPU
NON_AMD_CPU = amdsmi_wrapper.NON_AMD_CPU
class AmdSmiCacheTypeNames(Enum):
DATA_CACHE = 2
INST_CACHE = 4
CPU_CACHE = 8
SIMD_CACHE = 16
class AmdSmiCacheTypeNames(IntEnum):
ENABLED = amdsmi_wrapper.CACHE_FLAGS_ENABLED
DATA_CACHE = amdsmi_wrapper.CACHE_FLAGS_DATA_CACHE
INST_CACHE = amdsmi_wrapper.CACHE_FLAGS_INST_CACHE
CPU_CACHE = amdsmi_wrapper.CACHE_FLAGS_CPU_CACHE
SIMD_CACHE = amdsmi_wrapper.CACHE_FLAGS_SIMD_CACHE
class AmdSmiEventReader:
def __init__(
@@ -1556,7 +1557,7 @@ def amdsmi_get_gpu_asic_info(
"market_name": asic_info.market_name.decode("utf-8"),
"vendor_id": asic_info.vendor_id,
"vendor_name": asic_info.vendor_name.decode("utf-8"),
"subvendor_id": asic_info.subvendor_id,
"subvendor_id": hex(asic_info.subvendor_id),
"device_id": asic_info.device_id,
"rev_id": asic_info.rev_id,
"asic_serial": asic_info.asic_serial.decode("utf-8"),
+10 -4
查看文件
@@ -672,15 +672,21 @@ amdsmi_get_gpu_asic_info(amdsmi_processor_handle processor_handle, amdsmi_asic_i
status = rsmi_wrapper(rsmi_dev_vendor_id_get, processor_handle,
&vendor_id);
if (status == AMDSMI_STATUS_SUCCESS) info->vendor_id = vendor_id;
status = rsmi_wrapper(rsmi_dev_subsystem_vendor_id_get, processor_handle,
&subvendor_id);
if (status == AMDSMI_STATUS_SUCCESS) info->subvendor_id = subvendor_id;
}
// For other sysfs related information, get from rocm-smi
status = rsmi_wrapper(rsmi_dev_subsystem_vendor_id_get, processor_handle,
&subvendor_id);
if (status == AMDSMI_STATUS_SUCCESS) info->subvendor_id = subvendor_id;
status = rsmi_wrapper(rsmi_dev_pcie_vendor_name_get, processor_handle,
info->vendor_name, AMDSMI_MAX_STRING_LENGTH);
// If vendor name is empty and the vendor id is 0x1002, set vendor name to AMD vendor string
if ((info->vendor_name != NULL && info->vendor_name[0] == '\0') && info->vendor_id == 0x1002) {
memset(info->vendor_name, 0, 38);
strncpy(info->vendor_name, "Advanced Micro Devices Inc. [AMD/ATI]", 37);
}
// default to 0xffff as not supported
info->oam_id = std::numeric_limits<uint16_t>::max();
status = rsmi_wrapper(rsmi_dev_oam_id_get, processor_handle,