mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
Revert async Event destruction
This revertsf9a5f8a86eandf89c731a11Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
268393d776
commit
83a9037640
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user