[Openmp-commits] [openmp] 5d309bf - [OpenMP][FIX] The thread limit is the block, not grid size

Johannes Doerfert via Openmp-commits openmp-commits at lists.llvm.org
Thu Jan 12 15:42:41 PST 2023


Author: Johannes Doerfert
Date: 2023-01-12T15:42:32-08:00
New Revision: 5d309bfca6ef58d80ee35886f55e14542faebbef

URL: https://github.com/llvm/llvm-project/commit/5d309bfca6ef58d80ee35886f55e14542faebbef
DIFF: https://github.com/llvm/llvm-project/commit/5d309bfca6ef58d80ee35886f55e14542faebbef.diff

LOG: [OpenMP][FIX] The thread limit is the block, not grid size

Added: 
    

Modified: 
    openmp/libomptarget/DeviceRTL/src/State.cpp

Removed: 
    


################################################################################
diff  --git a/openmp/libomptarget/DeviceRTL/src/State.cpp b/openmp/libomptarget/DeviceRTL/src/State.cpp
index aaf81b92887b2..9c1c9abaf493e 100644
--- a/openmp/libomptarget/DeviceRTL/src/State.cpp
+++ b/openmp/libomptarget/DeviceRTL/src/State.cpp
@@ -357,7 +357,7 @@ int omp_get_num_threads(void) {
   return omp_get_level() > 1 ? 1 : state::ParallelTeamSize;
 }
 
-int omp_get_thread_limit(void) { return mapping::getKernelSize(); }
+int omp_get_thread_limit(void) { return mapping::getBlockSize(); }
 
 int omp_get_num_procs(void) { return mapping::getNumberOfProcessorElements(); }
 


        


More information about the Openmp-commits mailing list