[OpenMP] Remove restriction on the thread count for parallel regions
Differential Revision: https://reviews.llvm.org/D112194
This commit is contained in:
parent
de9edf4afe
commit
0153ab6dbc
|
@ -54,7 +54,11 @@ uint32_t determineNumberOfThreads(int32_t NumThreadsClause) {
|
|||
if (NThreadsICV != 0 && NThreadsICV < NumThreads)
|
||||
NumThreads = NThreadsICV;
|
||||
|
||||
// Round down to a multiple of WARPSIZE since it is legal to do so in OpenMP.
|
||||
// SPMD mode allows any number of threads, for generic mode we round down to a
|
||||
// multiple of WARPSIZE since it is legal to do so in OpenMP.
|
||||
if (mapping::isSPMDMode())
|
||||
return NumThreads;
|
||||
|
||||
if (NumThreads < mapping::getWarpSize())
|
||||
NumThreads = 1;
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue
Block a user