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

Change-Id: I932724cc872d7ae2643ce6ac2924901cb49cd7ad
Bu işleme şunda yer alıyor:
kjayapra-amd authored and Karthik Jayaprakash committed 2024-04-16 07:28:48 -04:00
1 ebeveyn ca07f59fb1
işleme a1e0970d6d
1 file changed
+6 -1
+6 -1
Dosyayı Görüntüle
@@ -541,7 +541,12 @@ hipError_t hipDeviceGetPCIBusId(char* pciBusId, int len, int device) {
hipDeviceProp_tR0600 prop;
HIP_RETURN_ONFAIL(ihipGetDeviceProperties(&prop, device));
snprintf(pciBusId, len, "%04x:%02x:%02x.0", prop.pciDomainID, prop.pciBusID, prop.pciDeviceID);
auto* deviceHandle = g_devices[device]->devices()[0];
snprintf (pciBusId, len, "%04x:%02x:%02x.%01x",
prop.pciDomainID,
prop.pciBusID,
prop.pciDeviceID,
deviceHandle->info().deviceTopology_.pcie.function);
HIP_RETURN(len <= 12 ? hipErrorInvalidValue : hipSuccess);
}