Skip to content

Commit b6286e1

Browse files
authored
[SYCL][E2E] Remove deprecated use of accessor::get_pointer (#15424)
- replaced with `get_multi_ptr().get()` in `DiscardEvents/discard_events_accessors.cpp` and `GroupAlgorithm/different_types.cpp` - Use `-DSYCL2020_DISABLE_DEPRECATION_WARNINGS` in place of `-Wno-error=deprecated-declarations` in `Basic/offset-accessor-get_pointer.cpp` due to `accessor::get_pointer`'s deliberate use. This brings it in line with `Basic/multi_ptr_legacy.cpp` which also uses it deliberately.
1 parent dae7032 commit b6286e1

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

sycl/test-e2e/Basic/offset-accessor-get_pointer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %{build} -Wno-error=deprecated-declarations -o %t.out
1+
// RUN: %{build} -DSYCL2020_DISABLE_DEPRECATION_WARNINGS -o %t.out
22
// RUN: %{run} %t.out
33

44
// Per the SYCL 2020 spec (4.7.6.12 and others)

sycl/test-e2e/DiscardEvents/discard_events_accessors.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %{build} -Wno-error=deprecated-declarations -o %t.out
1+
// RUN: %{build} -o %t.out
22
//
33
// RUN: env SYCL_UR_TRACE=2 %{run} %t.out &> %t.txt ; FileCheck %s --input-file %t.txt
44
//
@@ -60,7 +60,7 @@ int main(int Argc, const char *Argv[]) {
6060
CGH.parallel_for<class kernel_using_local_memory>(
6161
NDRange, [=](sycl::nd_item<1> ndi) {
6262
size_t i = ndi.get_global_id(0);
63-
int *Ptr = LocalAcc.get_pointer();
63+
int *Ptr = LocalAcc.get_multi_ptr<access::decorated::no>().get();
6464
Ptr[i] = i + 5;
6565
Harray[i] = Ptr[i] + 5;
6666
});

sycl/test-e2e/GroupAlgorithm/different_types.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %{build} -Wno-error=deprecated-declarations -fsycl-device-code-split=per_kernel -I . -o %t.out
1+
// RUN: %{build} -fsycl-device-code-split=per_kernel -I . -o %t.out
22
// RUN: %{run} %t.out
33

44
#include "../helpers.hpp"
@@ -28,8 +28,10 @@ void test(queue &q, const InputContainer &input, InitT init,
2828
const auto g = it.get_group();
2929
const auto sg = it.get_sub_group();
3030
const auto idx = it.get_local_id();
31-
const auto begin = a_in.get_pointer();
32-
const auto end = a_in.get_pointer() + N;
31+
const auto begin =
32+
a_in.template get_multi_ptr<access::decorated::no>().get();
33+
const auto end =
34+
a_in.template get_multi_ptr<access::decorated::no>().get() + N;
3335

3436
a_reduce_out[0] = reduce_over_group(g, a_in[idx], init, binary_op);
3537
a_reduce_out[1] = joint_reduce(g, begin, end, init, binary_op);

0 commit comments

Comments
 (0)