SWDEV-260845

Change-Id: I2d6db15906d794c9ebfa85b745a2c1bbb6f3e731
Этот коммит содержится в:
Rahul Garg
2020-11-16 23:28:52 +00:00
родитель 10f4918d97
Коммит d11027c522
+4 -3
Просмотреть файл
@@ -337,12 +337,13 @@ hipError_t hipDeviceGetByPCIBusId(int* device, const char*pciBusIdstr) {
int count = 0;
ihipDeviceGetCount(&count);
for (cl_int i = 0; i < count; i++) {
int pi = 0;
hipDevice_t dev;
hipDeviceGet(&dev, i);
hipDeviceGetAttribute(&pi, hipDeviceAttributePciBusId, dev);
hipDeviceProp_t prop;
hipGetDeviceProperties(&prop, dev);
if (pciBusID == pi) {
if ((pciBusID == prop.pciBusID) && (pciDomainID == prop.pciDomainID)
&& (pciDeviceID == prop.pciDeviceID)) {
*device = i;
break;
}