Change to use hipDeviceGetPCIBusId api for hipEnvVarDriver test

[ROCm/clr commit: b7c34fb80f]
This commit is contained in:
sunway513 committed 2017-07-27 17:41:49 +00:00
1 parent 3015b8a12d
commit 67afe0ec04
2 files changed
+27 -30

No files matched your search

+7 -8
View File
@@ -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);
}