From f79a03026c7a2bf3dc70ce9842f6737bc96fc687 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 --- rocclr/hip_global.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rocclr/hip_global.cpp b/rocclr/hip_global.cpp index 46e6efcf52..7919a824f2 100755 --- a/rocclr/hip_global.cpp +++ b/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);