Skip to content

Commit 9352172

Browse files
[SYCL] Add mem_channel to properties in properties_traits.def (#10028)
The mem_channel property was not correctly added to sycl/include/sycl/detail/properties_traits.def which cause get_property and has_property to fail to link due to missing symbols. This commit add the mem_channel property to the file to correctly specialize the corresponding functions. --------- Signed-off-by: Larsen, Steffen <[email protected]>
1 parent fd59777 commit 9352172

File tree

4 files changed

+27
-0
lines changed

4 files changed

+27
-0
lines changed

sycl/include/sycl/detail/properties_traits.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ __SYCL_PARAM_TRAITS_SPEC(sycl::property::reduction::initialize_to_identity)
1717
__SYCL_PARAM_TRAITS_SPEC(sycl::ext::oneapi::property::queue::priority_low)
1818
__SYCL_PARAM_TRAITS_SPEC(sycl::ext::oneapi::property::queue::priority_high)
1919
__SYCL_PARAM_TRAITS_SPEC(sycl::ext::oneapi::property::queue::priority_normal)
20+
__SYCL_PARAM_TRAITS_SPEC(sycl::property::buffer::mem_channel)

sycl/test/abi/sycl_symbols_linux.dump

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4185,6 +4185,7 @@ _ZNK4sycl3_V16detail11image_plain12get_propertyINS0_8property5image12use_host_pt
41854185
_ZNK4sycl3_V16detail11image_plain12get_propertyINS0_8property5image13context_boundEEET_v
41864186
_ZNK4sycl3_V16detail11image_plain12get_propertyINS0_8property5image9use_mutexEEET_v
41874187
_ZNK4sycl3_V16detail11image_plain12get_propertyINS0_8property5queue8in_orderEEET_v
4188+
_ZNK4sycl3_V16detail11image_plain12get_propertyINS0_8property6buffer11mem_channelEEET_v
41884189
_ZNK4sycl3_V16detail11image_plain12get_propertyINS0_8property6buffer12use_host_ptrEEET_v
41894190
_ZNK4sycl3_V16detail11image_plain12get_propertyINS0_8property6buffer13context_boundEEET_v
41904191
_ZNK4sycl3_V16detail11image_plain12get_propertyINS0_8property6buffer9use_mutexEEET_v
@@ -4201,6 +4202,7 @@ _ZNK4sycl3_V16detail11image_plain12has_propertyINS0_8property5image12use_host_pt
42014202
_ZNK4sycl3_V16detail11image_plain12has_propertyINS0_8property5image13context_boundEEEbv
42024203
_ZNK4sycl3_V16detail11image_plain12has_propertyINS0_8property5image9use_mutexEEEbv
42034204
_ZNK4sycl3_V16detail11image_plain12has_propertyINS0_8property5queue8in_orderEEEbv
4205+
_ZNK4sycl3_V16detail11image_plain12has_propertyINS0_8property6buffer11mem_channelEEEbv
42044206
_ZNK4sycl3_V16detail11image_plain12has_propertyINS0_8property6buffer12use_host_ptrEEEbv
42054207
_ZNK4sycl3_V16detail11image_plain12has_propertyINS0_8property6buffer13context_boundEEEbv
42064208
_ZNK4sycl3_V16detail11image_plain12has_propertyINS0_8property6buffer9use_mutexEEEbv
@@ -4230,6 +4232,7 @@ _ZNK4sycl3_V16detail12buffer_plain12get_propertyINS0_8property5image12use_host_p
42304232
_ZNK4sycl3_V16detail12buffer_plain12get_propertyINS0_8property5image13context_boundEEET_v
42314233
_ZNK4sycl3_V16detail12buffer_plain12get_propertyINS0_8property5image9use_mutexEEET_v
42324234
_ZNK4sycl3_V16detail12buffer_plain12get_propertyINS0_8property5queue8in_orderEEET_v
4235+
_ZNK4sycl3_V16detail12buffer_plain12get_propertyINS0_8property6buffer11mem_channelEEET_v
42334236
_ZNK4sycl3_V16detail12buffer_plain12get_propertyINS0_8property6buffer12use_host_ptrEEET_v
42344237
_ZNK4sycl3_V16detail12buffer_plain12get_propertyINS0_8property6buffer13context_boundEEET_v
42354238
_ZNK4sycl3_V16detail12buffer_plain12get_propertyINS0_8property6buffer9use_mutexEEET_v
@@ -4246,6 +4249,7 @@ _ZNK4sycl3_V16detail12buffer_plain12has_propertyINS0_8property5image12use_host_p
42464249
_ZNK4sycl3_V16detail12buffer_plain12has_propertyINS0_8property5image13context_boundEEEbv
42474250
_ZNK4sycl3_V16detail12buffer_plain12has_propertyINS0_8property5image9use_mutexEEEbv
42484251
_ZNK4sycl3_V16detail12buffer_plain12has_propertyINS0_8property5queue8in_orderEEEbv
4252+
_ZNK4sycl3_V16detail12buffer_plain12has_propertyINS0_8property6buffer11mem_channelEEEbv
42494253
_ZNK4sycl3_V16detail12buffer_plain12has_propertyINS0_8property6buffer12use_host_ptrEEEbv
42504254
_ZNK4sycl3_V16detail12buffer_plain12has_propertyINS0_8property6buffer13context_boundEEEbv
42514255
_ZNK4sycl3_V16detail12buffer_plain12has_propertyINS0_8property6buffer9use_mutexEEEbv
@@ -4483,6 +4487,7 @@ _ZNK4sycl3_V16stream12get_propertyINS0_8property5image12use_host_ptrEEET_v
44834487
_ZNK4sycl3_V16stream12get_propertyINS0_8property5image13context_boundEEET_v
44844488
_ZNK4sycl3_V16stream12get_propertyINS0_8property5image9use_mutexEEET_v
44854489
_ZNK4sycl3_V16stream12get_propertyINS0_8property5queue8in_orderEEET_v
4490+
_ZNK4sycl3_V16stream12get_propertyINS0_8property6buffer11mem_channelEEET_v
44864491
_ZNK4sycl3_V16stream12get_propertyINS0_8property6buffer12use_host_ptrEEET_v
44874492
_ZNK4sycl3_V16stream12get_propertyINS0_8property6buffer13context_boundEEET_v
44884493
_ZNK4sycl3_V16stream12get_propertyINS0_8property6buffer9use_mutexEEET_v
@@ -4499,6 +4504,7 @@ _ZNK4sycl3_V16stream12has_propertyINS0_8property5image12use_host_ptrEEEbv
44994504
_ZNK4sycl3_V16stream12has_propertyINS0_8property5image13context_boundEEEbv
45004505
_ZNK4sycl3_V16stream12has_propertyINS0_8property5image9use_mutexEEEbv
45014506
_ZNK4sycl3_V16stream12has_propertyINS0_8property5queue8in_orderEEEbv
4507+
_ZNK4sycl3_V16stream12has_propertyINS0_8property6buffer11mem_channelEEEbv
45024508
_ZNK4sycl3_V16stream12has_propertyINS0_8property6buffer12use_host_ptrEEEbv
45034509
_ZNK4sycl3_V16stream12has_propertyINS0_8property6buffer13context_boundEEEbv
45044510
_ZNK4sycl3_V16stream12has_propertyINS0_8property6buffer9use_mutexEEEbv
@@ -4524,6 +4530,7 @@ _ZNK4sycl3_V17context12get_propertyINS0_8property5image12use_host_ptrEEET_v
45244530
_ZNK4sycl3_V17context12get_propertyINS0_8property5image13context_boundEEET_v
45254531
_ZNK4sycl3_V17context12get_propertyINS0_8property5image9use_mutexEEET_v
45264532
_ZNK4sycl3_V17context12get_propertyINS0_8property5queue8in_orderEEET_v
4533+
_ZNK4sycl3_V17context12get_propertyINS0_8property6buffer11mem_channelEEET_v
45274534
_ZNK4sycl3_V17context12get_propertyINS0_8property6buffer12use_host_ptrEEET_v
45284535
_ZNK4sycl3_V17context12get_propertyINS0_8property6buffer13context_boundEEET_v
45294536
_ZNK4sycl3_V17context12get_propertyINS0_8property6buffer9use_mutexEEET_v
@@ -4540,6 +4547,7 @@ _ZNK4sycl3_V17context12has_propertyINS0_8property5image12use_host_ptrEEEbv
45404547
_ZNK4sycl3_V17context12has_propertyINS0_8property5image13context_boundEEEbv
45414548
_ZNK4sycl3_V17context12has_propertyINS0_8property5image9use_mutexEEEbv
45424549
_ZNK4sycl3_V17context12has_propertyINS0_8property5queue8in_orderEEEbv
4550+
_ZNK4sycl3_V17context12has_propertyINS0_8property6buffer11mem_channelEEEbv
45434551
_ZNK4sycl3_V17context12has_propertyINS0_8property6buffer12use_host_ptrEEEbv
45444552
_ZNK4sycl3_V17context12has_propertyINS0_8property6buffer13context_boundEEEbv
45454553
_ZNK4sycl3_V17context12has_propertyINS0_8property6buffer9use_mutexEEEbv
@@ -4569,6 +4577,7 @@ _ZNK4sycl3_V17sampler12get_propertyINS0_8property5image12use_host_ptrEEET_v
45694577
_ZNK4sycl3_V17sampler12get_propertyINS0_8property5image13context_boundEEET_v
45704578
_ZNK4sycl3_V17sampler12get_propertyINS0_8property5image9use_mutexEEET_v
45714579
_ZNK4sycl3_V17sampler12get_propertyINS0_8property5queue8in_orderEEET_v
4580+
_ZNK4sycl3_V17sampler12get_propertyINS0_8property6buffer11mem_channelEEET_v
45724581
_ZNK4sycl3_V17sampler12get_propertyINS0_8property6buffer12use_host_ptrEEET_v
45734582
_ZNK4sycl3_V17sampler12get_propertyINS0_8property6buffer13context_boundEEET_v
45744583
_ZNK4sycl3_V17sampler12get_propertyINS0_8property6buffer9use_mutexEEET_v
@@ -4585,6 +4594,7 @@ _ZNK4sycl3_V17sampler12has_propertyINS0_8property5image12use_host_ptrEEEbv
45854594
_ZNK4sycl3_V17sampler12has_propertyINS0_8property5image13context_boundEEEbv
45864595
_ZNK4sycl3_V17sampler12has_propertyINS0_8property5image9use_mutexEEEbv
45874596
_ZNK4sycl3_V17sampler12has_propertyINS0_8property5queue8in_orderEEEbv
4597+
_ZNK4sycl3_V17sampler12has_propertyINS0_8property6buffer11mem_channelEEEbv
45884598
_ZNK4sycl3_V17sampler12has_propertyINS0_8property6buffer12use_host_ptrEEEbv
45894599
_ZNK4sycl3_V17sampler12has_propertyINS0_8property6buffer13context_boundEEEbv
45904600
_ZNK4sycl3_V17sampler12has_propertyINS0_8property6buffer9use_mutexEEEbv

sycl/test/abi/sycl_symbols_windows.dump

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,11 @@
228228
??$get_property@Vinitialize_to_identity@reduction@property@_V1@sycl@@@image_plain@detail@_V1@sycl@@IEBA?AVinitialize_to_identity@reduction@property@23@XZ
229229
??$get_property@Vinitialize_to_identity@reduction@property@_V1@sycl@@@sampler@_V1@sycl@@QEBA?AVinitialize_to_identity@reduction@property@12@XZ
230230
??$get_property@Vinitialize_to_identity@reduction@property@_V1@sycl@@@stream@_V1@sycl@@QEBA?AVinitialize_to_identity@reduction@property@12@XZ
231+
??$get_property@Vmem_channel@buffer@property@_V1@sycl@@@sampler@_V1@sycl@@QEBA?AVmem_channel@buffer@property@12@XZ
232+
??$get_property@Vmem_channel@buffer@property@_V1@sycl@@@buffer_plain@detail@_V1@sycl@@IEBA?AVmem_channel@buffer@property@23@XZ
233+
??$get_property@Vmem_channel@buffer@property@_V1@sycl@@@image_plain@detail@_V1@sycl@@IEBA?AVmem_channel@buffer@property@23@XZ
234+
??$get_property@Vmem_channel@buffer@property@_V1@sycl@@@context@_V1@sycl@@QEBA?AVmem_channel@buffer@property@12@XZ
235+
??$get_property@Vmem_channel@buffer@property@_V1@sycl@@@stream@_V1@sycl@@QEBA?AVmem_channel@buffer@property@12@XZ
231236
??$get_property@Vno_init@property@_V1@sycl@@@buffer_plain@detail@_V1@sycl@@IEBA?AVno_init@property@23@XZ
232237
??$get_property@Vno_init@property@_V1@sycl@@@context@_V1@sycl@@QEBA?AVno_init@property@12@XZ
233238
??$get_property@Vno_init@property@_V1@sycl@@@image_plain@detail@_V1@sycl@@IEBA?AVno_init@property@23@XZ
@@ -317,6 +322,11 @@
317322
??$has_property@Vinitialize_to_identity@reduction@property@_V1@sycl@@@image_plain@detail@_V1@sycl@@IEBA_NXZ
318323
??$has_property@Vinitialize_to_identity@reduction@property@_V1@sycl@@@sampler@_V1@sycl@@QEBA_NXZ
319324
??$has_property@Vinitialize_to_identity@reduction@property@_V1@sycl@@@stream@_V1@sycl@@QEBA_NXZ
325+
??$has_property@Vmem_channel@buffer@property@_V1@sycl@@@context@_V1@sycl@@QEBA_NXZ
326+
??$has_property@Vmem_channel@buffer@property@_V1@sycl@@@stream@_V1@sycl@@QEBA_NXZ
327+
??$has_property@Vmem_channel@buffer@property@_V1@sycl@@@sampler@_V1@sycl@@QEBA_NXZ
328+
??$has_property@Vmem_channel@buffer@property@_V1@sycl@@@image_plain@detail@_V1@sycl@@IEBA_NXZ
329+
??$has_property@Vmem_channel@buffer@property@_V1@sycl@@@buffer_plain@detail@_V1@sycl@@IEBA_NXZ
320330
??$has_property@Vno_init@property@_V1@sycl@@@buffer_plain@detail@_V1@sycl@@IEBA_NXZ
321331
??$has_property@Vno_init@property@_V1@sycl@@@context@_V1@sycl@@QEBA_NXZ
322332
??$has_property@Vno_init@property@_V1@sycl@@@image_plain@detail@_V1@sycl@@IEBA_NXZ

sycl/unittests/buffer/MemChannel.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ TEST_F(BufferMemChannelTest, MemChannelProp) {
9797

9898
sycl::queue Q{Plt.get_devices()[0]};
9999
sycl::buffer<int, 1> Buf(3, sycl::property::buffer::mem_channel{42});
100+
101+
ASSERT_TRUE(Buf.has_property<sycl::property::buffer::mem_channel>());
102+
ASSERT_EQ(
103+
Buf.get_property<sycl::property::buffer::mem_channel>().get_channel(),
104+
(uint32_t)42);
105+
100106
Q.submit([&](sycl::handler &CGH) {
101107
sycl::accessor Acc{Buf, CGH, sycl::read_write};
102108
constexpr size_t KS = sizeof(decltype(Acc));

0 commit comments

Comments
 (0)