[Libmoptarget] Enable the shared allocator for AMDGPU
authorJoseph Huber <jhuber6@vols.utk.edu>
Fri, 10 Feb 2023 19:13:21 +0000 (13:13 -0600)
committerJoseph Huber <jhuber6@vols.utk.edu>
Mon, 20 Feb 2023 14:44:08 +0000 (08:44 -0600)
commit5216a9bfb002705fcaee7a078cbbb538e806eea1
treea84c131293ed3b0f176e2bba4a1713f4ee399725
parentfa1eb2eb1606de47f29261e1b5ae43a2db13ef7d
[Libmoptarget] Enable the shared allocator for AMDGPU

Currently, the AMDGPU plugin did not support the `TARGET_ALLOC_SHARED`
allocation kind. We used the fine-grained memory allocator for the
"host" alloc when this is most likely not what is intended. Fine-grained
memory can be accessed by all agents, so it should be considered shared.
This patch removes the use of fine-grained memory for the host
allocator. A later patch will add support for this via the
`hsa_amd_memory_lock` method.

Reviewed By: kevinsala

Differential Revision: https://reviews.llvm.org/D143771
openmp/libomptarget/plugins-nextgen/amdgpu/src/rtl.cpp
openmp/libomptarget/test/api/omp_device_managed_memory.c
openmp/libomptarget/test/api/omp_host_pinned_memory.c
openmp/libomptarget/test/api/omp_host_pinned_memory_alloc.c