@@ -21,44 +21,6 @@ namespace sycl {
2121inline namespace _V1 {
2222using ContextImplPtr = std::shared_ptr<sycl::detail::context_impl>;
2323namespace detail {
24- // TODO: remove from public header files and implementation during the next ABI
25- // Breaking window. Not used any more.
26- std::vector<sycl::detail::pi::PiEvent>
27- getOrWaitEvents (std::vector<sycl::event> DepEvents, ContextImplPtr Context) {
28- std::vector<sycl::detail::pi::PiEvent> Events;
29- for (auto SyclEvent : DepEvents) {
30- auto SyclEventImplPtr = detail::getSyclObjImpl (SyclEvent);
31- // throwaway events created with empty constructor will not have a context
32- // (which is set lazily) calling getContextImpl() would set that
33- // context, which we wish to avoid as it is expensive.
34- if (SyclEventImplPtr->isDefaultConstructed () || SyclEventImplPtr->isNOP ()) {
35- continue ;
36- }
37- // The fusion command and its event are associated with a non-host context,
38- // but still does not produce a PI event.
39- bool NoPiEvent =
40- SyclEventImplPtr->MCommand &&
41- !static_cast <Command *>(SyclEventImplPtr->MCommand )->producesPiEvent ();
42- if (SyclEventImplPtr->isHost () ||
43- SyclEventImplPtr->getContextImpl () != Context || NoPiEvent) {
44- // Call wait, because the command for the event might not have been
45- // enqueued when kernel fusion is happening.
46- SyclEventImplPtr->wait (SyclEventImplPtr);
47- } else {
48- // In this path nullptr native event means that the command has not been
49- // enqueued. It may happen if async enqueue in a host task is involved.
50- // This should affect only shortcut functions, which bypass the graph.
51- if (SyclEventImplPtr->getHandleRef () == nullptr ) {
52- std::vector<Command *> AuxCmds;
53- Scheduler::getInstance ().enqueueCommandForCG (SyclEventImplPtr, AuxCmds,
54- BLOCKING);
55- }
56- Events.push_back (SyclEventImplPtr->getHandleRef ());
57- }
58- }
59- return Events;
60- }
61-
6224void waitEvents (std::vector<sycl::event> DepEvents) {
6325 for (auto SyclEvent : DepEvents) {
6426 detail::getSyclObjImpl (SyclEvent)->waitInternal ();
0 commit comments