diff --git a/openmp/libomptarget/plugins/amdgpu/src/rtl.cpp b/openmp/libomptarget/plugins/amdgpu/src/rtl.cpp --- a/openmp/libomptarget/plugins/amdgpu/src/rtl.cpp +++ b/openmp/libomptarget/plugins/amdgpu/src/rtl.cpp @@ -958,8 +958,7 @@ if (rc != 0) { DP("Finding global device environment '%s' - symbol missing.\n", device_env_Name); - // no need to return FAIL, consider this is a not a device debug build. - return ATMI_STATUS_SUCCESS; + return ATMI_STATUS_ERROR; } if (si.size != sizeof(host_device_env)) { return ATMI_STATUS_ERROR; @@ -1252,10 +1251,8 @@ return NULL; } } else { - DP("Loading global exec_mode '%s' - symbol missing, using default " - "value " - "GENERIC (1)\n", - ExecModeName); + DP("Loading global exec_mode '%s' - symbol missing\n", ExecModeName); + return NULL; } check("Loading computation property", err); diff --git a/openmp/libomptarget/plugins/cuda/src/rtl.cpp b/openmp/libomptarget/plugins/cuda/src/rtl.cpp --- a/openmp/libomptarget/plugins/cuda/src/rtl.cpp +++ b/openmp/libomptarget/plugins/cuda/src/rtl.cpp @@ -663,10 +663,9 @@ return nullptr; } } else { - DP("Loading global exec_mode '%s' - symbol missing, using default " - "value GENERIC (1)\n", - ExecModeName); + DP("Loading global exec_mode '%s' - symbol missing\n", ExecModeName); CUDA_ERR_STRING(Err); + return nullptr; } KernelsList.emplace_back(Func, ExecModeVal); @@ -711,8 +710,7 @@ } else { DP("Finding global device environment '%s' - symbol missing.\n", DeviceEnvName); - DP("Continue, considering this is a device RTL which does not accept " - "environment setting.\n"); + return nullptr; } }