mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
performance: flag, force zero copy for host ptr
When debug flag ForceZeroCopyForUseHostPtr is set, add CL_MEM_FORCE_HOST_MEMORY_INTEL flag to buffers created with CL_MEM_USE_HOST_PTR. This makes the buffers use zero copy. Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
f55ad93baf
commit
0a12817664
@@ -106,6 +106,10 @@ cl_mem Buffer::validateInputAndCreateBuffer(cl_context context,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if ((flags & CL_MEM_USE_HOST_PTR) && !!debugManager.flags.ForceZeroCopyForUseHostPtr.get()) {
|
||||
flags |= CL_MEM_FORCE_HOST_MEMORY_INTEL;
|
||||
}
|
||||
|
||||
MemoryProperties memoryProperties{};
|
||||
cl_mem_alloc_flags_intel allocflags = 0;
|
||||
cl_mem_flags_intel emptyFlagsIntel = 0;
|
||||
|
||||
Reference in New Issue
Block a user