Skip to content

Commit 351b123

Browse files
[SYCL] Remove and deprecate address spaces (#6606)
DPC++ has a selection of extension address spaces with deprecated namings. This commit removes these old namings for the address spaces. Additionally, this PR adds a deprecation warning for sycl::access::address_space::constant_space as it is deprecated in SYCL2020. Signed-off-by: Larsen, Steffen <[email protected]>
1 parent 52feab3 commit 351b123

File tree

3 files changed

+9
-16
lines changed

3 files changed

+9
-16
lines changed

sycl/include/sycl/access/access.hpp

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,12 @@ enum class placeholder { false_t = 0, true_t = 1 };
4545
enum class address_space : int {
4646
private_space = 0,
4747
global_space = 1,
48-
constant_space = 2,
48+
constant_space __SYCL2020_DEPRECATED("sycl::access::address_space::constant_"
49+
"space is deprecated since SYCL 2020") =
50+
2,
4951
local_space = 3,
5052
ext_intel_global_device_space = 4,
5153
ext_intel_global_host_space = 5,
52-
global_device_space __SYCL2020_DEPRECATED(
53-
"use 'ext_intel_global_device_space' instead") =
54-
ext_intel_global_device_space,
55-
global_host_space __SYCL2020_DEPRECATED(
56-
"use 'ext_intel_global_host_space' instead") =
57-
ext_intel_global_host_space,
58-
ext_intel_host_device_space __SYCL2020_DEPRECATED(
59-
"use 'ext_intel_global_host_space' instead") =
60-
ext_intel_global_host_space,
6154
generic_space = 6, // TODO generic_space address space is not supported yet
6255
};
6356

sycl/test/basic_tests/address_space_traits.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ int main() {
2727
"Unexpected address space");
2828
static_assert(
2929
detail::deduce_AS<__attribute__((opencl_global_device)) int>::value ==
30-
access::address_space::global_device_space,
30+
access::address_space::ext_intel_global_device_space,
3131
"Unexpected address space");
3232
static_assert(
3333
detail::deduce_AS<__attribute__((opencl_global_host)) int>::value ==
34-
access::address_space::global_host_space,
34+
access::address_space::ext_intel_global_host_space,
3535
"Unexpected address space");
3636
});
3737
});

sycl/test/extensions/fpga.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ int main() {
100100
cgh.single_task<class HostAnnotation>([=]() {
101101
sycl::host_ptr<int> input_ptr(in_ptr);
102102
sycl::host_ptr<int> output_ptr(out_ptr);
103-
intelfpga::lsu_body<int,
104-
sycl::access::address_space::global_host_space>(
103+
intelfpga::lsu_body<
104+
int, sycl::access::address_space::ext_intel_global_host_space>(
105105
input_ptr, output_ptr);
106106
});
107107
});
@@ -113,8 +113,8 @@ int main() {
113113
cgh.single_task<class DeviceAnnotation>([=]() {
114114
sycl::device_ptr<int> input_ptr(in_ptr);
115115
sycl::device_ptr<int> output_ptr(out_ptr);
116-
intelfpga::lsu_body<int,
117-
sycl::access::address_space::global_device_space>(
116+
intelfpga::lsu_body<
117+
int, sycl::access::address_space::ext_intel_global_device_space>(
118118
input_ptr, output_ptr);
119119
});
120120
});

0 commit comments

Comments
 (0)