[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:
Joseph Huber 2022-09-01 12:26:26 -05:00
parent f6b66cbc7d
commit f8b1f93f26
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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>