Add helper method to obtain TimestampPacket for cache flush

Change-Id: Ie0f3b72adc0ca5c8158b44d2b0740f20adf33fa0
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
Dunajski, Bartosz
2020-02-26 13:54:32 +01:00
committed by sys_ocldev
parent 54b2763466
commit 8a791f5874
3 changed files with 8 additions and 1 deletions

View File

@@ -442,6 +442,8 @@ class CommandQueueHw : public CommandQueue {
TimestampPacketDependencies &timestampPacketDependencies, const EventsRequest &eventsRequest,
bool queueBlocked);
bool obtainTimestampPacketForCacheFlush(bool isCacheFlushCommand) const;
private:
bool isTaskLevelUpdateRequired(const uint32_t &taskLevel, const cl_event *eventWaitList, const cl_uint &numEventsInWaitList, unsigned int commandType);
void obtainTaskLevelAndBlockedStatus(unsigned int &taskLevel, cl_uint &numEventsInWaitList, const cl_event *&eventWaitList, bool &blockQueueStatus, unsigned int commandType) override;

View File

@@ -138,4 +138,9 @@ void CommandQueueHw<Family>::setupBlitAuxTranslation(MultiDispatchInfo &multiDis
TimestampPacketHelper::getRequiredCmdStreamSizeForAuxTranslationNodeDependency<Family>);
}
template <typename Family>
bool CommandQueueHw<Family>::obtainTimestampPacketForCacheFlush(bool isCacheFlushCommand) const {
return isCacheFlushCommand;
}
} // namespace NEO

View File

@@ -202,7 +202,7 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface **surfacesForResidency,
eventsRequest.fillCsrDependencies(csrDeps, getGpgpuCommandStreamReceiver(), CsrDependencies::DependenciesType::OnCsr);
size_t nodesCount = 0u;
if (blitEnqueue || isCacheFlushCommand(commandType)) {
if (blitEnqueue || obtainTimestampPacketForCacheFlush(isCacheFlushCommand(commandType))) {
nodesCount = 1;
} else if (!multiDispatchInfo.empty()) {
nodesCount = estimateTimestampPacketNodesCount(multiDispatchInfo);