[OpenMP] Remove macro guards for device debugging
The plugin currently uses a macro to check if this is a debug built
before assigning the debug kind variable to the device environment
struct. This is being deprecated because the new device runtime does not
maintain separate debug builds and should always be availible.
Reviewed By: tianshilei1992
Differential Revision: https://reviews.llvm.org/D112083
GitOrigin-RevId: b1ce4549307d776a045d09c9d30433757ec36981
diff --git a/libomptarget/plugins/amdgpu/src/rtl.cpp b/libomptarget/plugins/amdgpu/src/rtl.cpp
index 3c70bcd..cd9f029 100644
--- a/libomptarget/plugins/amdgpu/src/rtl.cpp
+++ b/libomptarget/plugins/amdgpu/src/rtl.cpp
@@ -1321,11 +1321,9 @@
host_device_env.DeviceNum = device_id;
host_device_env.DebugKind = 0;
host_device_env.DynamicMemSize = 0;
-#ifdef OMPTARGET_DEBUG
if (char *envStr = getenv("LIBOMPTARGET_DEVICE_RTL_DEBUG")) {
host_device_env.DebugKind = std::stoi(envStr);
}
-#endif
int rc = get_symbol_info_without_loading((char *)image->ImageStart,
img_size, sym(), &si);
diff --git a/libomptarget/plugins/cuda/src/rtl.cpp b/libomptarget/plugins/cuda/src/rtl.cpp
index 966c42a..90b6281 100644
--- a/libomptarget/plugins/cuda/src/rtl.cpp
+++ b/libomptarget/plugins/cuda/src/rtl.cpp
@@ -892,10 +892,8 @@
static_cast<uint32_t>(DeviceId),
static_cast<uint32_t>(DynamicMemorySize)};
-#ifdef OMPTARGET_DEBUG
if (const char *EnvStr = getenv("LIBOMPTARGET_DEVICE_RTL_DEBUG"))
DeviceEnv.DebugKind = std::stoi(EnvStr);
-#endif
const char *DeviceEnvName = "omptarget_device_environment";
CUdeviceptr DeviceEnvPtr;