Fix hipDeviceGetByPCIBusId
SWDEV-260845 Change-Id: I2d6db15906d794c9ebfa85b745a2c1bbb6f3e731
Этот коммит содержится в:
@@ -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;
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user