mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-27 07:44:16 +08:00
performance: enable staging write for cl buffers
Related-To: NEO-13529 Also, add size threshold on iGPU on Linux, and disable staging if imported host ptr could be reused Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
35d8e82664
commit
b11322332c
@@ -29,6 +29,7 @@
|
||||
#include "shared/source/os_interface/os_context.h"
|
||||
#include "shared/source/os_interface/product_helper.h"
|
||||
#include "shared/source/utilities/api_intercept.h"
|
||||
#include "shared/source/utilities/staging_buffer_manager.h"
|
||||
#include "shared/source/utilities/tag_allocator.h"
|
||||
|
||||
#include "opencl/source/built_ins/builtins_dispatch_builder.h"
|
||||
@@ -548,7 +549,9 @@ WaitStatus CommandQueue::waitUntilComplete(TaskCountType gpgpuTaskCountToWait, R
|
||||
: getGpgpuCommandStreamReceiver().waitForTaskCount(gpgpuTaskCountToWait);
|
||||
|
||||
WAIT_LEAVE()
|
||||
|
||||
if (this->context->getStagingBufferManager()) {
|
||||
this->context->getStagingBufferManager()->resetDetectedPtrs();
|
||||
}
|
||||
return waitStatus;
|
||||
}
|
||||
|
||||
|
||||
@@ -173,7 +173,8 @@ bool CommandQueue::isValidForStagingTransfer(MemObj *memObj, const void *ptr, bo
|
||||
switch (memObj->peekClMemObjType()) {
|
||||
case CL_MEM_OBJECT_IMAGE1D:
|
||||
case CL_MEM_OBJECT_IMAGE2D:
|
||||
return stagingBufferManager->isValidForStagingTransfer(this->getDevice(), ptr, hasDependencies);
|
||||
case CL_MEM_OBJECT_BUFFER:
|
||||
return stagingBufferManager->isValidForStagingTransfer(this->getDevice(), ptr, memObj->getSize(), hasDependencies);
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user