Do not use blitter for local->local SVM and USM copies

Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
Related-To: NEO-5549
This commit is contained in:
Maciej Dziuban
2021-02-11 14:30:05 +00:00
committed by Compute-Runtime-Automation
parent f6a0b3c6ce
commit 98ff3cc0a9
6 changed files with 89 additions and 4 deletions

View File

@@ -710,10 +710,15 @@ bool CommandQueue::blitEnqueueAllowed(cl_command_type cmdType) const {
}
}
bool CommandQueue::blitEnqueuePreferred(cl_command_type cmdType) const {
bool CommandQueue::blitEnqueuePreferred(cl_command_type cmdType, const BuiltinOpParams &builtinOpParams) const {
if (cmdType == CL_COMMAND_COPY_BUFFER) {
return DebugManager.flags.PreferCopyEngineForCopyBufferToBuffer.get() == 1;
}
if (cmdType == CL_COMMAND_SVM_MEMCPY &&
builtinOpParams.srcSvmAlloc->isAllocatedInLocalMemoryPool() &&
builtinOpParams.dstSvmAlloc->isAllocatedInLocalMemoryPool()) {
return DebugManager.flags.PreferCopyEngineForCopyBufferToBuffer.get() == 1;
}
return true;
}

View File

@@ -353,7 +353,7 @@ class CommandQueue : public BaseObject<_cl_command_queue> {
void providePerformanceHint(TransferProperties &transferProperties);
bool queueDependenciesClearRequired() const;
bool blitEnqueueAllowed(cl_command_type cmdType) const;
bool blitEnqueuePreferred(cl_command_type cmdType) const;
bool blitEnqueuePreferred(cl_command_type cmdType, const BuiltinOpParams &builtinOpParams) const;
MOCKABLE_VIRTUAL bool blitEnqueueImageAllowed(const size_t *origin, const size_t *region);
void aubCaptureHook(bool &blocking, bool &clearAllDependencies, const MultiDispatchInfo &multiDispatchInfo);
virtual bool obtainTimestampPacketForCacheFlush(bool isCacheFlushRequired) const = 0;

View File

@@ -1136,7 +1136,7 @@ void CommandQueueHw<GfxFamily>::enqueueBlit(const MultiDispatchInfo &multiDispat
template <typename GfxFamily>
template <uint32_t cmdType, size_t surfaceCount>
void CommandQueueHw<GfxFamily>::dispatchBcsOrGpgpuEnqueue(MultiDispatchInfo &dispatchInfo, Surface *(&surfaces)[surfaceCount], EBuiltInOps::Type builtInOperation, cl_uint numEventsInWaitList, const cl_event *eventWaitList, cl_event *event, bool blocking, bool blitAllowed) {
const bool blitPreferred = blitEnqueuePreferred(cmdType);
const bool blitPreferred = blitEnqueuePreferred(cmdType, dispatchInfo.peekBuiltinOpParams());
const bool blitRequired = isCopyOnly;
const bool blit = blitAllowed && (blitPreferred || blitRequired);