[Openmp-commits] [openmp] 2102ed0 - Fix for openmp tests honoring thread_limit.
Doru Bercea via Openmp-commits
openmp-commits at lists.llvm.org
Mon Aug 28 10:04:30 PDT 2023
Author: Doru Bercea
Date: 2023-08-28T13:04:17-04:00
New Revision: 2102ed0b917bb29832543b78f667fa48c4c4c517
URL: https://github.com/llvm/llvm-project/commit/2102ed0b917bb29832543b78f667fa48c4c4c517
DIFF: https://github.com/llvm/llvm-project/commit/2102ed0b917bb29832543b78f667fa48c4c4c517.diff
LOG: Fix for openmp tests honoring thread_limit.
Diff: https://reviews.llvm.org/D159001
Added:
Modified:
openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp
Removed:
################################################################################
diff --git a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp
index bc8b41368bdf66..e22258803e1bc0 100644
--- a/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp
+++ b/openmp/libomptarget/plugins-nextgen/common/PluginInterface/PluginInterface.cpp
@@ -449,8 +449,9 @@ uint64_t GenericKernelTy::getNumBlocks(GenericDeviceTy &GenericDevice,
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.
More information about the Openmp-commits
mailing list