mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-10-07 02:43:57 +00:00
[OpenMP] Fix two usm tests for amdgpus. (#77851)
Some are missing setting of HSA_XNACK=1 environment variable, used to enable unified memory support on amdgpu's when it's not been set at kernel boot time. Some others needed to be marked as supporting unified_shared_memory in the lit test harness.
This commit is contained in:
parent
cd753c70e6
commit
3add9491cd
@ -117,7 +117,10 @@ if config.libomptarget_current_target.startswith('nvptx'):
|
|||||||
# If the architecture is invalid, assume it is supported.
|
# If the architecture is invalid, assume it is supported.
|
||||||
supports_unified_shared_memory = True
|
supports_unified_shared_memory = True
|
||||||
if config.libomptarget_current_target.startswith('amdgcn'):
|
if config.libomptarget_current_target.startswith('amdgcn'):
|
||||||
supports_unified_shared_memory = False
|
if not (config.amdgpu_test_arch == "gfx908" or
|
||||||
|
config.amdgpu_test_arch == "gfx90a" or
|
||||||
|
config.amdgpu_test_arch == "gfx942") :
|
||||||
|
supports_unified_shared_memory = False
|
||||||
if supports_unified_shared_memory:
|
if supports_unified_shared_memory:
|
||||||
config.available_features.add('unified_shared_memory')
|
config.available_features.add('unified_shared_memory')
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ config.test_extra_flags = "@OPENMP_TEST_FLAGS@"
|
|||||||
config.cuda_path = "@CUDA_TOOLKIT_ROOT_DIR@"
|
config.cuda_path = "@CUDA_TOOLKIT_ROOT_DIR@"
|
||||||
config.cuda_libdir = "@CUDA_LIBDIR@"
|
config.cuda_libdir = "@CUDA_LIBDIR@"
|
||||||
config.cuda_test_arch = "@LIBOMPTARGET_DEP_CUDA_ARCH@"
|
config.cuda_test_arch = "@LIBOMPTARGET_DEP_CUDA_ARCH@"
|
||||||
|
config.amdgpu_test_arch = "@LIBOMPTARGET_AMDGPU_DETECTED_ARCH_LIST@"
|
||||||
config.libomptarget_obj_root = "@CMAKE_CURRENT_BINARY_DIR@/@CURRENT_TARGET@"
|
config.libomptarget_obj_root = "@CMAKE_CURRENT_BINARY_DIR@/@CURRENT_TARGET@"
|
||||||
config.library_dir = "@LIBOMPTARGET_LIBRARY_DIR@"
|
config.library_dir = "@LIBOMPTARGET_LIBRARY_DIR@"
|
||||||
config.llvm_library_dir = "@LIBOMPTARGET_LLVM_LIBRARY_DIR@"
|
config.llvm_library_dir = "@LIBOMPTARGET_LLVM_LIBRARY_DIR@"
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
// RUN: %libomptarget-compile-run-and-check-generic
|
// RUN: %libomptarget-compile-generic
|
||||||
|
// RUN: env HSA_XNACK=1 \
|
||||||
|
// RUN: %libomptarget-run-generic | %fcheck-generic
|
||||||
// XFAIL: nvptx64-nvidia-cuda
|
// XFAIL: nvptx64-nvidia-cuda
|
||||||
// XFAIL: nvptx64-nvidia-cuda-LTO
|
// XFAIL: nvptx64-nvidia-cuda-LTO
|
||||||
|
|
||||||
// Fails on amdgpu with error: GPU Memory Error
|
|
||||||
// UNSUPPORTED: amdgcn-amd-amdhsa
|
|
||||||
|
|
||||||
#include <omp.h>
|
#include <omp.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
// RUN: %libomptarget-compile-run-and-check-generic
|
// RUN: %libomptarget-compile-generic
|
||||||
|
// RUN: env HSA_XNACK=1 \
|
||||||
|
// RUN: %libomptarget-run-generic | %fcheck-generic
|
||||||
|
|
||||||
// REQUIRES: unified_shared_memory
|
// REQUIRES: unified_shared_memory
|
||||||
// UNSUPPORTED: clang-6, clang-7, clang-8, clang-9
|
// 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
|
// Fails on nvptx with error: an illegal memory access was encountered
|
||||||
// XFAIL: amdgcn-amd-amdhsa
|
|
||||||
// XFAIL: nvptx64-nvidia-cuda
|
// XFAIL: nvptx64-nvidia-cuda
|
||||||
// XFAIL: nvptx64-nvidia-cuda-LTO
|
// XFAIL: nvptx64-nvidia-cuda-LTO
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user