SWDEV-435015 - Disable sysmem allocation in abstraction layer

Change-Id: Idefdabd2997d618b962c42545ae67768c628c5d6
This commit is contained in:
German
2023-11-29 16:53:09 -05:00
committed by German Andryeyev
parent 5b5213adf5
commit 01217d0383
2 changed files with 18 additions and 3 deletions
+8 -1
View File
@@ -214,7 +214,14 @@ bool Memory::allocHostMemory(void* initFrom, bool allocHostMem, bool forceCopy)
// This allocation is necessary to use coherency mechanism
// for the initialization
if (getMemFlags() & (CL_MEM_COPY_HOST_PTR | CL_MEM_ALLOC_HOST_PTR)) {
allocHostMem = true;
// Extra system memory allocation and copy can be very expensive.
// Thus, avoid it if runtime doesn't perform deferred allocations
if ((devices.size() == 1) || DISABLE_DEFERRED_ALLOC) {
allocHostMem = false;
setHostMem(initFrom);
} else {
allocHostMem = true;
}
}
// Did application request to use host memory?