[OpenMP] Add thread limit environment variable support to plugins
authorJoseph Huber <jhuber6@vols.utk.edu>
Tue, 8 Jun 2021 19:12:24 +0000 (15:12 -0400)
committerHuber, Joseph <huberjn@ornl.gov>
Tue, 22 Jun 2021 20:25:40 +0000 (16:25 -0400)
commit422adaa879b2de5a682eaed1a4f7cf86e9ea12b4
tree8b246330db505a1d68e8c6dc1473029498f5a912
parente35677c07c07c639a5b664d6857e22f105d98a3a
[OpenMP] Add thread limit environment variable support to plugins

The OpenMP 5.1 standard defines the environment variable
`OMP_TEAMS_THREAD_LIMIT` to limit the number of threads that will be run in a
single block. This patch adds support for this into the AMDGPU and CUDA
plugins.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D103923
openmp/libomptarget/plugins/amdgpu/src/rtl.cpp
openmp/libomptarget/plugins/cuda/src/rtl.cpp