Error from clEnqueueNDRangeKernel() for too big group counts

Resolves: NEO-6976

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2022-10-04 16:57:51 +00:00
committed by Compute-Runtime-Automation
parent 322719e7a2
commit 2f24ef6855
2 changed files with 39 additions and 0 deletions

View File

@@ -131,6 +131,13 @@ cl_int CommandQueueHw<GfxFamily>::enqueueKernel(
return CL_INVALID_WORK_GROUP_SIZE;
}
for (auto i = 0u; i < workDim; i++) {
uint64_t dimension = static_cast<uint64_t>(region[i]) / workGroupSize[i];
if (dimension > std::numeric_limits<uint32_t>::max()) {
return CL_INVALID_GLOBAL_WORK_SIZE;
}
}
return enqueueHandler<CL_COMMAND_NDRANGE_KERNEL>(
surfaces,
false,