Skip to content

Commit 93d747f

Browse files
[SYCL] Remove incorrect property traits for image_accessor (#7176)
That class is sycl::detail::image_accessor, not visible in public SYCL APIs yet we confused it thinking it's sycl::image_accessor. In reality it's used in the implementation of sycl::accessor specialization for access::target::image so the properties are covered by property traits for sycl::accessor.
1 parent bd03e0d commit 93d747f

File tree

2 files changed

+0
-36
lines changed

2 files changed

+0
-36
lines changed

sycl/include/sycl/properties/accessor_properties.hpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,6 @@ template <typename DataT, int Dimensions, access::mode AccessMode,
118118
access::target AccessTarget, access::placeholder IsPlaceholder,
119119
typename PropertyListT>
120120
class accessor;
121-
template <typename DataT, int Dimensions, access::mode AccessMode,
122-
access::target AccessTarget, access::placeholder IsPlaceholder>
123-
class image_accessor;
124121
template <typename DataT, int Dimensions, access::mode AccessMode>
125122
class host_accessor;
126123

@@ -168,19 +165,6 @@ struct is_property_of<ext::intel::property::buffer_location,
168165
IsPlaceholder, PropertyListT>> : std::true_type {
169166
};
170167

171-
template <typename DataT, int Dimensions, access::mode AccessMode,
172-
access::target AccessTarget, access::placeholder IsPlaceholder>
173-
struct is_property_of<
174-
property::noinit,
175-
image_accessor<DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder>>
176-
: std::true_type {};
177-
template <typename DataT, int Dimensions, access::mode AccessMode,
178-
access::target AccessTarget, access::placeholder IsPlaceholder>
179-
struct is_property_of<
180-
property::no_init,
181-
image_accessor<DataT, Dimensions, AccessMode, AccessTarget, IsPlaceholder>>
182-
: std::true_type {};
183-
184168
template <typename DataT, int Dimensions, access::mode AccessMode>
185169
struct is_property_of<property::noinit,
186170
host_accessor<DataT, Dimensions, AccessMode>>

sycl/test/basic_tests/property_traits.cpp

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,6 @@ int main() {
107107
accessor<sycl::half, 2, access_mode::write, target::host_buffer,
108108
access::placeholder::false_t>);
109109

110-
// Image-accessor is_property_of
111-
CHECK_IS_PROPERTY_OF(
112-
property::no_init,
113-
image_accessor<unsigned long, 2, access_mode::read, target::host_buffer,
114-
access::placeholder::true_t>);
115-
116110
// Host-accessor is_property_of
117111
CHECK_IS_PROPERTY_OF(property::no_init,
118112
host_accessor<unsigned long, 2, access_mode::read>);
@@ -177,10 +171,6 @@ int main() {
177171

178172
// Invalid properties with valid object type
179173
CHECK_IS_NOT_PROPERTY_OF(NotAProperty, accessor<int, 1>);
180-
CHECK_IS_NOT_PROPERTY_OF(
181-
NotAProperty,
182-
image_accessor<float, 2, access_mode::read, target::host_buffer,
183-
access::placeholder::true_t>);
184174
CHECK_IS_NOT_PROPERTY_OF(NotAProperty, host_accessor<char, 2>);
185175
CHECK_IS_NOT_PROPERTY_OF(NotAProperty, buffer<int, 2>);
186176
CHECK_IS_NOT_PROPERTY_OF(NotAProperty, context);
@@ -249,12 +239,6 @@ int main() {
249239
accessor<sycl::half, 2, access_mode::write, target::host_buffer,
250240
access::placeholder::false_t>);
251241

252-
// Image-accessor is_property_of_v
253-
CHECK_IS_PROPERTY_OF_V(
254-
property::no_init,
255-
image_accessor<unsigned long, 2, access_mode::read, target::host_buffer,
256-
access::placeholder::true_t>);
257-
258242
// Host-accessor is_property_of_v
259243
CHECK_IS_PROPERTY_OF_V(property::no_init,
260244
host_accessor<unsigned long, 2, access_mode::read>);
@@ -322,10 +306,6 @@ int main() {
322306

323307
// Invalid properties with valid object type
324308
CHECK_IS_NOT_PROPERTY_OF_V(NotAProperty, accessor<int, 1>);
325-
CHECK_IS_NOT_PROPERTY_OF_V(
326-
NotAProperty,
327-
image_accessor<float, 2, access_mode::read, target::host_buffer,
328-
access::placeholder::true_t>);
329309
CHECK_IS_NOT_PROPERTY_OF_V(NotAProperty, host_accessor<char, 2>);
330310
CHECK_IS_NOT_PROPERTY_OF_V(NotAProperty, buffer<int, 2>);
331311
CHECK_IS_NOT_PROPERTY_OF_V(NotAProperty, context);

0 commit comments

Comments
 (0)