forked from OSchip/llvm-project
[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
This commit is contained in:
parent
f6b66cbc7d
commit
f8b1f93f26
|
@ -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;
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue