[Openmp-commits] [PATCH] D151350: [OpenMP] Extend omp teams to permit nested omp tile

Joel E. Denny via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed May 24 10:25:42 PDT 2023


jdenny created this revision.
jdenny added reviewers: Meinersbur, ABataev, jhuber6, jdoerfert.
jdenny added projects: OpenMP, OpenACC.
Herald added subscribers: sunshaoce, guansong, yaxunl.
Herald added a reviewer: clementval.
Herald added a project: All.
jdenny requested review of this revision.
Herald added subscribers: openmp-commits, cfe-commits, jplehr, sstefan1.
Herald added a project: clang.

OpenMP 5.2, sec. 10.2 "teams Construct", p. 232, L9-12 restricts what
regions can be strictly nested within a `teams` construct.  This patch
relaxes Clang's enforcement of this restriction in the case of nested
`tile` constructs unless `-fno-openmp-extensions` is specified.  Cases
like the following then seem to work fine with no additional
implementation changes:

  #pragma omp target teams
  #pragma omp tile sizes(N, M)
  for (int i = 0; i < I; ++i) {
    for (int j = 0; j < J; ++j) {
      ...
    }
  }

This commit is similar to D126323 <https://reviews.llvm.org/D126323> (48ca3a5ebb15 <https://reviews.llvm.org/rG48ca3a5ebb156ccb776eea399138b7cda4d13395>) plus D126547 <https://reviews.llvm.org/D126547>
(4a368136693b <https://reviews.llvm.org/rG4a368136693ba9c4e827702e9d390280c3d5e7ac>), which relaxed the restriction for an `atomic`
construct in a `teams` construct.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D151350

Files:
  clang/docs/OpenMPSupport.rst
  clang/lib/Sema/SemaOpenMP.cpp
  openmp/docs/openacc/OpenMPExtensions.rst
  openmp/libomptarget/test/offloading/target-teams-tile.c
  openmp/runtime/test/teams/teams-tile.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151350.525243.patch
Type: text/x-patch
Size: 9061 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20230524/5a9be125/attachment-0001.bin>


More information about the Openmp-commits mailing list