Skip to content

Commit

Permalink
[OpenMP] Fix or disable NVPTX tests failing currently (#77844)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jhuber6 committed Jan 12, 2024
1 parent f33e927 commit ab02372
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 2 deletions.
2 changes: 2 additions & 0 deletions openmp/libomptarget/test/libc/assert.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <stdio.h>
#include <stdlib.h>
Expand Down
3 changes: 3 additions & 0 deletions openmp/libomptarget/test/mapping/target_uses_allocator.c
Original file line number Diff line number Diff line change
@@ -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 <omp.h>
#include <stdio.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <stdio.h>

int main() {
Expand Down
7 changes: 5 additions & 2 deletions openmp/libomptarget/test/offloading/bug64959.c
Original file line number Diff line number Diff line change
@@ -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 <omp.h>
#include <stdio.h>
Expand Down
3 changes: 3 additions & 0 deletions openmp/libomptarget/test/offloading/info.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <omp.h>
#include <stdio.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <cassert>
#include <complex>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <omp.h>
#include <stdio.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <omp.h>
#include <stdio.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <omp.h>
#include <stdio.h>
Expand Down

0 comments on commit ab02372

Please sign in to comment.