SWDEV-422580 - Adding pcie.function to the PCI address string in hipGetDevicePCIBusId.

Change-Id: Iaa73b6028ac7b1d05cc310405d6fe622d764320f


[ROCm/clr commit: 369fdc4d87]
Bu işleme şunda yer alıyor:
kjayapra-amd authored and Karthik Jayaprakash committed 2023-09-21 12:22:05 -04:00
1 ebeveyn 5d160eb7ee
işleme 142492d9eb
1 file changed
+4 -2
+4 -2
Dosyayı Görüntüle
@@ -443,10 +443,12 @@ hipError_t hipDeviceGetPCIBusId ( char* pciBusId, int len, int device ) {
hipDeviceProp_t prop;
HIP_RETURN_ONFAIL(ihipGetDeviceProperties(&prop, device));
snprintf (pciBusId, len, "%04x:%02x:%02x.0",
auto* deviceHandle = g_devices[device]->devices()[0];
snprintf (pciBusId, len, "%04x:%02x:%02x.%01x",
prop.pciDomainID,
prop.pciBusID,
prop.pciDeviceID);
prop.pciDeviceID,
deviceHandle->info().deviceTopology_.pcie.function);
HIP_RETURN(len <= 12 ? hipErrorInvalidValue : hipSuccess);
}