SWDEV-464927 - Update the Get by PCI BusId logic and Hop count

- Update the intra socket weight for partitions within single socket as
it is changed to 13 by the driver.
- Use the PCIe function to distinguish the partitions of the same device
such as TPX mode in gfx942.

Change-Id: I8e64023d44e37c2dbb105cbb343441a48021ba7b
This commit is contained in:
Satyanvesh Dittakavi
2024-06-06 08:34:09 +00:00
parent 8f42ad6aa3
commit 1815fc808d
2 changed files with 8 additions and 4 deletions
+1 -1
View File
@@ -3356,7 +3356,7 @@ bool Device::findLinkInfo(const hsa_amd_memory_pool_t& pool,
distance += link_info[hop_idx].numa_distance;
}
uint32_t oneHopDistance
= (link_info[0].link_type == HSA_AMD_LINK_INFO_TYPE_XGMI) ? 15 : 20;
= (link_info[0].link_type == HSA_AMD_LINK_INFO_TYPE_XGMI) ? 13 : 20;
link_attr.second = static_cast<int32_t>(distance/oneHopDistance);
break;
}