[all-commits] [llvm/llvm-project] 34ed3e: [OpenMP] Test unified shared memory tests only on ...

Michael Kruse via All-commits all-commits at lists.llvm.org
Thu May 13 09:08:39 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 34ed3e63378e34f93ada56a19cebc68cf1498092
      https://github.com/llvm/llvm-project/commit/34ed3e63378e34f93ada56a19cebc68cf1498092
  Author: Michael Kruse <llvm-project at meinersbur.de>
  Date:   2021-05-13 (Thu, 13 May 2021)

  Changed paths:
    M openmp/libomptarget/test/lit.cfg
    M openmp/libomptarget/test/lit.site.cfg.in
    M openmp/libomptarget/test/mapping/present/unified_shared_memory.c
    M openmp/libomptarget/test/unified_shared_memory/close_enter_exit.c
    M openmp/libomptarget/test/unified_shared_memory/close_manual.c
    M openmp/libomptarget/test/unified_shared_memory/close_modifier.c
    M openmp/libomptarget/test/unified_shared_memory/shared_update.c

  Log Message:
  -----------
  [OpenMP] Test unified shared memory tests only on systems that support it.

Add a `REQUIRES: unified_shared_memory` option to tests that use `#pragma omp requires unified_shared_memory`.

For CUDA, the feature tag is derived from LIBOMPTARGET_DEP_CUDA_ARCH which itself is derived using [[ https://cmake.org/cmake/help/latest/module/FindCUDA.html#commands | cuda_select_nvcc_arch_flags ]]. The latter determines which compute capability the GPU in the system supports. To ensure that this is the CUDA arch being used, we could also set the `-Xopenmp-target -march=` flag.
In the absence of an NVIDIA GPU, LIBOMPTARGET_DEP_CUDA_ARCH will be 35. That is, in that case we are assuming unified_shared_memory is not available. CUDA plugin testing could be disabled entirely in this case, but this currently depends on `LIBOMPTARGET_CAN_LINK_LIBCUDA OR LIBOMPTARGET_FORCE_DLOPEN_LIBCUDA`, not on whether the hardware is actually available.

For all other targets, nothing changes and we are assuming unified shared memory is available. This might need refinement if not the case.

This tries to fix the [[ http://meinersbur.de:8011/#/builders/143 | OpenMP Offloading Buildbot ]] that, although brand-new, only has a Pascal-generation (sm_61) GPU installed. Hence, tests that require unified shared memory are currently failing. I wish I had known in advance.

Reviewed By: protze.joachim, tianshilei1992

Differential Revision: https://reviews.llvm.org/D101498




More information about the All-commits mailing list