mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 14:02:58 +08:00
feature(ocl) use tags to synchronize multi root device events
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
a27834ff7d
commit
fa4830036a
@@ -26,7 +26,6 @@ namespace NEO {
|
||||
void flushDependentCsr(CommandStreamReceiver &dependentCsr, CsrDependencies &csrDeps) {
|
||||
auto csrOwnership = dependentCsr.obtainUniqueOwnership();
|
||||
dependentCsr.updateTagFromWait();
|
||||
csrDeps.taskCountContainer.push_back({dependentCsr.peekTaskCount(), reinterpret_cast<uint64_t>(dependentCsr.getTagAddress())});
|
||||
}
|
||||
|
||||
void EventsRequest::fillCsrDependenciesForTimestampPacketContainer(CsrDependencies &csrDeps, CommandStreamReceiver ¤tCsr, CsrDependencies::DependenciesType depsType) const {
|
||||
@@ -68,23 +67,22 @@ void EventsRequest::fillCsrDependenciesForTimestampPacketContainer(CsrDependenci
|
||||
}
|
||||
}
|
||||
|
||||
void EventsRequest::fillCsrDependenciesForTaskCountContainer(CsrDependencies &csrDeps, CommandStreamReceiver ¤tCsr) const {
|
||||
void EventsRequest::fillCsrDependenciesForRootDevices(CsrDependencies &csrDeps, CommandStreamReceiver ¤tCsr) const {
|
||||
for (cl_uint i = 0; i < this->numEventsInWaitList; i++) {
|
||||
auto event = castToObjectOrAbort<Event>(this->eventWaitList[i]);
|
||||
if (event->isUserEvent() || CompletionStamp::notReady == event->peekTaskCount()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (event->getCommandQueue() && event->getCommandQueue()->getDevice().getRootDeviceIndex() != currentCsr.getRootDeviceIndex()) {
|
||||
auto timestampPacketContainer = event->getMultiRootDeviceTimestampPacketNodes();
|
||||
if (!timestampPacketContainer || timestampPacketContainer->peekNodes().empty()) {
|
||||
continue;
|
||||
}
|
||||
auto &dependentCsr = event->getCommandQueue()->getGpgpuCommandStreamReceiver();
|
||||
if (!dependentCsr.isLatestTaskCountFlushed()) {
|
||||
flushDependentCsr(dependentCsr, csrDeps);
|
||||
} else {
|
||||
csrDeps.taskCountContainer.push_back({event->peekTaskCount(), reinterpret_cast<uint64_t>(dependentCsr.getTagAddress())});
|
||||
}
|
||||
|
||||
auto graphicsAllocation = event->getCommandQueue()->getGpgpuCommandStreamReceiver().getTagsMultiAllocation()->getGraphicsAllocation(currentCsr.getRootDeviceIndex());
|
||||
currentCsr.getResidencyAllocations().push_back(graphicsAllocation);
|
||||
csrDeps.multiRootTimeStampSyncContainer.push_back(timestampPacketContainer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user