File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
sycl/source/detail/scheduler Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change 1919#include < CL/sycl/access/access.hpp>
2020#include < CL/sycl/detail/accessor_impl.hpp>
2121#include < CL/sycl/detail/cg.hpp>
22+ #include < detail/event_impl.hpp>
2223#include < detail/program_manager/program_manager.hpp>
2324
2425__SYCL_INLINE_NAMESPACE (cl) {
@@ -187,7 +188,7 @@ class Command {
187188 return nullptr ;
188189 }
189190
190- virtual ~Command () = default ;
191+ virtual ~Command () { MEvent-> cleanupDependencyEvents (); }
191192
192193 const char *getBlockReason () const ;
193194
Original file line number Diff line number Diff line change @@ -129,7 +129,6 @@ static void handleVisitedNodes(std::vector<Command *> &Visited) {
129129 for (Command *Cmd : Visited) {
130130 if (Cmd->MMarks .MToBeDeleted ) {
131131 Cmd->getEvent ()->setCommand (nullptr );
132- Cmd->getEvent ()->cleanupDependencyEvents ();
133132 delete Cmd;
134133 } else
135134 Cmd->MMarks .MVisited = false ;
@@ -1187,7 +1186,6 @@ void Scheduler::GraphBuilder::cleanupCommand(Command *Cmd) {
11871186 }
11881187
11891188 Cmd->getEvent ()->setCommand (nullptr );
1190- Cmd->getEvent ()->cleanupDependencyEvents ();
11911189 delete Cmd;
11921190}
11931191
You can’t perform that action at this time.
0 commit comments