Make CPU copy for read buffer when host ptr is write combined on DG2

With this commit on DG2 32bit driver will check if passed host ptr for
clEnqueueReadBuffer is write combined memory. If check will be true copy
will be make on CPU.

Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
Maciej Plewka
2022-06-13 14:13:34 +00:00
committed by Compute-Runtime-Automation
parent cdfe2ce8ad
commit 213dc2fe24
13 changed files with 92 additions and 2 deletions

View File

@@ -886,7 +886,7 @@ bool WddmMemoryManager::isCpuCopyRequired(const void *ptr) {
}
// dummy read
//cacheable = *localVariablePointer;
// cacheable = *localVariablePointer;
_mm_lfence();
timestamp0 = __rdtsc();
@@ -904,7 +904,7 @@ bool WddmMemoryManager::isCpuCopyRequired(const void *ptr) {
fastestLocalRead = localVariableReadDelta;
}
// dummy read
//cacheable = *volatileInputPtr;
// cacheable = *volatileInputPtr;
_mm_lfence();
timestamp0 = __rdtsc();