Skip to content

Commit ec3d9ee

Browse files
[SYCL] Remove deprecated sycl::host_ptr/sycl::device_ptr (#13240)
They have been deprecated in #7680 more than a year ago. --------- Co-authored-by: Greg Lueck <[email protected]>
1 parent 16ff5a5 commit ec3d9ee

File tree

5 files changed

+21
-49
lines changed

5 files changed

+21
-49
lines changed

sycl/doc/extensions/supported/sycl_ext_intel_usm_address_spaces.asciidoc

+4-15
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ supports.
8888
`sycl::ext::intel::decorated_host_ptr`, `sycl::ext::intel::device_ptr`,
8989
`sycl::ext::intel::raw_device_ptr` and `sycl::ext::intel::decorated_device_ptr`.
9090
`sycl::host_ptr` and `sycl::device_ptr` are deprecated.
91+
92+
|3
93+
|`sycl::host_ptr` and `sycl::device_ptr` are removed.
94+
9195
|===
9296

9397
== Modifications to SYCL 2020
@@ -159,21 +163,6 @@ Add `device_ptr`, `host_ptr`, `raw_device_ptr`, `raw_host_ptr`,
159163
`multi_ptr` aliases as follows:
160164
```c++
161165
namespace sycl {
162-
163-
// Deprecated.
164-
template<typename ElementType,
165-
access::decorated IsDecorated = access::decorated::legacy>
166-
using device_ptr =
167-
multi_ptr<ElementType, access::address_space::ext_intel_global_device_space,
168-
IsDecorated>
169-
170-
// Deprecated.
171-
template<typename ElementType,
172-
access::decorated IsDecorated = access::decorated::legacy>
173-
using host_ptr =
174-
multi_ptr<ElementType, access::address_space::ext_intel_global_host_space,
175-
IsDecorated>
176-
177166
namespace ext {
178167
namespace intel {
179168

sycl/include/sycl/pointers.hpp

+1-19
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88

99
#pragma once
1010

11-
#include <sycl/access/access.hpp> // for decorated, address_space
12-
#include <sycl/detail/defines_elementary.hpp> // for __SYCL_DEPRECATED
11+
#include <sycl/access/access.hpp> // for decorated, address_space
1312

1413
namespace sycl {
1514
inline namespace _V1 {
@@ -29,23 +28,6 @@ template <typename ElementType,
2928
using global_ptr =
3029
multi_ptr<ElementType, access::address_space::global_space, IsDecorated>;
3130

32-
// Note: Templated alias deprecation is not currently working in clang. See
33-
// https://github.com/llvm/llvm-project/issues/18236.
34-
template <typename ElementType,
35-
access::decorated IsDecorated = access::decorated::legacy>
36-
using device_ptr __SYCL_DEPRECATED(
37-
"Use 'sycl::ext::intel::device_ptr' instead.") =
38-
multi_ptr<ElementType, access::address_space::ext_intel_global_device_space,
39-
IsDecorated>;
40-
41-
// Note: Templated alias deprecation is not currently working in clang. See
42-
// https://github.com/llvm/llvm-project/issues/18236.
43-
template <typename ElementType,
44-
access::decorated IsDecorated = access::decorated::legacy>
45-
using host_ptr __SYCL_DEPRECATED("Use 'sycl::ext::intel::host_ptr' instead.") =
46-
multi_ptr<ElementType, access::address_space::ext_intel_global_host_space,
47-
IsDecorated>;
48-
4931
template <typename ElementType,
5032
access::decorated IsDecorated = access::decorated::legacy>
5133
using local_ptr =

sycl/source/feature_test.hpp.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ inline namespace _V1 {
6969
#define SYCL_EXT_INTEL_FPGA_REG 1
7070
#define SYCL_EXT_INTEL_KERNEL_ARGS_RESTRICT 1
7171
#define SYCL_EXT_INTEL_MEM_CHANNEL_PROPERTY 1
72-
#define SYCL_EXT_INTEL_USM_ADDRESS_SPACES 2
72+
#define SYCL_EXT_INTEL_USM_ADDRESS_SPACES 3
7373
#define SYCL_EXT_INTEL_RUNTIME_BUFFER_LOCATION 1
7474
#define SYCL_EXT_INTEL_QUEUE_INDEX 1
7575
#define SYCL_EXT_INTEL_FPGA_MEM 1

sycl/test/extensions/fpga.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ int main() {
9999
auto *in_ptr = sycl::malloc_host<int>(1, Queue.get_context());
100100
Queue.submit([&](sycl::handler &cgh) {
101101
cgh.single_task<class HostAnnotation>([=]() {
102-
sycl::host_ptr<const int> input_ptr(in_ptr);
103-
sycl::host_ptr<int> output_ptr(out_ptr);
102+
sycl::ext::intel::host_ptr<const int> input_ptr(in_ptr);
103+
sycl::ext::intel::host_ptr<int> output_ptr(out_ptr);
104104
intelfpga::lsu_body<
105105
int, sycl::access::address_space::ext_intel_global_host_space>(
106106
input_ptr, output_ptr);

sycl/test/multi_ptr/ext_addr_spaces.cpp

+13-12
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,19 @@ int main() {
1515
Q.submit([&](handler &CGH) {
1616
accessor Acc{Buf, CGH, read_write};
1717
CGH.single_task([=]() {
18-
device_ptr<int, access::decorated::yes> MPtr1{Acc};
19-
device_ptr<int, access::decorated::no> MPtr2{Acc};
20-
device_ptr<int, access::decorated::legacy> MPtr3{Acc};
21-
device_ptr<const int, access::decorated::yes> MPtr4{Acc};
22-
device_ptr<const int, access::decorated::no> MPtr5{Acc};
23-
device_ptr<const int, access::decorated::legacy> MPtr6{Acc};
24-
device_ptr<void, access::decorated::yes> MPtr7{Acc};
25-
device_ptr<void, access::decorated::no> MPtr8{Acc};
26-
device_ptr<void, access::decorated::legacy> MPtr9{Acc};
27-
device_ptr<const void, access::decorated::yes> MPtr10{Acc};
28-
device_ptr<const void, access::decorated::no> MPtr11{Acc};
29-
device_ptr<const void, access::decorated::legacy> MPtr12{Acc};
18+
ext::intel::device_ptr<int, access::decorated::yes> MPtr1{Acc};
19+
ext::intel::device_ptr<int, access::decorated::no> MPtr2{Acc};
20+
ext::intel::device_ptr<int, access::decorated::legacy> MPtr3{Acc};
21+
ext::intel::device_ptr<const int, access::decorated::yes> MPtr4{Acc};
22+
ext::intel::device_ptr<const int, access::decorated::no> MPtr5{Acc};
23+
ext::intel::device_ptr<const int, access::decorated::legacy> MPtr6{Acc};
24+
ext::intel::device_ptr<void, access::decorated::yes> MPtr7{Acc};
25+
ext::intel::device_ptr<void, access::decorated::no> MPtr8{Acc};
26+
ext::intel::device_ptr<void, access::decorated::legacy> MPtr9{Acc};
27+
ext::intel::device_ptr<const void, access::decorated::yes> MPtr10{Acc};
28+
ext::intel::device_ptr<const void, access::decorated::no> MPtr11{Acc};
29+
ext::intel::device_ptr<const void, access::decorated::legacy> MPtr12{
30+
Acc};
3031
});
3132
}).wait_and_throw();
3233
return 0;

0 commit comments

Comments
 (0)