Use total SLM instead of inline in error checking

Related-To: NEO-7280
Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
This commit is contained in:
Fabian Zwolinski
2022-10-12 18:53:32 +00:00
committed by Compute-Runtime-Automation
parent 380e2dcc35
commit e1c49d0f23
4 changed files with 43 additions and 21 deletions

View File

@@ -3511,10 +3511,10 @@ cl_int CL_API_CALL clEnqueueNDRangeKernel(cl_command_queue commandQueue,
Kernel *pKernel = pMultiDeviceKernel->getKernel(pCommandQueue->getDevice().getRootDeviceIndex());
auto localMemSize = static_cast<uint32_t>(pCommandQueue->getDevice().getDeviceInfo().localMemSize);
auto slmInlineSize = pKernel->getDescriptor().kernelAttributes.slmInlineSize;
auto slmTotalSize = pKernel->getSlmTotalSize();
if (slmInlineSize > 0 && localMemSize < slmInlineSize) {
PRINT_DEBUG_STRING(NEO::DebugManager.flags.PrintDebugMessages.get(), stderr, "Size of SLM (%u) larger than available (%u)\n", slmInlineSize, localMemSize);
if (slmTotalSize > 0 && localMemSize < slmTotalSize) {
PRINT_DEBUG_STRING(NEO::DebugManager.flags.PrintDebugMessages.get(), stderr, "Size of SLM (%u) larger than available (%u)\n", slmTotalSize, localMemSize);
retVal = CL_OUT_OF_RESOURCES;
TRACING_EXIT(ClEnqueueNdRangeKernel, &retVal);
return retVal;