Changeset View
Changeset View
Standalone View
Standalone View
openmp/libomptarget/DeviceRTL/src/Configuration.cpp
Show All 14 Lines | |||||
#include "DeviceEnvironment.h" | #include "DeviceEnvironment.h" | ||||
#include "State.h" | #include "State.h" | ||||
#include "Types.h" | #include "Types.h" | ||||
using namespace _OMP; | using namespace _OMP; | ||||
#pragma omp declare target | #pragma omp declare target | ||||
extern uint32_t __omp_rtl_debug_kind; | extern uint32_t __omp_rtl_debug_kind; // defined by CGOpenMPRuntimeGPU | ||||
JonChesterfield: Otherwise the missing symbols prevents linking, not clear why it works on nvptx64 | |||||
Not Done ReplyInline Actionslinking what? Clang emits the symbol, maybe just not for amdgpu. jdoerfert: linking what? Clang emits the symbol, maybe just not for amdgpu. | |||||
Where? The only reference I can find to it is here, and it's marked extern. JonChesterfield: Where? The only reference I can find to it is here, and it's marked extern. | |||||
I think the cuda toolchain treats unresolved references as 'just use zero', in which case deleting this is a no-op on nvptx. Maybe it's intended to be patched by cuda rtl.cpp in the future? If so can reintroduce it then JonChesterfield: I think the cuda toolchain treats unresolved references as 'just use zero', in which case… | |||||
// TOOD: We want to change the name as soon as the old runtime is gone. | // TODO: We want to change the name as soon as the old runtime is gone. | ||||
DeviceEnvironmentTy CONSTANT(omptarget_device_environment) | DeviceEnvironmentTy CONSTANT(omptarget_device_environment) | ||||
__attribute__((used)); | __attribute__((used)); | ||||
uint32_t config::getDebugKind() { | uint32_t config::getDebugKind() { | ||||
return __omp_rtl_debug_kind & omptarget_device_environment.DebugKind; | return __omp_rtl_debug_kind & omptarget_device_environment.DebugKind; | ||||
} | } | ||||
uint32_t config::getNumDevices() { | uint32_t config::getNumDevices() { | ||||
Show All 16 Lines |
Otherwise the missing symbols prevents linking, not clear why it works on nvptx64