Change to use hipDeviceGetPCIBusId api for hipEnvVarDriver test

[ROCm/hip commit: ed0d6cf745]
This commit is contained in:
sunway513
2017-07-27 17:41:49 +00:00
vanhempi d8d3016e88
commit 014f1797d9
2 muutettua tiedostoa jossa 27 lisäystä ja 30 poistoa
+7 -8
Näytä tiedosto
@@ -109,15 +109,14 @@ int main(int argc, char **argv)
std::cout << devCount << std::endl;
}
if (retDevInfo) {
hipSetDevice(device);
hipDeviceProp_t devProp;
hipDevice_t deviceT;
hipDeviceGet(&deviceT, device);
hipGetDeviceProperties(&devProp, device);
if (devProp.major < 1) {
printf("%d does not support HIP\n", device);
return -1;
}
std::cout << devProp.pciBusID << std::endl;
char pciBusId[100];
memset(pciBusId,0,100);
hipDeviceGetPCIBusId(pciBusId,100,deviceT);
cout<<pciBusId<<endl;
}
exit(0);
}