[Libomptarget] Add basic support for dynamic shared memory on AMDGPU
authorJoseph Huber <jhuber6@vols.utk.edu>
Mon, 9 May 2022 18:26:01 +0000 (14:26 -0400)
committerJoseph Huber <jhuber6@vols.utk.edu>
Wed, 1 Jun 2022 17:32:50 +0000 (13:32 -0400)
commitf4f23de1a46f94762b8192e82f20fb86b41c339f
tree6e03138f82afe262332cb7073f311a8907b3c9fa
parent716d428ab525121db6c5574b62923d49ea5191ed
[Libomptarget] Add basic support for dynamic shared memory on AMDGPU

This patchs adds the arguments necessary to allocate the size of the
dynamic shared memory via the `LIBOMPTARGET_SHARED_MEMORY_SIZE`
environment variable. This patch only allocates the memory, AMDGPU has a
limitation that shared memory can only be accessed from the kernel
directly. So this will currently only work with optimizations to inline
the accessor function.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D125252
openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
openmp/libomptarget/test/api/omp_dynamic_shared_memory_amdgpu.c [new file with mode: 0644]