Skip to content

Commit 2102ed0

Browse files
committed
Fix for openmp tests honoring thread_limit.
Diff: https://reviews.llvm.org/D159001
1 parent 02054d3 commit 2102ed0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,8 +449,9 @@ uint64_t GenericKernelTy::getNumBlocks(GenericDeviceTy &GenericDevice,
449449
IsNumThreadsFromUser) {
450450
// Enough parallelism for teams and threads.
451451
TripCountNumBlocks = ((LoopTripCount - 1) / NumThreads) + 1;
452-
assert(TripCountNumBlocks >= DefaultNumBlocks &&
453-
"Expected sufficient outer parallelism.");
452+
assert(IsNumThreadsFromUser ||
453+
TripCountNumBlocks >= DefaultNumBlocks &&
454+
"Expected sufficient outer parallelism.");
454455
} else if (LoopTripCount >= DefaultNumBlocks * MinThreads) {
455456
// Enough parallelism for teams, limit threads.
456457

0 commit comments

Comments
 (0)