Skip to content
Merged
9 changes: 9 additions & 0 deletions sycl/source/detail/scheduler/graph_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,15 @@ AllocaCommandBase *Scheduler::GraphBuilder::getOrCreateAllocaForReq(
} else {
LinkedAllocaCmd->MIsActive = false;
Record->MCurContext = Queue->getContextImplPtr();

std::set<Command *> Deps =
findDepsForReq(Record, Req, Queue->getContextImplPtr());
for (Command *Dep : Deps) {
AllocaCmd->addDep(DepDesc{Dep, Req, AllocaCmd});
Dep->addUser(AllocaCmd);
}
updateLeaves(Deps, Record, Req->MAccessMode);
addNodeToLeaves(Record, AllocaCmd, Req->MAccessMode);
}
}
}
Expand Down