[SWDEV-535739] Align RDC with amdsmi 26.0 (#191)

* Align RDC with amdsmi 26.0.0
* Remove RDCI_IOLINK_TYPE_NUMIOLINKTYPES

---------

Signed-off-by: adapryor <Adam.pryor@amd.com>
Change-Id: Ib7f2a22bd9544e0bf74afb1ed8d8f8b79b129b1a
Этот коммит содержится в:
Pryor, Adam
2025-06-02 18:27:19 -05:00
коммит произвёл GitHub
родитель 16e31aae65
Коммит cc7ccf507a
5 изменённых файлов: 9 добавлений и 14 удалений
-2
Просмотреть файл
@@ -735,7 +735,6 @@ message TopologyLinkInfo{
RDC_IOLINK_TYPE_UNDEFINED = 0;
RDC_IOLINK_TYPE_PCIEXPRESS = 1;
RDC_IOLINK_TYPE_XGMI = 2;
RDCI_IOLINK_TYPE_NUMIOLINKTYPES = 3;
};
LinkType link_type = 6;
bool p2p_accessible = 7;
@@ -762,7 +761,6 @@ message GpuLinkStatus{
RDC_IOLINK_TYPE_UNDEFINED = 0;
RDC_IOLINK_TYPE_PCIEXPRESS = 1;
RDC_IOLINK_TYPE_XGMI = 2;
RDCI_IOLINK_TYPE_NUMIOLINKTYPES = 3;
};
LinkTypes link_types = 3;
enum LinkState{
+1 -1
Просмотреть файл
@@ -212,7 +212,7 @@ rdc_status_t RdcEmbeddedHandler::rdc_device_get_component_version(
if (component == RDC_AMDSMI_COMPONENT) {
amdsmi_status_t ret;
amdsmi_version_t ver = {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, nullptr};
amdsmi_version_t ver = {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, nullptr};
ret = amdsmi_get_lib_version(&ver);
+4 -6
Просмотреть файл
@@ -81,7 +81,6 @@ rdc_status_t RdcSmiDiagnosticImpl::check_smi_process_info(uint32_t gpu_index[RDC
// will not clear /proc sys file until the process is terminated.
if (procs[i].cu_occupancy == 0) continue;
info += " Process: " + std::to_string(procs[i].process_id) +=
", pasid: " + std::to_string(procs[i].pasid) +=
", vram_usage: " + std::to_string(procs[i].vram_usage) +=
", sdma_usage: " + std::to_string(procs[i].sdma_usage) +=
", cu_occupancy: " + std::to_string(procs[i].cu_occupancy) += ".";
@@ -183,11 +182,10 @@ rdc_status_t RdcSmiDiagnosticImpl::check_smi_topo_info(uint32_t gpu_index[RDC_MA
*result = {};
result->test_case = RDC_DIAG_NODE_TOPOLOGY;
const std::map<amdsmi_io_link_type_t, std::string> link_to_string = {
{AMDSMI_IOLINK_TYPE_UNDEFINED, "Undefined"},
{AMDSMI_IOLINK_TYPE_PCIEXPRESS, "PCI Express"},
{AMDSMI_IOLINK_TYPE_XGMI, "XGMI"},
{AMDSMI_IOLINK_TYPE_NUMIOLINKTYPES, "IO Link"}};
const std::map<amdsmi_link_type_t, std::string> link_to_string = {
{AMDSMI_LINK_TYPE_UNKNOWN, "Undefined"},
{AMDSMI_LINK_TYPE_PCIE, "PCI Express"},
{AMDSMI_LINK_TYPE_XGMI, "XGMI"}};
result->status = RDC_DIAG_RESULT_SKIP;
result->per_gpu_result_count = 0;
+1 -1
Просмотреть файл
@@ -114,7 +114,7 @@ rdc_status_t RdcTopologyLinkImpl::rdc_device_topology_get(uint32_t gpu_index,
}
uint64_t hops = std::numeric_limits<uint64_t>::max();
amdsmi_io_link_type_t type = AMDSMI_IOLINK_TYPE_UNDEFINED;
amdsmi_link_type_t type = AMDSMI_LINK_TYPE_UNKNOWN;
err = amdsmi_topo_get_link_type(ph.first, ph.second, &hops, &type);
if (err != AMDSMI_STATUS_SUCCESS) {
RDC_LOG(RDC_INFO, "Fail to get process GPUs hops and type information: " << err);
+3 -4
Просмотреть файл
@@ -85,7 +85,6 @@ void RdciTopologyLinkSubSystem::show_help() const {
static const char* topology_link_type_to_str(rdc_topology_link_type_t type) {
if (type == RDC_IOLINK_TYPE_PCIEXPRESS) return "Connected via PCIe \t";
if (type == RDC_IOLINK_TYPE_XGMI) return "Connected via XGMI \t";
if (type == RDCI_IOLINK_TYPE_NUMIOLINKTYPES) return "Number of IO Link types";
return "N/A \t\t\t";
}
@@ -98,8 +97,8 @@ void RdciTopologyLinkSubSystem::process() {
throw RdcException(result, "Error to find devices on the system.");
}
if (group_index_ >= count) {
throw RdcException(result,
"Fail to get " + std::to_string(group_index_) + " to the topology gpu index");
throw RdcException(
result, "Fail to get " + std::to_string(group_index_) + " to the topology gpu index");
}
switch (topology_ops_) {
case TOPOLOGY_INDEX: {
@@ -135,4 +134,4 @@ void RdciTopologyLinkSubSystem::process() {
}
}
} // namespace rdc
} // namespace amd
} // namespace amd