[Openmp-commits] [PATCH] D51687: [libomptarget][NVPTX] Fix number of threads in parallel

Jonas Hahnfeld via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Sep 5 08:13:05 PDT 2018


Hahnfeld created this revision.
Hahnfeld added reviewers: AlexEichenberger, grokos, kkwli0.
Herald added subscribers: openmp-commits, mgorny.

If there is no num_threads() clause we must consider the
nthreads-var ICV. Its value is set by omp_set_num_threads()
and can be queried using omp_get_max_num_threads().
The rewritten code now closely resembles the algorithm given
in the OpenMP standard.

This patch also introduces testing for libomptarget-nvptx
which has been missing until now. I propose to add tests for
all bugs that are fixed in the future.
The target check-libomptarget-nvptx is not run by default because

- we can't determine if there is a GPU plugged into the system.
- it will require the latest Clang compiler. Keeping compatibility with older releases would prevent testing newer code generation developed in trunk.


Repository:
  rOMP OpenMP

https://reviews.llvm.org/D51687

Files:
  cmake/OpenMPTesting.cmake
  libomptarget/CMakeLists.txt
  libomptarget/deviceRTLs/nvptx/CMakeLists.txt
  libomptarget/deviceRTLs/nvptx/src/libcall.cu
  libomptarget/deviceRTLs/nvptx/src/parallel.cu
  libomptarget/deviceRTLs/nvptx/test/CMakeLists.txt
  libomptarget/deviceRTLs/nvptx/test/lit.cfg
  libomptarget/deviceRTLs/nvptx/test/lit.site.cfg.in
  libomptarget/deviceRTLs/nvptx/test/parallel/num_threads.c
  libomptarget/deviceRTLs/nvptx/test/parallel/thread_limit.c
  libomptarget/test/CMakeLists.txt
  libomptarget/test/lit.site.cfg.in

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51687.164048.patch
Type: text/x-patch
Size: 22860 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20180905/0d1eddc5/attachment-0001.bin>


More information about the Openmp-commits mailing list