mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-29 17:13:29 +08:00
Add clearAllDependencies parameter to obtainNewTimestampPacketNodes
The capability to clear Timestamp packet dependencies from command queue. Related-To: NEO-2747 Change-Id: Id3812539a47b96e23d0b8b17b9b8f54878ee2ef2 Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
608ec933da
commit
583d4d4c6c
@@ -551,11 +551,11 @@ void CommandQueue::dispatchAuxTranslation(MultiDispatchInfo &multiDispatchInfo,
|
||||
multiDispatchInfo.rbegin()->setPipeControlRequired(true);
|
||||
}
|
||||
|
||||
void CommandQueue::obtainNewTimestampPacketNodes(size_t numberOfNodes, TimestampPacketContainer &previousNodes) {
|
||||
void CommandQueue::obtainNewTimestampPacketNodes(size_t numberOfNodes, TimestampPacketContainer &previousNodes, bool clearAllDependencies) {
|
||||
auto allocator = getCommandStreamReceiver().getTimestampPacketAllocator();
|
||||
|
||||
previousNodes.swapNodes(*timestampPacketContainer);
|
||||
previousNodes.resolveDependencies(isOOQEnabled() || DebugManager.flags.OmitTimestampPacketDependencies.get());
|
||||
previousNodes.resolveDependencies(clearAllDependencies);
|
||||
|
||||
DEBUG_BREAK_IF(timestampPacketContainer->peekNodes().size() > 0);
|
||||
|
||||
|
||||
@@ -444,7 +444,7 @@ class CommandQueue : public BaseObject<_cl_command_queue> {
|
||||
MOCKABLE_VIRTUAL void dispatchAuxTranslation(MultiDispatchInfo &multiDispatchInfo, MemObjsForAuxTranslation &memObjsForAuxTranslation,
|
||||
AuxTranslationDirection auxTranslationDirection);
|
||||
|
||||
void obtainNewTimestampPacketNodes(size_t numberOfNodes, TimestampPacketContainer &previousNodes);
|
||||
void obtainNewTimestampPacketNodes(size_t numberOfNodes, TimestampPacketContainer &previousNodes, bool clearAllDependencies);
|
||||
void processProperties(const cl_queue_properties *properties);
|
||||
|
||||
Context *context = nullptr;
|
||||
|
||||
@@ -139,6 +139,7 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface **surfacesForResidency,
|
||||
Kernel *parentKernel = multiDispatchInfo.peekParentKernel();
|
||||
auto devQueue = this->getContext().getDefaultDeviceQueue();
|
||||
DeviceQueueHw<GfxFamily> *devQueueHw = castToObject<DeviceQueueHw<GfxFamily>>(devQueue);
|
||||
auto clearAllDependencies = isOOQEnabled() || DebugManager.flags.OmitTimestampPacketDependencies.get();
|
||||
|
||||
TagNode<HwTimeStamps> *hwTimeStamps = nullptr;
|
||||
|
||||
@@ -205,11 +206,9 @@ void CommandQueueHw<GfxFamily>::enqueueHandler(Surface **surfacesForResidency,
|
||||
if (getCommandStreamReceiver().peekTimestampPacketWriteEnabled()) {
|
||||
csrDeps.fillFromEventsRequestAndMakeResident(eventsRequest, getCommandStreamReceiver(), CsrDependencies::DependenciesType::OnCsr);
|
||||
|
||||
if (!multiDispatchInfo.empty()) {
|
||||
obtainNewTimestampPacketNodes(estimateTimestampPacketNodesCount(multiDispatchInfo), previousTimestampPacketNodes);
|
||||
csrDeps.push_back(&previousTimestampPacketNodes);
|
||||
} else if (isCacheFlushCommand(commandType)) {
|
||||
obtainNewTimestampPacketNodes(1, previousTimestampPacketNodes);
|
||||
auto nodesCount = !multiDispatchInfo.empty() ? estimateTimestampPacketNodesCount(multiDispatchInfo) : isCacheFlushCommand(commandType) ? 1u : 0u;
|
||||
if (nodesCount > 0) {
|
||||
obtainNewTimestampPacketNodes(nodesCount, previousTimestampPacketNodes, clearAllDependencies);
|
||||
csrDeps.push_back(&previousTimestampPacketNodes);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user