diff --git a/openmp/libomptarget/DeviceRTL/src/Configuration.cpp b/openmp/libomptarget/DeviceRTL/src/Configuration.cpp --- a/openmp/libomptarget/DeviceRTL/src/Configuration.cpp +++ b/openmp/libomptarget/DeviceRTL/src/Configuration.cpp @@ -25,26 +25,25 @@ extern uint32_t __omp_rtl_assume_no_thread_state; extern uint32_t __omp_rtl_assume_no_nested_parallelism; -// TODO: We want to change the name as soon as the old runtime is gone. // This variable should be visibile to the plugin so we override the default // hidden visibility. -DeviceEnvironmentTy CONSTANT(omptarget_device_environment) +DeviceEnvironmentTy CONSTANT(__omp_rtl_device_environment) __attribute__((used, retain, weak, visibility("protected"))); uint32_t config::getDebugKind() { - return __omp_rtl_debug_kind & omptarget_device_environment.DebugKind; + return __omp_rtl_debug_kind & __omp_rtl_device_environment.DebugKind; } uint32_t config::getNumDevices() { - return omptarget_device_environment.NumDevices; + return __omp_rtl_device_environment.NumDevices; } uint32_t config::getDeviceNum() { - return omptarget_device_environment.DeviceNum; + return __omp_rtl_device_environment.DeviceNum; } uint64_t config::getDynamicMemorySize() { - return omptarget_device_environment.DynamicMemSize; + return __omp_rtl_device_environment.DynamicMemSize; } bool config::isDebugMode(config::DebugKind Kind) { diff --git a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp --- a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp +++ b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp @@ -263,7 +263,7 @@ DeviceEnvironment.DynamicMemSize = OMPX_SharedMemorySize; // Create the metainfo of the device environment global. - GlobalTy DevEnvGlobal("omptarget_device_environment", + GlobalTy DevEnvGlobal("__omp_rtl_device_environment", sizeof(DeviceEnvironmentTy), &DeviceEnvironment); // Write device environment values to the device. 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 @@ -1708,7 +1708,7 @@ // If the symbol is in .data (aomp, rocm) it can be written directly. // If it is in .bss, we must wait for it to be allocated space on the // gpu (trunk) and initialize after loading. - const char *sym() { return "omptarget_device_environment"; } + const char *sym() { return "__omp_rtl_device_environment"; } DeviceEnvironmentTy HostDeviceEnv; SymbolInfo SI; @@ -2102,7 +2102,7 @@ // per-image initialization work. Specifically: // // - Initialize an DeviceEnvironmentTy instance embedded in the - // image at the symbol "omptarget_device_environment" + // image at the symbol "__omp_rtl_device_environment" // Fields DebugKind, DeviceNum, NumDevices. Used by the deviceRTL. // // - Allocate a large array per-gpu (could be moved to init_device) 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 @@ -932,7 +932,7 @@ if (const char *EnvStr = getenv("LIBOMPTARGET_DEVICE_RTL_DEBUG")) DeviceEnv.DebugKind = std::stoi(EnvStr); - const char *DeviceEnvName = "omptarget_device_environment"; + const char *DeviceEnvName = "__omp_rtl_device_environment"; CUdeviceptr DeviceEnvPtr; size_t CUSize;