Skip to content

Commit 5237f69

Browse files
author
Victor Lomuller
committed
Create hybrid runtime prop with compile time info
1 parent 986c9ff commit 5237f69

File tree

4 files changed

+7
-15
lines changed

4 files changed

+7
-15
lines changed

sycl/cmake/modules/UnifiedRuntimeTag.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
# Date: Thu Nov 7 11:43:19 2024 +0000
55
# Merge pull request #2233 from martygrant/martin/memory-cts-spec-gap-2
66
# Improvements to align CTS and Spec for Memory
7-
set(UNIFIED_RUNTIME_TAG 09ae26af4e4e4301177db704b3b109ecd388c846)
7+
set(UNIFIED_RUNTIME_TAG 09d658fe3dba98454e0eaec9cfac6cdfed7acbbf)

sycl/include/sycl/ext/oneapi/properties/properties.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,7 @@ template <typename PropertiesT> class properties {
233233
template <typename PropertyT>
234234
static constexpr auto
235235
get_property(typename std::enable_if_t<
236-
detail::IsCompileTimeProperty<PropertyT>::value &&
237-
!detail::IsRuntimeProperty<PropertyT>::value> * = 0) {
236+
detail::IsCompileTimeProperty<PropertyT>::value> * = 0) {
238237
static_assert(has_property<PropertyT>(),
239238
"Property list does not contain the requested property.");
240239
return detail::get_property<PropertyT, has_property<PropertyT>(),

sycl/include/sycl/ext/oneapi/properties/property.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,6 @@ struct property_base : property_tag {
241241

242242
struct property_key_base_tag {};
243243
struct compile_time_property_key_base_tag : property_key_base_tag {};
244-
struct run_time_property_key_base_tag : property_key_base_tag {};
245244

246245
template <typename property_t, PropKind Kind_>
247246
struct run_time_property_key : property_key_base_tag,
@@ -273,7 +272,7 @@ template <typename PropertyT>
273272
struct IsRuntimeProperty
274273
: std::bool_constant<
275274
std::is_base_of_v<property_key_base_tag, PropertyT> &&
276-
std::is_base_of_v<run_time_property_key_base_tag, PropertyT>> {};
275+
!std::is_base_of_v<compile_time_property_key_base_tag, PropertyT>> {};
277276

278277
// Trait for identifying compile-time properties.
279278
template <typename PropertyT>

sycl/include/sycl/ext/oneapi/work_group_scratch_memory.hpp

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,18 @@ inline void *get_work_group_scratch_memory() {
2828
}
2929

3030
// Property
31-
struct work_group_scratch_size_key
32-
: ::sycl::ext::oneapi::experimental::detail::compile_time_property_key<
33-
::sycl::ext::oneapi::experimental::detail::WorkGroupStaticMem>,
34-
property_value<work_group_scratch_size_key> {
35-
using value_t = property_value<work_group_scratch_size_key>;
36-
};
37-
3831
struct work_group_scratch_size
3932
: ::sycl::ext::oneapi::experimental::detail::run_time_property_key<
40-
::sycl::ext::oneapi::experimental::detail::WorkGroupStaticMem>,
41-
work_group_scratch_size_key {
42-
using value_t = work_group_scratch_size_key::value_t;
33+
work_group_scratch_size,
34+
::sycl::ext::oneapi::experimental::detail::WorkGroupStaticMem> {
4335
// Runtime property part
4436
constexpr work_group_scratch_size(size_t bytes) : size(bytes) {}
4537

4638
size_t size;
4739
};
4840

41+
using work_group_scratch_size_key = work_group_scratch_size;
42+
4943
template <> struct is_property_key<work_group_scratch_size> : std::true_type {};
5044

5145
template <>

0 commit comments

Comments
 (0)