SWDEV-435015 - Disable sysmem allocation in abstraction layer

Change-Id: Idefdabd2997d618b962c42545ae67768c628c5d6
This commit is contained in:
German authored and German Andryeyev committed 2023-12-04 11:40:28 -05:00
1 förälder 5b5213adf5
incheckning 01217d0383
2 files changed
+18 -3

No files matched your search

+8 -1
Visa fil
@@ -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?