mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 07:14:10 +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
@@ -352,6 +352,10 @@ ze_result_t KernelImp::suggestGroupSize(uint32_t globalSizeX, uint32_t globalSiz
|
||||
uint32_t numThreadsPerSubSlice = (uint32_t)deviceInfo.maxNumEUsPerSubSlice * deviceInfo.numThreadsPerEU;
|
||||
uint32_t localMemSize = (uint32_t)deviceInfo.localMemSize;
|
||||
|
||||
if (this->getSlmTotalSize() > 0 && localMemSize < this->getSlmTotalSize()) {
|
||||
return ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY;
|
||||
}
|
||||
|
||||
NEO::WorkSizeInfo wsInfo(maxWorkGroupSize, kernelImmData->getDescriptor().kernelAttributes.usesBarriers(), simd, this->getSlmTotalSize(),
|
||||
hwInfo, numThreadsPerSubSlice, localMemSize,
|
||||
usesImages, false, kernelImmData->getDescriptor().kernelAttributes.flags.requiresDisabledEUFusion);
|
||||
|
||||
Reference in New Issue
Block a user