[Openmp-commits] [PATCH] D132074: [OpenMP] Add option to assert no nested OpenMP parallelism on the GPU

Joseph Huber via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Aug 22 07:25:27 PDT 2022


jhuber6 added a comment.

In D132074#3739593 <https://reviews.llvm.org/D132074#3739593>, @carlo.bertolli wrote:

> This looks good, but what happens when the user accidentally adds a nested parallel when this option is turned on? Do we get serial (correct) execution?

With the code as it is, it will simply ignore the level and continue executing. This will probably be broken as we don't adjust some of the other state variables for this. The flag more-so asserts that nested parallelism will not work in any capacity than we reduce them to a single thread. We could potentially make it work, but it would be more complicated. There's an assertion if nested parallelism is attempted while being disabled, but this requires the user checking the assertions via `-fopenmp-debug`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132074/new/

https://reviews.llvm.org/D132074



More information about the Openmp-commits mailing list