From 16b7ecf4ecef82da969ae28ce3a958afba300b4b Mon Sep 17 00:00:00 2001 From: kjayapra-amd Date: Tue, 20 Oct 2020 09:43:06 -0400 Subject: [PATCH] SWDEV-250005 - Fixing error code propagation to HIP outer layer. Change-Id: I0c0e87dbace0b1182f24411200abdfd9cab3f865 [ROCm/clr commit: c18a791c80c2e9342a3380b6eb473cc81618cb94] --- projects/clr/hipamd/rocclr/hip_global.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/projects/clr/hipamd/rocclr/hip_global.cpp b/projects/clr/hipamd/rocclr/hip_global.cpp index 46e6efcf52..7919a824f2 100755 --- a/projects/clr/hipamd/rocclr/hip_global.cpp +++ b/projects/clr/hipamd/rocclr/hip_global.cpp @@ -110,8 +110,8 @@ hipError_t Function::getStatFunc(hipFunction_t* hfunc, int deviceId) { guarantee(modules_ != nullptr && "Module not initialized"); hipModule_t hmod = nullptr; - (*modules_)->BuildProgram(deviceId); - (*modules_)->GetModule(deviceId, &hmod); + IHIP_RETURN_ONFAIL((*modules_)->BuildProgram(deviceId)); + IHIP_RETURN_ONFAIL((*modules_)->GetModule(deviceId, &hmod)); if (dFunc_[deviceId] == nullptr) { dFunc_[deviceId] = new DeviceFunc(name_, hmod); @@ -125,8 +125,8 @@ hipError_t Function::getStatFuncAttr(hipFuncAttributes* func_attr, int deviceId) guarantee((modules_ != nullptr) && "Module not initialized"); hipModule_t hmod = nullptr; - (*modules_)->BuildProgram(deviceId); - (*modules_)->GetModule(deviceId, &hmod); + IHIP_RETURN_ONFAIL((*modules_)->BuildProgram(deviceId)); + IHIP_RETURN_ONFAIL((*modules_)->GetModule(deviceId, &hmod)); if (dFunc_[deviceId] == nullptr) { dFunc_[deviceId] = new DeviceFunc(name_, hmod); @@ -188,8 +188,8 @@ hipError_t Var::getStatDeviceVar(DeviceVar** dvar, int deviceId) { && "Invalid DeviceId, greater than no of code objects"); hipModule_t hmod = nullptr; - (*modules_)->BuildProgram(deviceId); - (*modules_)->GetModule(deviceId, &hmod); + IHIP_RETURN_ONFAIL((*modules_)->BuildProgram(deviceId)); + IHIP_RETURN_ONFAIL((*modules_)->GetModule(deviceId, &hmod)); if (dVar_[deviceId] == nullptr) { dVar_[deviceId] = new DeviceVar(name_, hmod);