diff options
author | Joseph Huber <jhuber6@vols.utk.edu> | 2022-09-01 12:26:26 -0500 |
---|---|---|
committer | Joseph Huber <jhuber6@vols.utk.edu> | 2022-09-01 12:40:59 -0500 |
commit | f8b1f93f268a16f994a1f33b5aca2a00f7d13ac2 (patch) | |
tree | 47c21b640ca322a032680a378db579b123ece74c /openmp | |
parent | f6b66cbc7df17c12ea2e5819705caf4e9e88747e (diff) | |
download | llvm-f8b1f93f268a16f994a1f33b5aca2a00f7d13ac2.zip llvm-f8b1f93f268a16f994a1f33b5aca2a00f7d13ac2.tar.gz llvm-f8b1f93f268a16f994a1f33b5aca2a00f7d13ac2.tar.bz2 |
[libomptarget] Enable the device allocator for AMDGPU
This patch adds support for the device memory type, this is currently equivalent
to the default type so it should be treated as the same.
Reviewed By: JonChesterfield
Differential Revision: https://reviews.llvm.org/D133128
Diffstat (limited to 'openmp')
-rw-r--r-- | openmp/libomptarget/plugins/amdgpu/src/rtl.cpp | 1 | ||||
-rw-r--r-- | openmp/libomptarget/test/api/omp_device_memory.c | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/openmp/libomptarget/plugins/amdgpu/src/rtl.cpp b/openmp/libomptarget/plugins/amdgpu/src/rtl.cpp index 7e042c5..4f4881f 100644 --- a/openmp/libomptarget/plugins/amdgpu/src/rtl.cpp +++ b/openmp/libomptarget/plugins/amdgpu/src/rtl.cpp @@ -2623,6 +2623,7 @@ void *__tgt_rtl_data_alloc(int DeviceId, int64_t Size, void *, int32_t Kind) { hsa_amd_memory_pool_t MemoryPool; switch (Kind) { case TARGET_ALLOC_DEFAULT: + case TARGET_ALLOC_DEVICE: // GPU memory MemoryPool = DeviceInfo().getDeviceMemoryPool(DeviceId); break; diff --git a/openmp/libomptarget/test/api/omp_device_memory.c b/openmp/libomptarget/test/api/omp_device_memory.c index 6bb02be..816ae35 100644 --- a/openmp/libomptarget/test/api/omp_device_memory.c +++ b/openmp/libomptarget/test/api/omp_device_memory.c @@ -1,5 +1,4 @@ -// RUN: %libomptarget-compile-run-and-check-nvptx64-nvidia-cuda -// REQUIRES: nvptx64-nvidia-cuda +// RUN: %libomptarget-compile-run-and-check-generic #include <omp.h> #include <stdio.h> |