[Openmp-commits] [PATCH] D159001: [OpenMP] Fix assert fail with user thread limit
Gheorghe-Teodor Bercea via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Mon Aug 28 08:58:47 PDT 2023
doru1004 updated this revision to Diff 553957.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D159001/new/
https://reviews.llvm.org/D159001
Files:
openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp
Index: openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp
===================================================================
--- openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp
+++ openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp
@@ -449,8 +449,9 @@
IsNumThreadsFromUser) {
// Enough parallelism for teams and threads.
TripCountNumBlocks = ((LoopTripCount - 1) / NumThreads) + 1;
- assert(TripCountNumBlocks >= DefaultNumBlocks &&
- "Expected sufficient outer parallelism.");
+ assert(IsNumThreadsFromUser ||
+ TripCountNumBlocks >= DefaultNumBlocks &&
+ "Expected sufficient outer parallelism.");
} else if (LoopTripCount >= DefaultNumBlocks * MinThreads) {
// Enough parallelism for teams, limit threads.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D159001.553957.patch
Type: text/x-patch
Size: 904 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20230828/1a46be41/attachment-0001.bin>
More information about the Openmp-commits
mailing list