fix file-not-found detection
Change-Id: Ida84923ed18b3ebf8ffcfd6ee84d8a72f611ecd3
This commit is contained in:
+2
-2
@@ -118,10 +118,10 @@ hipError_t hipModuleLoad(hipModule_t *module, const char *fname){
|
||||
ihipDevice_t *currentDevice = ihipGetDevice(deviceId);
|
||||
std::ifstream in(fname, std::ios::binary | std::ios::ate);
|
||||
|
||||
if(!in){
|
||||
if(!in.is_open() ){
|
||||
return ihipLogStatus(hipErrorFileNotFound);
|
||||
|
||||
}else{
|
||||
} else {
|
||||
|
||||
*module = new ihipModule_t;
|
||||
size_t size = std::string::size_type(in.tellg());
|
||||
|
||||
Reference in New Issue
Block a user