From 5e91bee221c89d80df2f4bdef844836a30640e06 Mon Sep 17 00:00:00 2001 From: kjayapra-amd Date: Wed, 6 May 2020 14:22:03 -0400 Subject: [PATCH] SWDEV-232464 - Need to initialize image with ptr passed since they can pass image not of type __ClangOffloadBundler. Change-Id: I2c50042220a0230bc445ed21728f114a229c53e1 --- rocclr/hip_module.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rocclr/hip_module.cpp b/rocclr/hip_module.cpp index a09ac63c3c..db39b234b4 100755 --- a/rocclr/hip_module.cpp +++ b/rocclr/hip_module.cpp @@ -217,7 +217,8 @@ inline bool ihipModuleRegisterGlobal(amd::Program* program, hipModule_t* module) hipError_t ihipModuleLoadData(hipModule_t* module, const void* mmap_ptr, size_t mmap_size) { - const void* image = nullptr; + /* initialize image it to the mmap_ptr, if this is of no_clang_offload bundle then they directly pass the image */ + const void* image = mmap_ptr; std::vector> code_objs; hipError_t code_obj_err = __hipExtractCodeObjectFromFatBinary(mmap_ptr, {hip::getCurrentDevice()->devices()[0]->info().name_}, code_objs);