Skip to content

[SYCL] Deprecate sycl::atomics in SYCL 2020 mode #5440

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 26 commits into from
Feb 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
225c6c0
Updated image_accessor constructor
IgorKharchikov Jan 14, 2022
667ce93
Added test for image_accessor const ref fix
IgorKharchikov Jan 14, 2022
0645ee6
Update const_ref_image_accessor.cpp
IgorKharchikov Jan 17, 2022
a6eefc8
Update const_ref_image_accessor.cpp
IgorKharchikov Jan 17, 2022
f5641da
Update const_ref_image_accessor.cpp
IgorKharchikov Jan 17, 2022
b8f7509
[SYCL]Created regression test for ctz fix
IgorKharchikov Jan 18, 2022
d433b34
Merge pull request #1 from IgorKharchikov/IgorKharchikov-added_tests
IgorKharchikov Jan 18, 2022
0f54611
Revert "[SYCL]Created regression test for ctz fix"
IgorKharchikov Jan 18, 2022
42ef2fa
Merge pull request #2 from IgorKharchikov/revert-1-IgorKharchikov-add…
IgorKharchikov Jan 18, 2022
7465d36
Update const_ref_image_accessor.cpp
IgorKharchikov Jan 18, 2022
9b4be53
Update const_ref_image_accessor.cpp
IgorKharchikov Jan 18, 2022
bcf96d3
Merge branch 'intel:sycl' into sycl
IgorKharchikov Jan 20, 2022
f30e0b4
Merge branch 'intel:sycl' into sycl
IgorKharchikov Jan 24, 2022
333ea45
Update const_ref_image_accessor.cpp
IgorKharchikov Jan 24, 2022
e650676
Update const_ref_image_accessor.cpp
IgorKharchikov Jan 25, 2022
92a181c
Update sycl/test/check_device_code/const_ref_image_accessor.cpp
IgorKharchikov Jan 25, 2022
96e6c67
Merge branch 'intel:sycl' into sycl
IgorKharchikov Jan 26, 2022
473c784
Merge branch 'intel:sycl' into sycl
IgorKharchikov Jan 31, 2022
05d3e9f
Merge branch 'intel:sycl' into sycl
IgorKharchikov Jan 31, 2022
a8c1492
Update atomic.hpp
IgorKharchikov Jan 31, 2022
b064743
Create atomic_deprecated.cpp
IgorKharchikov Jan 31, 2022
2d73f27
Update sycl_2020_deprecations.cpp
IgorKharchikov Feb 1, 2022
5aeef52
Delete atomic_deprecated.cpp
IgorKharchikov Feb 1, 2022
74acc39
Update sycl_2020_deprecations.cpp
IgorKharchikov Feb 1, 2022
af9ba65
Update sycl_2020_deprecations.cpp
IgorKharchikov Feb 1, 2022
d0a07a6
Update sycl_2020_deprecations.cpp
IgorKharchikov Feb 3, 2022
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
3 changes: 2 additions & 1 deletion sycl/include/CL/sycl/atomic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ namespace sycl {

template <typename T, access::address_space addressSpace =
access::address_space::global_space>
class atomic {
class __SYCL2020_DEPRECATED(
"sycl::atomic is deprecated since SYCL 2020") atomic {
friend class atomic<T, access::address_space::global_space>;
static_assert(detail::IsValidAtomicType<T>::value,
"Invalid SYCL atomic type. Valid types are: int, "
Expand Down
10 changes: 6 additions & 4 deletions sycl/test/warnings/sycl_2020_deprecations.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
// RUN: %clangxx %fsycl-host-only -fsyntax-only -sycl-std=2020 -Xclang -verify -Xclang -verify-ignore-unexpected=note %s -o %t.out
// RUN: %clangxx %fsycl-host-only -fsyntax-only -Xclang -verify -Xclang -verify-ignore-unexpected=note %s -o %t.out
// RUN: %clangxx %fsycl-host-only -fsyntax-only -sycl-std=2017 -Xclang -verify -Xclang -verify-ignore-unexpected=note %s -o %t.out
// RUN: %clangxx %fsycl-host-only -fsyntax-only -sycl-std=1.2.1 -Xclang -verify -Xclang -verify-ignore-unexpected=note %s -o %t.out

#include <CL/sycl.hpp>
#include <sycl/ext/intel/online_compiler.hpp>
Expand Down Expand Up @@ -176,6 +173,11 @@ int main() {

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


cl::sycl::multi_ptr<int, cl::sycl::access::address_space::global_space> a(
nullptr);
// expected-warning@+1 {{'atomic<int, sycl::access::address_space::global_space>' is deprecated: sycl::atomic is deprecated since SYCL 2020}}
cl::sycl::atomic<int> b(a);

return 0;
}