forked from OSchip/llvm-project
[OpenMP] Fix warnings for uninitialized block counts
Summary: Fixes some warning given for uninitialized block counts if the exection mode is not recognized. This shouldn't happen in practice because the execution mode is checked when it's read from the device.
This commit is contained in:
parent
fd3823cc82
commit
a158d3663f
|
@ -1969,7 +1969,7 @@ launchVals getLaunchVals(EnvironmentVariables Env, int ConstWGSize,
|
|||
num_groups = ((loop_tripcount - 1) / threadsPerGroup) + 1;
|
||||
} else if (ExecutionMode == GENERIC) {
|
||||
num_groups = loop_tripcount;
|
||||
} else if (ExecutionMode == SPMD_GENERIC) {
|
||||
} else /* ExecutionMode == SPMD_GENERIC */ {
|
||||
// This is a generic kernel that was transformed to use SPMD-mode
|
||||
// execution but uses Generic-mode semantics for scheduling.
|
||||
num_groups = loop_tripcount;
|
||||
|
|
|
@ -1069,6 +1069,9 @@ public:
|
|||
// `teams distribute` region and will create var too few blocks using
|
||||
// the regular SPMD-mode method.
|
||||
CudaBlocksPerGrid = LoopTripCount;
|
||||
} else {
|
||||
REPORT("Unknown execution mode: %d\n", KernelInfo->ExecutionMode);
|
||||
return OFFLOAD_FAIL;
|
||||
}
|
||||
DP("Using %d teams due to loop trip count %" PRIu32
|
||||
" and number of threads per block %d\n",
|
||||
|
|
Loading…
Reference in New Issue