Add AllowUnrestrictedSize debug flag

This debug flag allows to allocate memory with size greater than
CL_DEVICE_MAX_MEM_ALLOC_SIZE.

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
Szymon Morek
2021-08-05 10:10:20 +00:00
committed by Compute-Runtime-Automation
parent ec28084ed4
commit 3c15023871
8 changed files with 79 additions and 3 deletions

View File

@ -4457,7 +4457,7 @@ void *CL_API_CALL clSVMAlloc(cl_context context,
}
auto pDevice = pContext->getDevice(0);
bool allowUnrestrictedSize = (flags & CL_MEM_ALLOW_UNRESTRICTED_SIZE_INTEL);
bool allowUnrestrictedSize = (flags & CL_MEM_ALLOW_UNRESTRICTED_SIZE_INTEL) || DebugManager.flags.AllowUnrestrictedSize.get();
if ((size == 0) ||
(!allowUnrestrictedSize && (size > pDevice->getSharedDeviceInfo().maxMemAllocSize))) {