Fix for SWDEV-239415 to handle hipGetDevice properly while no GPU present

Change-Id: I252cbbf9a89fc76fe1be1fbb8f45778e96c70fb2
이 커밋은 다음에 포함됨:
jujiang가 2020-06-10 14:18:56 -04:00를 커밋했습니다
1 부모 9ff22151d2
커밋 bb32492438
1 파일이 변경됨
+5 -1
+5 -1
파일 보기
@@ -449,7 +449,11 @@ hipError_t hipDeviceSynchronize ( void ) {
}
int ihipGetDevice() {
return hip::getCurrentDevice()->deviceId();
hip::Device* device = hip::getCurrentDevice();
if(device == nullptr){
return -1;
}
return device->deviceId();
}
hipError_t hipGetDevice ( int* deviceId ) {