From f8d85593283bb1aaf63850bd77b6f0cc82fd8d4a Mon Sep 17 00:00:00 2001
From: foreman
Date: Fri, 10 May 2019 19:19:11 -0400
Subject: [PATCH] P4 to Git Change 1781540 by kpyzhov@hip-vdi-pal-win on
2019/05/10 17:10:30
SWDEV-188234 - Corrected reading binary module file in hipModuleLoad().
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/hip/hip_module.cpp#26 edit
---
hipamd/api/hip/hip_module.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hipamd/api/hip/hip_module.cpp b/hipamd/api/hip/hip_module.cpp
index 58fa5e3680..3837a35daf 100644
--- a/hipamd/api/hip/hip_module.cpp
+++ b/hipamd/api/hip/hip_module.cpp
@@ -59,7 +59,7 @@ hipError_t hipModuleLoad(hipModule_t *module, const char *fname)
HIP_RETURN(hipErrorInvalidValue);
}
- std::ifstream file{fname};
+ std::ifstream file(fname, std::ios::binary);
if (!file.is_open()) {
HIP_RETURN(hipErrorFileNotFound);