Skip to content

[SYCL][ABI-Break] Remove deprecated barrier API #10219

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sycl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ set(SYCL_MAJOR_VERSION 7)
set(SYCL_MINOR_VERSION 0)
set(SYCL_PATCH_VERSION 0)

set(SYCL_DEV_ABI_VERSION 7)
set(SYCL_DEV_ABI_VERSION 8)
if (SYCL_ADD_DEV_VERSION_POSTFIX)
set(SYCL_VERSION_POSTFIX "-${SYCL_DEV_ABI_VERSION}")
endif()
Expand Down
15 changes: 0 additions & 15 deletions sycl/include/sycl/handler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2547,12 +2547,6 @@ class __SYCL_EXPORT handler {
setType(detail::CG::Barrier);
}

/// Prevents any commands submitted afterward to this queue from executing
/// until all commands previously submitted to this queue have entered the
/// complete state.
__SYCL2020_DEPRECATED("use 'ext_oneapi_barrier' instead")
void barrier() { ext_oneapi_barrier(); }

/// Prevents any commands submitted afterward to this queue from executing
/// until all events in WaitList have entered the complete state. If WaitList
/// is empty, then the barrier has no effect.
Expand All @@ -2561,15 +2555,6 @@ class __SYCL_EXPORT handler {
/// before barrier command can be executed.
void ext_oneapi_barrier(const std::vector<event> &WaitList);

/// Prevents any commands submitted afterward to this queue from executing
/// until all events in WaitList have entered the complete state. If WaitList
/// is empty, then the barrier has no effect.
///
/// \param WaitList is a vector of valid SYCL events that need to complete
/// before barrier command can be executed.
__SYCL2020_DEPRECATED("use 'ext_oneapi_barrier' instead")
void barrier(const std::vector<event> &WaitList);

/// Copies data from one memory region to another, each is either a host
/// pointer or a pointer within USM allocation accessible on this handler's
/// device.
Expand Down
29 changes: 0 additions & 29 deletions sycl/include/sycl/queue.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -383,19 +383,6 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
return submit([=](handler &CGH) { CGH.ext_oneapi_barrier(); }, CodeLoc);
}

/// Prevents any commands submitted afterward to this queue from executing
/// until all commands previously submitted to this queue have entered the
/// complete state.
///
/// \param CodeLoc is the code location of the submit call (default argument)
/// \return a SYCL event object, which corresponds to the queue the command
/// group is being enqueued on.
__SYCL2020_DEPRECATED("use 'ext_oneapi_submit_barrier' instead")
event submit_barrier(
const detail::code_location &CodeLoc = detail::code_location::current()) {
return ext_oneapi_submit_barrier(CodeLoc);
}

/// Prevents any commands submitted afterward to this queue from executing
/// until all events in WaitList have entered the complete state. If WaitList
/// is empty, then ext_oneapi_submit_barrier has no effect.
Expand All @@ -412,22 +399,6 @@ class __SYCL_EXPORT queue : public detail::OwnerLessBase<queue> {
CodeLoc);
}

/// Prevents any commands submitted afterward to this queue from executing
/// until all events in WaitList have entered the complete state. If WaitList
/// is empty, then submit_barrier has no effect.
///
/// \param WaitList is a vector of valid SYCL events that need to complete
/// before barrier command can be executed.
/// \param CodeLoc is the code location of the submit call (default argument)
/// \return a SYCL event object, which corresponds to the queue the command
/// group is being enqueued on.
__SYCL2020_DEPRECATED("use 'ext_oneapi_submit_barrier' instead")
event submit_barrier(
const std::vector<event> &WaitList,
const detail::code_location &CodeLoc = detail::code_location::current()) {
return ext_oneapi_submit_barrier(WaitList, CodeLoc);
}

/// Performs a blocking wait for the completion of all enqueued tasks in the
/// queue.
///
Expand Down
5 changes: 0 additions & 5 deletions sycl/source/handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -729,11 +729,6 @@ void handler::ext_oneapi_barrier(const std::vector<event> &WaitList) {
[](const event &Event) { return detail::getSyclObjImpl(Event); });
}

__SYCL2020_DEPRECATED("use 'ext_oneapi_barrier' instead")
void handler::barrier(const std::vector<event> &WaitList) {
handler::ext_oneapi_barrier(WaitList);
}

