diff --git a/projects/clr/hipamd/src/hip_fatbin.cpp b/projects/clr/hipamd/src/hip_fatbin.cpp index af7542c4c8..bcc45f5184 100644 --- a/projects/clr/hipamd/src/hip_fatbin.cpp +++ b/projects/clr/hipamd/src/hip_fatbin.cpp @@ -196,7 +196,7 @@ hipError_t FatBinaryInfo::ExtractFatBinaryUsingCOMGR(const std::vectorsecond.first == 0) { - LogPrintfError("Cannot find CO in the bundle for ISA: %s \n", device_name); + LogPrintfError("Cannot find CO in the bundle for ISA: %s \n", device_name.c_str()); hip_status = hipErrorNoBinaryForGpu; ListAllDeviceWithNoCOFromBundle(unique_isa_names); break; diff --git a/projects/clr/hipamd/src/hip_global.cpp b/projects/clr/hipamd/src/hip_global.cpp index 1042e1cdfa..b11097a278 100644 --- a/projects/clr/hipamd/src/hip_global.cpp +++ b/projects/clr/hipamd/src/hip_global.cpp @@ -128,6 +128,10 @@ hipError_t Function::getDynFunc(hipFunction_t* hfunc, hipModule_t hmod) { hipError_t Function::getStatFunc(hipFunction_t* hfunc, int deviceId) { guarantee(modules_ != nullptr, "Module not initialized"); + if (dFunc_.size() != g_devices.size()) { + return hipErrorSharedObjectInitFailed; + } + hipModule_t hmod = nullptr; IHIP_RETURN_ONFAIL((*modules_)->BuildProgram(deviceId)); IHIP_RETURN_ONFAIL((*modules_)->GetModule(deviceId, &hmod));