Abort if SLM size larger than local mem size

Signed-off-by: Jaime Arteaga <jaime.a.arteaga.molina@intel.com>
This commit is contained in:
Jaime Arteaga
2021-07-30 02:42:08 +00:00
committed by Compute-Runtime-Automation
parent 6f75d67406
commit 4192fc7d86
2 changed files with 26 additions and 2 deletions

View File

@@ -163,6 +163,7 @@ void WorkSizeInfo::setMinWorkGroupSize(const HardwareInfo *hwInfo) {
minWorkGroupSize = numThreadsPerSubSlice * simdSize / maxBarriersPerHSlice;
}
if (slmTotalSize > 0) {
UNRECOVERABLE_IF(localMemSize < slmTotalSize);
minWorkGroupSize = std::max(maxWorkGroupSize / ((localMemSize / slmTotalSize)), minWorkGroupSize);
}