SWDEV-250005 - Fixing error code propagation to HIP outer layer.

Change-Id: I0c0e87dbace0b1182f24411200abdfd9cab3f865
这个提交包含在:
kjayapra-amd
2020-10-20 09:43:06 -04:00
父节点 0af33580e6
当前提交 f79a03026c
+6 -6
查看文件
@@ -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);