[Openmp-commits] [openmp] ae845d6 - [AMDGPU][OpenMP] Enable Libomptarget runtime tests
Pushpinder Singh via Openmp-commits
openmp-commits at lists.llvm.org
Sun May 2 22:56:53 PDT 2021
Author: Pushpinder Singh
Date: 2021-05-03T05:56:42Z
New Revision: ae845d64269193189c0347454255afa70824e17a
URL: https://github.com/llvm/llvm-project/commit/ae845d64269193189c0347454255afa70824e17a
DIFF: https://github.com/llvm/llvm-project/commit/ae845d64269193189c0347454255afa70824e17a.diff
LOG: [AMDGPU][OpenMP] Enable Libomptarget runtime tests
This enables the runtime tests on amdgpu targets.
10 tests have been marked as XFAIL on amdgcn currently mostly due to
missing printf.
Reviewed By: protze.joachim
Differential Revision: https://reviews.llvm.org/D99656
Added:
Modified:
openmp/libomptarget/CMakeLists.txt
openmp/libomptarget/test/mapping/data_member_ref.cpp
openmp/libomptarget/test/mapping/declare_mapper_nested_default_mappers.cpp
openmp/libomptarget/test/mapping/declare_mapper_nested_mappers.cpp
openmp/libomptarget/test/mapping/delete_inf_refcount.c
openmp/libomptarget/test/mapping/ptr_and_obj_motion.c
openmp/libomptarget/test/offloading/host_as_target.c
openmp/libomptarget/test/unified_shared_memory/api.c
openmp/libomptarget/test/unified_shared_memory/close_enter_exit.c
openmp/libomptarget/test/unified_shared_memory/close_modifier.c
openmp/libomptarget/test/unified_shared_memory/shared_update.c
Removed:
################################################################################
diff --git a/openmp/libomptarget/CMakeLists.txt b/openmp/libomptarget/CMakeLists.txt
index ec4f87e025d1e..6e7ecdc152529 100644
--- a/openmp/libomptarget/CMakeLists.txt
+++ b/openmp/libomptarget/CMakeLists.txt
@@ -37,6 +37,7 @@ endif()
# This is a list of all the targets that are supported/tested right now.
set (LIBOMPTARGET_ALL_TARGETS "${LIBOMPTARGET_ALL_TARGETS} aarch64-unknown-linux-gnu")
+set (LIBOMPTARGET_ALL_TARGETS "${LIBOMPTARGET_ALL_TARGETS} amdgcn-amd-amdhsa")
set (LIBOMPTARGET_ALL_TARGETS "${LIBOMPTARGET_ALL_TARGETS} powerpc64le-ibm-linux-gnu")
set (LIBOMPTARGET_ALL_TARGETS "${LIBOMPTARGET_ALL_TARGETS} powerpc64-ibm-linux-gnu")
set (LIBOMPTARGET_ALL_TARGETS "${LIBOMPTARGET_ALL_TARGETS} x86_64-pc-linux-gnu")
diff --git a/openmp/libomptarget/test/mapping/data_member_ref.cpp b/openmp/libomptarget/test/mapping/data_member_ref.cpp
index f8f13d0c47744..ec238907efc12 100644
--- a/openmp/libomptarget/test/mapping/data_member_ref.cpp
+++ b/openmp/libomptarget/test/mapping/data_member_ref.cpp
@@ -1,5 +1,8 @@
// RUN: %libomptarget-compilexx-run-and-check-generic
+// amdgcn does not have printf definition
+// XFAIL: amdgcn-amd-amdhsa
+
#include <stdio.h>
struct View {
diff --git a/openmp/libomptarget/test/mapping/declare_mapper_nested_default_mappers.cpp b/openmp/libomptarget/test/mapping/declare_mapper_nested_default_mappers.cpp
index 373af90523d20..7edd7db880fb1 100644
--- a/openmp/libomptarget/test/mapping/declare_mapper_nested_default_mappers.cpp
+++ b/openmp/libomptarget/test/mapping/declare_mapper_nested_default_mappers.cpp
@@ -1,5 +1,8 @@
// RUN: %libomptarget-compilexx-run-and-check-generic
+// amdgcn does not have printf definition
+// XFAIL: amdgcn-amd-amdhsa
+
#include <cstdio>
#include <cstdlib>
diff --git a/openmp/libomptarget/test/mapping/declare_mapper_nested_mappers.cpp b/openmp/libomptarget/test/mapping/declare_mapper_nested_mappers.cpp
index 161124aa51cf0..c8986dd66f2c5 100644
--- a/openmp/libomptarget/test/mapping/declare_mapper_nested_mappers.cpp
+++ b/openmp/libomptarget/test/mapping/declare_mapper_nested_mappers.cpp
@@ -1,5 +1,8 @@
// RUN: %libomptarget-compilexx-run-and-check-generic
+// amdgcn does not have printf definition
+// XFAIL: amdgcn-amd-amdhsa
+
#include <cstdio>
#include <cstdlib>
diff --git a/openmp/libomptarget/test/mapping/delete_inf_refcount.c b/openmp/libomptarget/test/mapping/delete_inf_refcount.c
index ca5980ff51702..cd67dddc664bf 100644
--- a/openmp/libomptarget/test/mapping/delete_inf_refcount.c
+++ b/openmp/libomptarget/test/mapping/delete_inf_refcount.c
@@ -1,5 +1,8 @@
// RUN: %libomptarget-compile-run-and-check-generic
+// fails with error message 'Unable to generate target entries' on amdgcn
+// XFAIL: amdgcn-amd-amdhsa
+
#include <stdio.h>
#include <omp.h>
diff --git a/openmp/libomptarget/test/mapping/ptr_and_obj_motion.c b/openmp/libomptarget/test/mapping/ptr_and_obj_motion.c
index a975ed63bc206..ddea2fb65cba5 100644
--- a/openmp/libomptarget/test/mapping/ptr_and_obj_motion.c
+++ b/openmp/libomptarget/test/mapping/ptr_and_obj_motion.c
@@ -1,5 +1,8 @@
// RUN: %libomptarget-compile-run-and-check-generic
+// amdgcn does not have printf definition
+// XFAIL: amdgcn-amd-amdhsa
+
#include <stdio.h>
typedef struct {
diff --git a/openmp/libomptarget/test/offloading/host_as_target.c b/openmp/libomptarget/test/offloading/host_as_target.c
index cf1b816803c4b..c25a4809c244f 100644
--- a/openmp/libomptarget/test/offloading/host_as_target.c
+++ b/openmp/libomptarget/test/offloading/host_as_target.c
@@ -7,6 +7,9 @@
// RUN: %libomptarget-compile-run-and-check-generic
+// amdgcn does not have printf definition
+// XFAIL: amdgcn-amd-amdhsa
+
#include <stdio.h>
#include <omp.h>
diff --git a/openmp/libomptarget/test/unified_shared_memory/api.c b/openmp/libomptarget/test/unified_shared_memory/api.c
index 7a8af621ba477..a7709cb50f4fe 100644
--- a/openmp/libomptarget/test/unified_shared_memory/api.c
+++ b/openmp/libomptarget/test/unified_shared_memory/api.c
@@ -1,6 +1,9 @@
// RUN: %libomptarget-compile-run-and-check-generic
// XFAIL: nvptx64-nvidia-cuda
+// Fails on amdgcn with error: GPU Memory Error
+// XFAIL: amdgcn-amd-amdhsa
+
#include <stdio.h>
#include <omp.h>
diff --git a/openmp/libomptarget/test/unified_shared_memory/close_enter_exit.c b/openmp/libomptarget/test/unified_shared_memory/close_enter_exit.c
index ae2b16a9e39f0..d11531cbe74c3 100644
--- a/openmp/libomptarget/test/unified_shared_memory/close_enter_exit.c
+++ b/openmp/libomptarget/test/unified_shared_memory/close_enter_exit.c
@@ -3,6 +3,9 @@
// UNSUPPORTED: clang-6, clang-7, clang-8, clang-9
// XFAIL: nvptx64-nvidia-cuda
+// Fails on amdgcn with error: GPU Memory Error
+// XFAIL: amdgcn-amd-amdhsa
+
#include <omp.h>
#include <stdio.h>
diff --git a/openmp/libomptarget/test/unified_shared_memory/close_modifier.c b/openmp/libomptarget/test/unified_shared_memory/close_modifier.c
index 1dadcf3d3f1f3..d25831952ba56 100644
--- a/openmp/libomptarget/test/unified_shared_memory/close_modifier.c
+++ b/openmp/libomptarget/test/unified_shared_memory/close_modifier.c
@@ -3,6 +3,9 @@
// UNSUPPORTED: clang-6, clang-7, clang-8, clang-9
+// amdgcn does not have printf definition
+// XFAIL: amdgcn-amd-amdhsa
+
#include <omp.h>
#include <stdio.h>
diff --git a/openmp/libomptarget/test/unified_shared_memory/shared_update.c b/openmp/libomptarget/test/unified_shared_memory/shared_update.c
index f166150dd15ba..3f844c230837b 100644
--- a/openmp/libomptarget/test/unified_shared_memory/shared_update.c
+++ b/openmp/libomptarget/test/unified_shared_memory/shared_update.c
@@ -1,6 +1,9 @@
// RUN: %libomptarget-compile-run-and-check-generic
// XFAIL: nvptx64-nvidia-cuda
+// amdgcn does not have printf definition
+// XFAIL: amdgcn-amd-amdhsa
+
#include <stdio.h>
#include <omp.h>
More information about the Openmp-commits
mailing list