diff --git a/openmp/libomptarget/plugins/amdgpu/impl/internal.h b/openmp/libomptarget/plugins/amdgpu/impl/internal.h --- a/openmp/libomptarget/plugins/amdgpu/impl/internal.h +++ b/openmp/libomptarget/plugins/amdgpu/impl/internal.h @@ -34,13 +34,13 @@ #define MAX_NUM_KERNELS (1024 * 16) typedef struct impl_implicit_args_s { - unsigned long offset_x; - unsigned long offset_y; - unsigned long offset_z; - unsigned long hostcall_ptr; - unsigned long unused0; - unsigned long unused1; - unsigned long unused2; + uint64_t offset_x; + uint64_t offset_y; + uint64_t offset_z; + uint64_t hostcall_ptr; + uint64_t unused0; + uint64_t unused1; + uint64_t unused2; } impl_implicit_args_t; static_assert(sizeof(impl_implicit_args_t) == 56, ""); 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 @@ -43,8 +43,8 @@ // linked as --whole-archive to override the weak symbols that are used to // implement a fallback for toolchains that do not yet have a hostrpc library. extern "C" { -unsigned long hostrpc_assign_buffer(hsa_agent_t agent, hsa_queue_t *this_Q, - uint32_t device_id); +uint64_t hostrpc_assign_buffer(hsa_agent_t agent, hsa_queue_t *this_Q, + uint32_t device_id); hsa_status_t hostrpc_init(); hsa_status_t hostrpc_terminate(); @@ -52,8 +52,8 @@ __attribute__((weak)) hsa_status_t hostrpc_terminate() { return HSA_STATUS_SUCCESS; } -__attribute__((weak)) unsigned long -hostrpc_assign_buffer(hsa_agent_t, hsa_queue_t *, uint32_t device_id) { +__attribute__((weak)) uint64_t hostrpc_assign_buffer(hsa_agent_t, hsa_queue_t *, + uint32_t device_id) { DP("Warning: Attempting to assign hostrpc to device %u, but hostrpc library " "missing\n", device_id); @@ -1231,8 +1231,8 @@ // under a multiple reader lock, not a writer lock. static pthread_mutex_t hostcall_init_lock = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&hostcall_init_lock); - unsigned long buffer = hostrpc_assign_buffer( - DeviceInfo.HSAAgents[device_id], queue, device_id); + uint64_t buffer = hostrpc_assign_buffer(DeviceInfo.HSAAgents[device_id], + queue, device_id); pthread_mutex_unlock(&hostcall_init_lock); if (!buffer) { DP("hostrpc_assign_buffer failed, gpu would dereference null and "