[Openmp-commits] [PATCH] D116963: [openmp][amdgpu] Replace unsigned long with uint64_t
Jon Chesterfield via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Mon Jan 10 14:19:45 PST 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa74826d30a2e: [openmp][amdgpu] Replace unsigned long with uint64_t (authored by JonChesterfield).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116963/new/
https://reviews.llvm.org/D116963
Files:
openmp/libomptarget/plugins/amdgpu/impl/internal.h
openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
Index: openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
===================================================================
--- openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
+++ 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 "
Index: openmp/libomptarget/plugins/amdgpu/impl/internal.h
===================================================================
--- openmp/libomptarget/plugins/amdgpu/impl/internal.h
+++ 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, "");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116963.398739.patch
Type: text/x-patch
Size: 2633 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20220110/4866fb95/attachment.bin>
More information about the Openmp-commits
mailing list