Update obtainTimestampPacketForCacheFlush usage

Change-Id: I4825e2a5e86d5024bbf178f6c25ebbec9ce1dd2c
Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2020-03-06 14:56:23 +01:00
committed by sys_ocldev
parent a77209f5b7
commit 30f1694411
6 changed files with 8 additions and 5 deletions

View File

@@ -544,7 +544,7 @@ void CommandQueue::obtainNewTimestampPacketNodes(size_t numberOfNodes, Timestamp
size_t CommandQueue::estimateTimestampPacketNodesCount(const MultiDispatchInfo &dispatchInfo) const {
size_t nodesCount = dispatchInfo.size();
auto mainKernel = dispatchInfo.peekMainKernel();
if (mainKernel->requiresCacheFlushCommand(*this)) {
if (obtainTimestampPacketForCacheFlush(mainKernel->requiresCacheFlushCommand(*this))) {
nodesCount++;
}
return nodesCount;

View File

@@ -327,6 +327,7 @@ class CommandQueue : public BaseObject<_cl_command_queue> {
bool queueDependenciesClearRequired() const;
bool blitEnqueueAllowed(cl_command_type cmdType) const;
void aubCaptureHook(bool &blocking, bool &clearAllDependencies, const MultiDispatchInfo &multiDispatchInfo);
virtual bool obtainTimestampPacketForCacheFlush(bool isCacheFlushRequired) const = 0;
Context *context = nullptr;
ClDevice *device = nullptr;

View File

@@ -444,7 +444,7 @@ class CommandQueueHw : public CommandQueue {
TimestampPacketDependencies &timestampPacketDependencies, const EventsRequest &eventsRequest,
bool queueBlocked);
bool obtainTimestampPacketForCacheFlush(bool isCacheFlushCommand) const;
bool obtainTimestampPacketForCacheFlush(bool isCacheFlushRequired) const override;
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

@@ -144,8 +144,8 @@ void CommandQueueHw<Family>::setupBlitAuxTranslation(MultiDispatchInfo &multiDis
}
template <typename Family>
bool CommandQueueHw<Family>::obtainTimestampPacketForCacheFlush(bool isCacheFlushCommand) const {
return isCacheFlushCommand;
bool CommandQueueHw<Family>::obtainTimestampPacketForCacheFlush(bool isCacheFlushRequired) const {
return isCacheFlushRequired;
}
} // 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 || obtainTimestampPacketForCacheFlush(isCacheFlushCommand(commandType))) {
if (blitEnqueue || isCacheFlushCommand(commandType)) {
nodesCount = 1;
} else if (!multiDispatchInfo.empty()) {
nodesCount = estimateTimestampPacketNodesCount(multiDispatchInfo);