[Openmp-commits] [openmp] a1df13e - Fix test case which is not working for AMDGPU.
Jennifer Yu via Openmp-commits
openmp-commits at lists.llvm.org
Mon Sep 19 17:11:12 PDT 2022
Author: Jennifer Yu
Date: 2022-09-19T17:07:01-07:00
New Revision: a1df13ecd6a5a70803dc134fc4f9e006bb233a58
URL: https://github.com/llvm/llvm-project/commit/a1df13ecd6a5a70803dc134fc4f9e006bb233a58
DIFF: https://github.com/llvm/llvm-project/commit/a1df13ecd6a5a70803dc134fc4f9e006bb233a58.diff
LOG: Fix test case which is not working for AMDGPU.
This is for the change of
Differential Revision: https://reviews.llvm.org/D134186
Added:
Modified:
openmp/libomptarget/test/mapping/target_has_device_addr.c
Removed:
################################################################################
diff --git a/openmp/libomptarget/test/mapping/target_has_device_addr.c b/openmp/libomptarget/test/mapping/target_has_device_addr.c
index 8d206167b5d5..dcb8f26b6248 100644
--- a/openmp/libomptarget/test/mapping/target_has_device_addr.c
+++ b/openmp/libomptarget/test/mapping/target_has_device_addr.c
@@ -11,8 +11,9 @@
#define LENGTH 128
void foo() {
+ const int device_id = omp_get_default_device();
float *A;
-#pragma omp allocate(A) allocator(llvm_omp_target_shared_mem_alloc)
+ A = (float *)omp_target_alloc(sizeof(float), device_id);
float *A_dev = NULL;
#pragma omp target has_device_addr(A [FROM:LENGTH]) map(A_dev)
More information about the Openmp-commits
mailing list