using namespace sycl::detail;
bool handler::DisableRangeRounding() {
return SYCLConfig<SYCL_DISABLE_PARALLEL_FOR_RANGE_ROUNDING>::get();
Expand Down
6 changes: 4 additions & 2 deletions sycl/test-e2e/Basic/enqueue_barrier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ int main() {
[&](sycl::handler &cgh) { cgh.single_task<class kernel2>([]() {}); });

// call handler::barrier()
Q1.submit([&](sycl::handler &cgh) { cgh.barrier(); });
Q1.submit([&](sycl::handler &cgh) { cgh.ext_oneapi_barrier(); });

Q1.submit(
[&](sycl::handler &cgh) { cgh.single_task<class kernel3>([]() {}); });
Expand All @@ -38,7 +38,9 @@ int main() {
[&](sycl::handler &cgh) { cgh.single_task<class kernel6>([]() {}); });

// call handler::barrier(const std::vector<event> &WaitList)
Q3.submit([&](sycl::handler &cgh) { cgh.barrier({Event1, Event2}); });
Q3.submit([&](sycl::handler &cgh) {
cgh.ext_oneapi_barrier({Event1, Event2});
});

Q3.submit(
[&](sycl::handler &cgh) { cgh.single_task<class kernel7>([]() {}); });
Expand Down
1 change: 0 additions & 1 deletion sycl/test/abi/sycl_symbols_linux.dump
Original file line number Diff line number Diff line change
Expand Up @@ -4031,7 +4031,6 @@ _ZN4sycl3_V17handler28setStateExplicitKernelBundleEv
_ZN4sycl3_V17handler30memcpyFromHostOnlyDeviceGlobalEPvPKvbmm
_ZN4sycl3_V17handler6memcpyEPvPKvm
_ZN4sycl3_V17handler6memsetEPvim
_ZN4sycl3_V17handler7barrierERKSt6vectorINS0_5eventESaIS3_EE
_ZN4sycl3_V17handler8finalizeEv
_ZN4sycl3_V17handler8prefetchEPKvm
_ZN4sycl3_V17handlerC1ESt10shared_ptrINS0_3ext6oneapi12experimental6detail10graph_implEE
Expand Down
4 changes: 0 additions & 4 deletions sycl/test/abi/sycl_symbols_windows.dump
Original file line number Diff line number Diff line change
Expand Up @@ -885,8 +885,6 @@
?associateWithHandler@handler@_V1@sycl@@AEAAXPEAVSampledImageAccessorBaseHost@detail@23@W4image_target@23@@Z
?associateWithHandler@handler@_V1@sycl@@AEAAXPEAVUnsampledImageAccessorBaseHost@detail@23@W4image_target@23@@Z
?associateWithHandlerCommon@handler@_V1@sycl@@AEAAXV?$shared_ptr@VAccessorImplHost@detail@_V1@sycl@@@std@@H@Z
?barrier@handler@_V1@sycl@@QEAAXAEBV?$vector@Vevent@_V1@sycl@@V?$allocator@Vevent@_V1@sycl@@@std@@@std@@@Z
?barrier@handler@_V1@sycl@@QEAAXXZ
?begin@exception_list@_V1@sycl@@QEBA?AV?$_Vector_const_iterator@V?$_Vector_val@U?$_Simple_types@Vexception_ptr@std@@@std@@@std@@@std@@XZ
?begin@kernel_bundle_plain@detail@_V1@sycl@@IEBAPEBVdevice_image_plain@234@XZ
?begin_recording@modifiable_command_graph@detail@experimental@oneapi@ext@_V1@sycl@@QEAA_NAEAVqueue@67@@Z
Expand Down Expand Up @@ -1333,8 +1331,6 @@
?start@HostProfilingInfo@detail@_V1@sycl@@QEAAXXZ
?start_fusion@fusion_wrapper@experimental@codeplay@ext@_V1@sycl@@QEAAXXZ
?stringifyErrorCode@detail@_V1@sycl@@YAPEBDH@Z
?submit_barrier@queue@_V1@sycl@@QEAA?AVevent@23@AEBUcode_location@detail@23@@Z
?submit_barrier@queue@_V1@sycl@@QEAA?AVevent@23@AEBV?$vector@Vevent@_V1@sycl@@V?$allocator@Vevent@_V1@sycl@@@std@@@std@@AEBUcode_location@detail@23@@Z
?submit_impl@queue@_V1@sycl@@AEAA?AVevent@23@V?$function@$$A6AXAEAVhandler@_V1@sycl@@@Z@std@@AEBUcode_location@detail@23@@Z
?submit_impl@queue@_V1@sycl@@AEAA?AVevent@23@V?$function@$$A6AXAEAVhandler@_V1@sycl@@@Z@std@@V123@AEBUcode_location@detail@23@@Z
?submit_impl_and_postprocess@queue@_V1@sycl@@AEAA?AVevent@23@V?$function@$$A6AXAEAVhandler@_V1@sycl@@@Z@std@@AEBUcode_location@detail@23@AEBV?$function@$$A6AX_N0AEAVevent@_V1@sycl@@@Z@6@@Z
Expand Down
6 changes: 0 additions & 6 deletions sycl/test/warnings/sycl_2020_deprecations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,6 @@ int main() {
auto SL = sycl::INTEL::source_language::opencl_c;
(void)SL;

// expected-warning@+1{{'submit_barrier' is deprecated: use 'ext_oneapi_submit_barrier' instead}}
Queue.submit_barrier();

// expected-warning@+1{{'barrier' is deprecated: use 'ext_oneapi_barrier' instead}}
Queue.submit([&](sycl::handler &CGH) { CGH.barrier(); });

sycl::multi_ptr<int, sycl::access::address_space::global_space,
sycl::access::decorated::yes>
a(nullptr);
Expand Down