fix: add missing checks to return proper OpenCL error from API

changes affect clEnqueueNDCountKernelINTEL and
clGetKernelMaxConcurrentWorkGroupCountINTEL

Related-To: NEO-9688

Signed-off-by: Aleksander Czerwionka <aleksander.czerwionka@intel.com>
This commit is contained in:
Aleksander Czerwionka
2024-04-26 15:37:43 +00:00
committed by Compute-Runtime-Automation
parent 8a60257aac
commit 4667f55ea2
4 changed files with 28 additions and 1 deletions

View File

@@ -45,7 +45,7 @@ uint32_t KernelHelper::getMaxWorkGroupCount(const RootDeviceEnvironment &rootDev
for (uint32_t i = 1; i < workDim; i++) {
workGroupSize *= localWorkSize[i];
}
UNRECOVERABLE_IF(workGroupSize == 0);
auto numThreadsPerThreadGroup = static_cast<uint32_t>(Math::divideAndRoundUp(workGroupSize, kernelDescriptor.kernelAttributes.simdSize));
auto maxWorkGroupsCount = availableThreadCount / numThreadsPerThreadGroup;