From df82c125289186fdc4ad1f6045ccce17f976f20f Mon Sep 17 00:00:00 2001 From: Andrei Elovikov Date: Mon, 28 Oct 2024 15:30:13 -0700 Subject: [PATCH] [SYCL] Modernize prefetch property_key creation Simplified key creation was introduced in https://github.com/intel/llvm/pull/12831 but this one was never updated. I think it happened because this property never defined `PropKind` enum entry and I'm not even sure how it worked or what are scenarios where it was broken. Regardless, fix and unify with all other properties with this PR. --- sycl/include/sycl/ext/oneapi/experimental/prefetch.hpp | 5 ++--- sycl/include/sycl/ext/oneapi/properties/property.hpp | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sycl/include/sycl/ext/oneapi/experimental/prefetch.hpp b/sycl/include/sycl/ext/oneapi/experimental/prefetch.hpp index c5be683830183..441e32a085990 100644 --- a/sycl/include/sycl/ext/oneapi/experimental/prefetch.hpp +++ b/sycl/include/sycl/ext/oneapi/experimental/prefetch.hpp @@ -20,7 +20,8 @@ enum class cache_level { L1 = 0, L2 = 1, L3 = 2, L4 = 3 }; struct nontemporal; -struct prefetch_hint_key { +struct prefetch_hint_key + : detail::compile_time_property_key { template using value_t = property_value namespace detail { using namespace sycl::detail; -template <> struct IsCompileTimeProperty : std::true_type {}; - template struct PropertyMetaInfo> { static constexpr const char *name = std::is_same_v diff --git a/sycl/include/sycl/ext/oneapi/properties/property.hpp b/sycl/include/sycl/ext/oneapi/properties/property.hpp index 33228130ec36d..a8bfb890b5753 100644 --- a/sycl/include/sycl/ext/oneapi/properties/property.hpp +++ b/sycl/include/sycl/ext/oneapi/properties/property.hpp @@ -214,8 +214,9 @@ enum PropKind : uint32_t { ResponseCapacity = 73, MaxWorkGroupSize = 74, MaxLinearWorkGroupSize = 75, + Prefetch = 76, // PropKindSize must always be the last value. - PropKindSize = 76, + PropKindSize = 77, }; struct property_key_base_tag {};