Skip to content

Commit e290d7e

Browse files
[SYCL] Remove sycl::ext::oneapi::experimental::is_property_key (#16143)
This is an API-breaking change, but for an experimental feature and we don't expect this particular interface was used by customers.
1 parent 92ae661 commit e290d7e

30 files changed

+10
-285
lines changed

sycl/doc/extensions/experimental/sycl_ext_intel_cache_controls.asciidoc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,6 @@ inline constexpr read_hint_key::value_t<Cs...> read_hint;
196196
namespace oneapi {
197197
namespace experimental {
198198

199-
template <>
200-
struct is_property_key<intel::experimental::read_hint_key> : std::true_type {};
201199
template <typename T, typename PropertyListT>
202200
struct is_property_key_of<intel::experimental::read_hint_key,
203201
annotated_ptr<T, PropertyListT>> : std::true_type {};
@@ -261,8 +259,6 @@ inline constexpr write_hint_key::value_t<Cs...> write_hint;
261259
namespace oneapi {
262260
namespace experimental {
263261

264-
template <>
265-
struct is_property_key<intel::experimental::write_hint_key> : std::true_type {};
266262
template <typename T, typename PropertyListT>
267263
struct is_property_key_of<intel::experimental::write_hint_key,
268264
annotated_ptr<T, PropertyListT>> : std::true_type {};
@@ -336,9 +332,6 @@ inline constexpr read_assertion_key::value_t<Cs...> read_assertion;
336332
namespace oneapi {
337333
namespace experimental {
338334

339-
template <>
340-
struct is_property_key<intel::experimental::read_assertion_key>
341-
: std::true_type {};
342335
template <typename T, typename PropertyListT>
343336
struct is_property_key_of<intel::experimental::read_assertion_key,
344337
annotated_ptr<T, PropertyListT>> : std::true_type {};

sycl/doc/extensions/experimental/sycl_ext_intel_fpga_task_sequence.asciidoc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,10 +299,6 @@ inline constexpr invocation_capacity_key::value_t<Size> invocation_capacity;
299299
template <uint32_t Size>
300300
inline constexpr response_capacity_key::value_t<Size> response_capacity;
301301
302-
template <> struct is_property_key<balanced_key> : std::true_type {};
303-
template <> struct is_property_key<invocation_capacity_key> : std::true_type {};
304-
template <> struct is_property_key<response_capacity_key> : std::true_type {};
305-
306302
template <auto &f, typename PropertyListT>
307303
struct is_property_key_of<balanced_key, task_sequence<f, PropertyListT>>
308304
: std::true_type {};

sycl/doc/extensions/experimental/sycl_ext_oneapi_device_global.asciidoc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -688,11 +688,6 @@ inline constexpr implement_in_csr_key::value_t<Enable> implement_in_csr;
688688
inline constexpr implement_in_csr_key::value_t<true> implement_in_csr_on;
689689
inline constexpr implement_in_csr_key::value_t<false> implement_in_csr_off;
690690
691-
template <> struct is_property_key<device_image_scope_key> : std::true_type {};
692-
template <> struct is_property_key<host_access_key> : std::true_type {};
693-
template <> struct is_property_key<init_mode_key> : std::true_type {};
694-
template <> struct is_property_key<implement_in_csr_key> : std::true_type {};
695-
696691
template <typename T, typename PropertyListT>
697692
struct is_property_key_of<device_image_scope_key, device_global<T, PropertyListT>>
698693
: std::true_type {};

sycl/doc/extensions/experimental/sycl_ext_oneapi_kernel_arg_properties.asciidoc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,6 @@ struct restrict_key {
104104

105105
inline constexpr restrict_key::value_t restrict;
106106

107-
template<>
108-
struct is_property_key<restrict_key> : std::true_type {};
109-
110107
template<typename T, typename PropertyListT>
111108
struct is_property_key_of<
112109
restrict_key, annotated_ptr<T, PropertyListT>> : std::true_type {};
@@ -132,9 +129,6 @@ struct alignment_key {
132129
template<int K>
133130
inline constexpr alignment_key::value_t<K> alignment;
134131

135-
template<> struct is_property_key<
136-
sycl::ext::intel::experimental::alignment_key> : std::true_type {};
137-
138132
template<typename T, typename PropertyListT>
139133
struct is_property_key_of<
140134
alignment_key, annotated_ptr<T, PropertyListT>> : std::true_type {};

sycl/doc/extensions/experimental/sycl_ext_oneapi_kernel_compiler.asciidoc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -311,9 +311,6 @@ struct build_options {
311311
};
312312
using build_options_key = build_options;
313313
314-
template<>
315-
struct is_property_key<build_options_key> : std::true_type {};
316-
317314
} // namespace sycl::ext::oneapi::experimental
318315
----
319316
!====
@@ -345,9 +342,6 @@ struct save_log {
345342
};
346343
using save_log_key = save_log;
347344
348-
template<>
349-
struct is_property_key<save_log_key> : std::true_type {};
350-
351345
} // namespace sycl::ext::oneapi::experimental
352346
----
353347
!====

sycl/doc/extensions/experimental/sycl_ext_oneapi_kernel_properties.asciidoc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -181,11 +181,6 @@ inline constexpr sub_group_size_key::value_t<Size> sub_group_size;
181181
template <sycl::aspect... Aspects>
182182
inline constexpr device_has_key::value_t<Aspects...> device_has;
183183

184-
template <> struct is_property_key<work_group_size_key> : std::true_type {};
185-
template <> struct is_property_key<work_group_size_hint_key> : std::true_type {};
186-
template <> struct is_property_key<sub_group_size_key> : std::true_type {};
187-
template <> struct is_property_key<device_has_key> : std::true_type {};
188-
189184
} // namespace experimental
190185
} // namespace oneapi
191186
} // namespace ext
@@ -261,9 +256,6 @@ inline constexpr max_work_group_size_key::value_t<Dims...> max_work_group_size;
261256
template <size_t Size>
262257
inline constexpr max_linear_work_group_size_key::value_t<Size> max_linear_work_group_size;
263258

264-
template <> struct is_property_key<max_work_group_size_key> : std::true_type {};
265-
template <> struct is_property_key<max_linear_work_group_size_key> : std::true_type {};
266-
267259
} // namespace experimental
268260
} // namespace oneapi
269261
} // namespace ext

sycl/doc/extensions/experimental/sycl_ext_oneapi_properties.asciidoc

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -199,39 +199,26 @@ inline constexpr boo_key::value_t<Ts...> boo;
199199

200200
=== Property traits
201201

202-
All runtime and compile-time-constant properties must have a specialization of
203-
`is_property_key` and `is_property_value` that inherits from
204-
`std::true_type`, and they must have a specialization of `is_property_key_of`
205-
and `is_property_value_of`
206-
that inherits from `std::true_type` for each SYCL runtime class that the
207-
property can be applied to. All have a base case which inherits from `std::false_type`.
202+
Properties may add a specialization of `is_property_key_of` that inherits from
203+
`std::true_type` for each SYCL runtime class that the property can be applied
204+
to. All have a base case which inherits from `std::false_type`.
208205

209206
```c++
210207
namespace sycl::ext::oneapi::experimental {
211208
//Base case
212-
template<typename> struct is_property_key : std::false_type {};
213209
template<typename, typename> struct is_property_key_of : std::false_type {};
214210

215-
template<> struct is_property_key<foo_key> : std::true_type {};
216-
template<> struct is_property_key<bar_key> : std::true_type {};
217-
218211
// These properties can be applied to any SYCL object.
219212
template<typename SyclObjectT>
220213
struct is_property_key_of<foo_key, SyclObjectT> : std::true_type {};
221214
template<typename SyclObjectT>
222215
struct is_property_key_of<bar_key, SyclObjectT> : std::true_type {};
223216

224-
// is_property_value and is_property_value_of based on is_property_key(_of)
225-
template<typename V, typename=void> struct is_property_value;
226-
template<typename V, typename O, typename=void> struct is_property_value_of;
227-
// Specialization for runtime properties
228-
template<typename V> struct is_property_value<V, std::enable_if_t<(sizeof(V)>0)>> : is_property_key<V> {};
229-
template<typename V, typename O> struct is_property_value_of<V, O, std::enable_if_t<(sizeof(V)>0)>> : is_property_key_of<V,O> {};
230-
// Specialization for compile-time-constant properties
231-
template<typename V> struct is_property_value<V, std::void_t<typename V::key_t>> :
232-
is_property_key<typename V::key_t> {};
233-
template<typename V, typename O> struct is_property_value_of<V, O, std::void_t<typename V::key_t>> :
234-
is_property_key_of<typename V::key_t, O> {};
217+
218+
// is_property_value is provided by the properties infrastructure in implementation-defined way
219+
template<typename V> struct is_property_value;
220+
// is_property_value_of is based on is_property_key_of, implementation is provided by the properties infrastructure
221+
template<typename V, typename O> struct is_property_value_of;
235222

236223
} // namespace experimental::oneapi::ext::sycl
237224
```
@@ -636,7 +623,7 @@ This section provides more detailed information for implementers. It is non-norm
636623
Adding a new compile-time constant property requires implementers to introduce the following:
637624

638625
* A new class representing the property key
639-
* Specializations of `sycl::is_property_key` and `sycl::is_property_key_of` for the new property class
626+
* Specialization of `sycl::is_property_key_of` for the new property class
640627
* A global variable that represents an object of the property value
641628

642629
=== Example of a Compile-time Constant Property
@@ -657,10 +644,6 @@ struct foo_key {
657644
template<int K>
658645
inline constexpr foo::value_t<K> foo;
659646

660-
// foo is a property
661-
template<>
662-
struct is_property_key<foo_key> : std::true_type {};
663-
664647
// foo can be applied to any object
665648
template<typename SyclObjectT>
666649
struct is_property_key_of<foo_key, SyclObjectT> : std::true_type {};

sycl/doc/extensions/proposed/sycl_ext_intel_fpga_kernel_arg_properties.asciidoc

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -236,27 +236,6 @@ inline constexpr wait_request_key::value_t<false>
236236

237237
// Type trait specializations
238238
namespace sycl::ext::oneapi::experimental {
239-
template<> struct is_property_key<
240-
sycl::ext::intel::experimental::conduit_key> : std::true_type {};
241-
template<> struct is_property_key<
242-
sycl::ext::intel::experimental::register_map_key> : std::true_type {};
243-
template<> struct is_property_key<
244-
sycl::ext::intel::experimental::stable_key> : std::true_type {};
245-
template<> struct is_property_key<
246-
sycl::ext::intel::experimental::buffer_location_key> : std::true_type {};
247-
template<> struct is_property_key<
248-
sycl::ext::intel::experimental::awidth_key> : std::true_type {};
249-
template<> struct is_property_key<
250-
sycl::ext::intel::experimental::dwidth_key> : std::true_type {};
251-
template<> struct is_property_key<
252-
sycl::ext::intel::experimental::read_write_mode_key> : std::true_type {};
253-
template<> struct is_property_key<
254-
sycl::ext::intel::experimental::latency_key> : std::true_type {};
255-
template<> struct is_property_key<
256-
sycl::ext::intel::experimental::maxburst_key> : std::true_type {};
257-
template<> struct is_property_key<
258-
sycl::ext::intel::experimental::wait_request_key> : std::true_type {};
259-
260239
template <typename T, typename PropertyListT>
261240
struct is_property_key_of<
262241
sycl::ext::intel::experimental::conduit_key,

sycl/doc/extensions/proposed/sycl_ext_intel_fpga_kernel_interface_properties.asciidoc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,6 @@ inline constexpr fpga_cluster_key::value_t<
167167
inline constexpr fpga_cluster_key::value_t<
168168
fpga_cluster_options_enum::stall_free_clusters> stall_free_clusters;
169169

170-
template <> struct is_property_key<streaming_interface_key> : std::true_type {};
171-
template <> struct is_property_key<register_map_interface_key> : std::true_type {};
172-
template <> struct is_property_key<fpga_cluster_key> : std::true_type {};
173-
174170
} // namespace sycl::ext::intel::experimental
175171
```
176172

@@ -347,4 +343,4 @@ q.single_task(KernelFunctor{a, b, c}).wait();
347343
|1|2022-03-01|Abhishek Tiwari|*Initial public working draft*
348344
|2|2022-12-05|Abhishek Tiwari|*Make pipelined property parameter a signed int*
349345
|3|2024-01-05|Bowen Xue|*Add fpga_cluster property*
350-
|========================================
346+
|========================================

sycl/doc/extensions/proposed/sycl_ext_oneapi_forward_progress.asciidoc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -423,10 +423,6 @@ inline constexpr sub_group_progress_key::value_t<Guarantee, CoordinationScope> s
423423
template <forward_progress_guarantee Guarantee, execution_scope CoordinationScope>
424424
inline constexpr work_item_progress_key::value_t<Guarantee, CoordinationScope> work_item_progress;
425425
426-
template <> struct is_property_key<work_group_progress_key> : std::true_type {};
427-
template <> struct is_property_key<sub_group_progress_key> : std::true_type {};
428-
template <> struct is_property_key<work_item_progress_key> : std::true_type {};
429-
430426
}
431427
----
432428

0 commit comments

Comments
 (0)