performance: adjust staging buffer usage

Related-To: NEO-11928

Don't copy through staging buffer if dst usm allocation
was not used before and transfer would be splitted.
Also, don't use staging buffers for mapped ocl buffers.

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
Szymon Morek
2024-07-09 15:55:03 +00:00
committed by Compute-Runtime-Automation
parent 99e8cb7b70
commit dbd96372be
7 changed files with 62 additions and 17 deletions

View File

@@ -389,6 +389,7 @@ class CommandQueue : public BaseObject<_cl_command_queue> {
bool isBcs() const { return isCopyOnly; };
cl_int enqueueStagingBufferMemcpy(cl_bool blockingCopy, void *dstPtr, const void *srcPtr, size_t size, cl_event *event);
bool isValidForStagingBufferCopy(Device &device, void *dstPtr, const void *srcPtr, size_t size, bool hasDependencies);
protected:
void *enqueueReadMemObjForMap(TransferProperties &transferProperties, EventsRequest &eventsRequest, cl_int &errcodeRet);