From 3df05682f5db5d61150d81c61dd284d29b0a0712 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Thu, 11 Jan 2024 19:17:08 -0600 Subject: [PATCH] [OpenMP] Fix or disable NVPTX tests failing currently (#77844) Summary: This patch is an attempt to get a clean run of `check-openmp` running on an NVPTX machine. I simply took the lists of tests that failed on my `sm_89` machine and disabled them or fixed them. A lot of these tests are disabled on AMDGPU already, so it makes sense that NVPTX fails. The others are simply problems with NVPTX optimized debugging which will need to be fixed. I opened an issue on one of them. --- openmp/libomptarget/test/libc/assert.c | 2 ++ .../test/mapping/target_derefence_array_pointrs.cpp | 3 +++ openmp/libomptarget/test/mapping/target_uses_allocator.c | 3 +++ .../test/mapping/target_wrong_use_device_addr.c | 3 +++ openmp/libomptarget/test/offloading/bug64959.c | 7 +++++-- openmp/libomptarget/test/offloading/info.c | 3 +++ .../test/offloading/std_complex_arithmetic.cpp | 1 + .../test/unified_shared_memory/close_enter_exit.c | 3 +++ .../test/unified_shared_memory/close_modifier.c | 3 +++ .../test/unified_shared_memory/shared_update.c | 3 +++ 10 files changed, 29 insertions(+), 2 deletions(-) diff --git a/openmp/libomptarget/test/libc/assert.c b/openmp/libomptarget/test/libc/assert.c index 9a10032f481893..803a8207e10a45 100644 --- a/openmp/libomptarget/test/libc/assert.c +++ b/openmp/libomptarget/test/libc/assert.c @@ -3,6 +3,8 @@ // REQUIRES: libc +// NVPTX without LTO uses the implementation in OpenMP currently. +// UNSUPPORTED: nvptx64-nvidia-cuda // UNSUPPORTED: powerpc64-ibm-linux-gnu // UNSUPPORTED: powerpc64-ibm-linux-gnu-LTO // UNSUPPORTED: aarch64-unknown-linux-gnu diff --git a/openmp/libomptarget/test/mapping/target_derefence_array_pointrs.cpp b/openmp/libomptarget/test/mapping/target_derefence_array_pointrs.cpp index 7d4bc9ea224789..a6dd4069a8f588 100644 --- a/openmp/libomptarget/test/mapping/target_derefence_array_pointrs.cpp +++ b/openmp/libomptarget/test/mapping/target_derefence_array_pointrs.cpp @@ -2,7 +2,10 @@ // RUN: %libomptarget-run-generic 2>&1 \ // RUN: | %fcheck-generic +// FIXME: This is currently broken on all GPU targets // UNSUPPORTED: amdgcn-amd-amdhsa +// UNSUPPORTED: nvptx64-nvidia-cuda +// UNSUPPORTED: nvptx64-nvidia-cuda-LTO #include #include diff --git a/openmp/libomptarget/test/mapping/target_uses_allocator.c b/openmp/libomptarget/test/mapping/target_uses_allocator.c index 87b940650b998f..eb20e965c30bc9 100755 --- a/openmp/libomptarget/test/mapping/target_uses_allocator.c +++ b/openmp/libomptarget/test/mapping/target_uses_allocator.c @@ -1,6 +1,9 @@ // RUN: %libomptarget-compile-run-and-check-generic +// FIXME: https://github.com/llvm/llvm-project/issues/77841 // UNSUPPORTED: amdgcn-amd-amdhsa +// UNSUPPORTED: nvptx64-nvidia-cuda +// UNSUPPORTED: nvptx64-nvidia-cuda-LTO #include #include diff --git a/openmp/libomptarget/test/mapping/target_wrong_use_device_addr.c b/openmp/libomptarget/test/mapping/target_wrong_use_device_addr.c index 6c7939ea196ad5..7a5babd692530b 100644 --- a/openmp/libomptarget/test/mapping/target_wrong_use_device_addr.c +++ b/openmp/libomptarget/test/mapping/target_wrong_use_device_addr.c @@ -2,6 +2,9 @@ // RUN: env LIBOMPTARGET_INFO=64 %libomptarget-run-fail-generic 2>&1 \ // RUN: | %fcheck-generic +// FIXME: Fails due to optimized debugging in 'ptxas' +// UNSUPPORTED: nvptx64-nvidia-cuda-LTO + #include int main() { diff --git a/openmp/libomptarget/test/offloading/bug64959.c b/openmp/libomptarget/test/offloading/bug64959.c index 500911fa3f3163..eddc55325ffe90 100644 --- a/openmp/libomptarget/test/offloading/bug64959.c +++ b/openmp/libomptarget/test/offloading/bug64959.c @@ -1,8 +1,11 @@ -// RUN: %libomptarget-compilexx-run-and-check-generic -// RUN: %libomptarget-compileoptxx-run-and-check-generic +// RUN: %libomptarget-compile-run-and-check-generic +// RUN: %libomptarget-compileopt-run-and-check-generic // TODO: This requires malloc support for the threads states. +// FIXME: Flaky on all GPU targets. // UNSUPPORTED: amdgcn-amd-amdhsa +// UNSUPPORTED: nvptx64-nvidia-cuda +// UNSUPPORTED: nvptx64-nvidia-cuda-LTO #include #include diff --git a/openmp/libomptarget/test/offloading/info.c b/openmp/libomptarget/test/offloading/info.c index 81300cc92ec56d..da8e4c44c5accb 100644 --- a/openmp/libomptarget/test/offloading/info.c +++ b/openmp/libomptarget/test/offloading/info.c @@ -5,6 +5,9 @@ // RUN: env LIBOMPTARGET_INFO=63 %libomptarget-run-amdgcn-amd-amdhsa 2>&1 | \ // RUN: %fcheck-amdgcn-amd-amdhsa -allow-empty -check-prefixes=INFO,AMDGPU +// FIXME: Fails due to optimized debugging in 'ptxas'. +// UNSUPPORTED: nvptx64-nvidia-cuda-LTO + #include #include diff --git a/openmp/libomptarget/test/offloading/std_complex_arithmetic.cpp b/openmp/libomptarget/test/offloading/std_complex_arithmetic.cpp index 44f87ad732bfbf..641b849bbc3e67 100644 --- a/openmp/libomptarget/test/offloading/std_complex_arithmetic.cpp +++ b/openmp/libomptarget/test/offloading/std_complex_arithmetic.cpp @@ -6,6 +6,7 @@ // FIXME: This fails to link due to missing math symbols. We should provide the // needed math functions in the GPU `libm` and require the GPU C library. // UNSUPPORTED: amdgcn-amd-amdhsa +// UNSUPPORTED: nvptx64-nvidia-cuda-LTO #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 ec292c857f9c78..71be4c9177b063 100644 --- a/openmp/libomptarget/test/unified_shared_memory/close_enter_exit.c +++ b/openmp/libomptarget/test/unified_shared_memory/close_enter_exit.c @@ -4,7 +4,10 @@ // UNSUPPORTED: clang-6, clang-7, clang-8, clang-9 // Fails on amdgpu with error: GPU Memory Error +// Fails on nvptx with error: an illegal memory access was encountered // XFAIL: amdgcn-amd-amdhsa +// XFAIL: nvptx64-nvidia-cuda +// XFAIL: nvptx64-nvidia-cuda-LTO #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 47902a9a298dd8..7ca815db3ad82e 100644 --- a/openmp/libomptarget/test/unified_shared_memory/close_modifier.c +++ b/openmp/libomptarget/test/unified_shared_memory/close_modifier.c @@ -4,7 +4,10 @@ // UNSUPPORTED: clang-6, clang-7, clang-8, clang-9 // amdgpu runtime crash +// Fails on nvptx with error: an illegal memory access was encountered // UNSUPPORTED: amdgcn-amd-amdhsa +// UNSUPPORTED: nvptx64-nvidia-cuda +// UNSUPPORTED: nvptx64-nvidia-cuda-LTO #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 3923b89bba4f69..65db9e4f6bdce2 100644 --- a/openmp/libomptarget/test/unified_shared_memory/shared_update.c +++ b/openmp/libomptarget/test/unified_shared_memory/shared_update.c @@ -3,7 +3,10 @@ // REQUIRES: unified_shared_memory // amdgpu runtime crash +// Fails on nvptx with error: an illegal memory access was encountered // UNSUPPORTED: amdgcn-amd-amdhsa +// UNSUPPORTED: nvptx64-nvidia-cuda +// UNSUPPORTED: nvptx64-nvidia-cuda-LTO #include #include