[Openmp-commits] [PATCH] D112194: [OpenMP] Remove restriction on the thread count for parallel regions

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Oct 20 18:45:19 PDT 2021

jdoerfert created this revision.
jdoerfert added reviewers: tianshilei1992, jhuber6.
Herald added subscribers: guansong, bollu, yaxunl.
jdoerfert requested review of this revision.
Herald added a subscriber: sstefan1.
Herald added a project: OpenMP.

This was taken from the old runtime but it is not, or should not, be
necessary in the new one.

  rG LLVM Github Monorepo



Index: openmp/libomptarget/DeviceRTL/src/Parallelism.cpp
--- openmp/libomptarget/DeviceRTL/src/Parallelism.cpp
+++ openmp/libomptarget/DeviceRTL/src/Parallelism.cpp
@@ -54,12 +54,6 @@
   if (NThreadsICV != 0 && NThreadsICV < NumThreads)
     NumThreads = NThreadsICV;
-  // Round down to a multiple of WARPSIZE since it is legal to do so in OpenMP.
-  if (NumThreads < mapping::getWarpSize())
-    NumThreads = 1;
-  else
-    NumThreads = (NumThreads & ~((uint32_t)mapping::getWarpSize() - 1));
   return NumThreads;

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D112194.381127.patch
Type: text/x-patch
Size: 595 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20211021/00709e34/attachment.bin>

More information about the Openmp-commits mailing list