Skip to content

Commit b026de4

Browse files
authored
[ABI-Break][SYCL] Remove unused getOrWaitEvents helper. (#13493)
1 parent 4ae7cad commit b026de4

File tree

5 files changed

+1
-51
lines changed

5 files changed

+1
-51
lines changed

sycl/include/sycl/detail/helpers.hpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,14 @@ namespace detail {
4242

4343
class buffer_impl;
4444
class context_impl;
45-
// The function returns list of events that can be passed to OpenCL API as
46-
// dependency list and waits for others.
47-
__SYCL_EXPORT std::vector<sycl::detail::pi::PiEvent>
48-
getOrWaitEvents(std::vector<sycl::event> DepEvents,
49-
std::shared_ptr<sycl::detail::context_impl> Context);
50-
5145
__SYCL_EXPORT void waitEvents(std::vector<sycl::event> DepEvents);
5246

5347
__SYCL_EXPORT void
5448
markBufferAsInternal(const std::shared_ptr<buffer_impl> &BufImpl);
5549

5650
template <typename T> T *declptr() { return static_cast<T *>(nullptr); }
5751

58-
// Function to get of store id, item, nd_item, group for the host implementation
52+
// Function to get or store id, item, nd_item, group for the host implementation
5953
// Pass nullptr to get stored object. Pass valid address to store object
6054
template <typename T> T get_or_store(const T *obj) {
6155
static thread_local auto stored = *obj;

sycl/source/detail/event_impl.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -392,10 +392,6 @@ class event_impl {
392392
// allows for profiling, even if the queue does not have profiling enabled.
393393
bool MProfilingTagEvent = false;
394394

395-
friend std::vector<sycl::detail::pi::PiEvent>
396-
getOrWaitEvents(std::vector<sycl::event> DepEvents,
397-
std::shared_ptr<sycl::detail::context_impl> Context);
398-
399395
std::atomic_bool MIsEnqueued{false};
400396

401397
// Events constructed without a context will lazily use the default context

sycl/source/detail/helpers.cpp

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -21,44 +21,6 @@ namespace sycl {
2121
inline namespace _V1 {
2222
using ContextImplPtr = std::shared_ptr<sycl::detail::context_impl>;
2323
namespace 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-
6224
void waitEvents(std::vector<sycl::event> DepEvents) {
6325
for (auto SyclEvent : DepEvents) {
6426
detail::getSyclObjImpl(SyclEvent)->waitInternal();

sycl/test/abi/sycl_symbols_linux.dump

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3251,7 +3251,6 @@ _ZN4sycl3_V16detail14tls_code_loc_tC2ERKNS1_13code_locationE
32513251
_ZN4sycl3_V16detail14tls_code_loc_tC2Ev
32523252
_ZN4sycl3_V16detail14tls_code_loc_tD1Ev
32533253
_ZN4sycl3_V16detail14tls_code_loc_tD2Ev
3254-
_ZN4sycl3_V16detail15getOrWaitEventsESt6vectorINS0_5eventESaIS3_EESt10shared_ptrINS1_12context_implEE
32553254
_ZN4sycl3_V16detail16AccessorBaseHost10getAccDataEv
32563255
_ZN4sycl3_V16detail16AccessorBaseHost14getAccessRangeEv
32573256
_ZN4sycl3_V16detail16AccessorBaseHost14getMemoryRangeEv

sycl/test/abi/sycl_symbols_windows.dump

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4141,7 +4141,6 @@
41414141
?getOffset@AccessorBaseHost@detail@_V1@sycl@@QEAAAEAV?$id@$02@34@XZ
41424142
?getOffset@AccessorBaseHost@detail@_V1@sycl@@QEBAAEBV?$id@$02@34@XZ
41434143
?getOrInsertHandlerKernelBundle@handler@_V1@sycl@@AEBA?AV?$shared_ptr@Vkernel_bundle_impl@detail@_V1@sycl@@@std@@_N@Z
4144-
?getOrWaitEvents@detail@_V1@sycl@@YA?AV?$vector@PEAU_pi_event@@V?$allocator@PEAU_pi_event@@@std@@@std@@V?$vector@Vevent@_V1@sycl@@V?$allocator@Vevent@_V1@sycl@@@std@@@5@V?$shared_ptr@Vcontext_impl@detail@_V1@sycl@@@5@@Z
41454144
?getPitch@SampledImageAccessorBaseHost@detail@_V1@sycl@@QEBA?AV?$id@$02@34@XZ
41464145
?getPitch@UnsampledImageAccessorBaseHost@detail@_V1@sycl@@QEBA?AV?$id@$02@34@XZ
41474146
?getPixelCoordLinearFiltMode@detail@_V1@sycl@@YA?AV?$vec@H$07@23@V?$vec@M$03@23@W4addressing_mode@23@V?$range@$02@23@AEAV523@@Z

0 commit comments

Comments
 (0)