performance: enable staging read for images

Related-To: NEO-12968

Signed-off-by: Szymon Morek <szymon.morek@intel.com>
This commit is contained in:
Szymon Morek
2024-12-20 13:15:56 +00:00
committed by Compute-Runtime-Automation
parent 363f2becd4
commit 6aeb8dffa0
2 changed files with 46 additions and 14 deletions

View File

@@ -2892,19 +2892,22 @@ cl_int CL_API_CALL clEnqueueReadImage(cl_command_queue commandQueue,
TRACING_EXIT(ClEnqueueReadImage, &retVal);
return retVal;
}
retVal = pCommandQueue->enqueueReadImage(
pImage,
blockingRead,
origin,
region,
rowPitch,
slicePitch,
ptr,
nullptr,
numEventsInWaitList,
eventWaitList,
event);
if (pCommandQueue->isValidForStagingTransferImage(pImage, ptr, numEventsInWaitList > 0)) {
retVal = pCommandQueue->enqueueStagingReadImage(pImage, blockingRead, origin, region, rowPitch, slicePitch, ptr, event);
} else {
retVal = pCommandQueue->enqueueReadImage(
pImage,
blockingRead,
origin,
region,
rowPitch,
slicePitch,
ptr,
nullptr,
numEventsInWaitList,
eventWaitList,
event);
}
}
DBG_LOG_INPUTS("event", getClFileLogger().getEvents(reinterpret_cast<const uintptr_t *>(event), 1u));
TRACING_EXIT(ClEnqueueReadImage, &retVal);