SWDEV-422580 - Adding back the pcie.function to PCI address string in hipGetDevicePCIBusId.
Change-Id: I932724cc872d7ae2643ce6ac2924901cb49cd7ad
This commit is contained in:
کامیت شده توسط
Karthik Jayaprakash
والد
ca07f59fb1
کامیت
a1e0970d6d
@@ -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);
|
||||
}
|
||||
|
||||
مرجع در شماره جدید
Block a user