From ae845d64269193189c0347454255afa70824e17a Mon Sep 17 00:00:00 2001 From: Pushpinder Singh Date: Wed, 28 Apr 2021 06:53:46 +0000 Subject: [PATCH] [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 --- openmp/libomptarget/CMakeLists.txt | 1 + openmp/libomptarget/test/mapping/data_member_ref.cpp | 3 +++ .../test/mapping/declare_mapper_nested_default_mappers.cpp | 3 +++ .../test/mapping/declare_mapper_nested_mappers.cpp | 3 +++ openmp/libomptarget/test/mapping/delete_inf_refcount.c | 3 +++ openmp/libomptarget/test/mapping/ptr_and_obj_motion.c | 3 +++ openmp/libomptarget/test/offloading/host_as_target.c | 3 +++ openmp/libomptarget/test/unified_shared_memory/api.c | 3 +++ .../libomptarget/test/unified_shared_memory/close_enter_exit.c | 3 +++ .../libomptarget/test/unified_shared_memory/close_modifier.c | 3 +++ openmp/libomptarget/test/unified_shared_memory/shared_update.c | 3 +++ 11 files changed, 31 insertions(+) diff --git a/openmp/libomptarget/CMakeLists.txt b/openmp/libomptarget/CMakeLists.txt index ec4f87e025d1..6e7ecdc15252 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 f8f13d0c4774..ec238907efc1 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 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 373af90523d2..7edd7db880fb 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 #include diff --git a/openmp/libomptarget/test/mapping/declare_mapper_nested_mappers.cpp b/openmp/libomptarget/test/mapping/declare_mapper_nested_mappers.cpp index 161124aa51cf..c8986dd66f2c 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 #include diff --git a/openmp/libomptarget/test/mapping/delete_inf_refcount.c b/openmp/libomptarget/test/mapping/delete_inf_refcount.c index ca5980ff5170..cd67dddc664b 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 #include diff --git a/openmp/libomptarget/test/mapping/ptr_and_obj_motion.c b/openmp/libomptarget/test/mapping/ptr_and_obj_motion.c index a975ed63bc20..ddea2fb65cba 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 typedef struct { diff --git a/openmp/libomptarget/test/offloading/host_as_target.c b/openmp/libomptarget/test/offloading/host_as_target.c index cf1b816803c4..c25a4809c244 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 #include diff --git a/openmp/libomptarget/test/unified_shared_memory/api.c b/openmp/libomptarget/test/unified_shared_memory/api.c index 7a8af621ba47..a7709cb50f4f 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 #include 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 ae2b16a9e39f..d11531cbe74c 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 #include diff --git a/openmp/libomptarget/test/unified_shared_memory/close_modifier.c b/openmp/libomptarget/test/unified_shared_memory/close_modifier.c index 1dadcf3d3f1f..d25831952ba5 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 #include diff --git a/openmp/libomptarget/test/unified_shared_memory/shared_update.c b/openmp/libomptarget/test/unified_shared_memory/shared_update.c index f166150dd15b..3f844c230837 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 #include