mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 23:56:39 +08:00
Add error handling when kernel uses too much SLM
API Functions reporting error: - clCreateKernel - clEnqueueNDRangeKernel - zeKernelCreate - zeCommandListAppendLaunchKernel - zeKernelSuggestGroupSize Related-To: NEO-7280 Signed-off-by: Fabian Zwolinski <fabian.zwolinski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
5a0dd8048b
commit
1142404c0c
@@ -101,6 +101,13 @@ class Kernel : public ReferenceTrackedObject<Kernel> {
|
||||
pKernel = nullptr;
|
||||
}
|
||||
|
||||
auto localMemSize = static_cast<uint32_t>(clDevice.getDevice().getDeviceInfo().localMemSize);
|
||||
auto slmInlineSize = kernelInfo.kernelDescriptor.kernelAttributes.slmInlineSize;
|
||||
|
||||
if (slmInlineSize > 0 && localMemSize < slmInlineSize) {
|
||||
retVal = CL_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
if (errcodeRet) {
|
||||
*errcodeRet = retVal;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user