Revert async Event destruction

This reverts f9a5f8a86e and
f89c731a11

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2022-05-12 12:13:48 +00:00
committed by Compute-Runtime-Automation
parent 268393d776
commit 83a9037640
7 changed files with 6 additions and 106 deletions

View File

@@ -44,11 +44,7 @@ Event *AsyncEventsHandler::processList() {
for (auto event : list) {
event->updateExecutionStatus();
bool eventNotReady = (event->peekExecutionStatus() > CL_COMPLETE);
bool trackDeferredDeletion = event->isDeletionDeferred() && eventNotReady;
if (event->peekHasCallbacks() || (event->isExternallySynchronized() && eventNotReady) || trackDeferredDeletion) {
if (event->peekHasCallbacks() || (event->isExternallySynchronized() && (event->peekExecutionStatus() > CL_COMPLETE))) {
pendingList.push_back(event);
if (event->peekTaskCount() < lowestTaskCount) {
sleepCandidate = event;

View File

@@ -144,16 +144,6 @@ Event::~Event() {
unblockEventsBlockedByThis(executionStatus);
}
void Event::handleCompletionBeforeDestruction() {
if (!cmdQueue || isCompleted() || peekExecutionStatus() < 0 || (getRefInternalCount() > 1)) {
return;
}
this->deletionDeferredToAsyncThread = true;
cmdQueue->flush();
ctx->getAsyncEventsHandler().registerEvent(this);
}
cl_int Event::getEventProfilingInfo(cl_profiling_info paramName,
size_t paramValueSize,
void *paramValue,

View File

@@ -301,16 +301,12 @@ class Event : public BaseObject<_cl_event>, public IDNode<Event> {
this->cmdType = cmdType;
}
void handleCompletionBeforeDestruction();
std::vector<Event *> &getParentEvents() { return this->parentEvents; }
virtual bool isExternallySynchronized() const {
return false;
}
bool isDeletionDeferred() const { return deletionDeferredToAsyncThread; }
static bool checkUserEventDependencies(cl_uint numEventsInWaitList, const cl_event *eventWaitList);
static void getBoundaryTimestampValues(TimestampPacketContainer *timestampContainer, uint64_t &globalStartTS, uint64_t &globalEndTS);
@@ -383,7 +379,6 @@ class Event : public BaseObject<_cl_event>, public IDNode<Event> {
bool profilingEnabled;
bool profilingCpuPath;
bool dataCalculated;
bool deletionDeferredToAsyncThread = false;
TimeStampData queueTimeStamp;
TimeStampData submitTimeStamp;
uint64_t startTimeStamp;