Skip to content

Commit 3e84c77

Browse files
committed
Merge remote-tracking branch 'origin/sycl' into persistent_multi_device
2 parents c11ed25 + 7c22afe commit 3e84c77

File tree

99 files changed

+1180
-948
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+1180
-948
lines changed

.github/workflows/sycl-post-commit.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@ on:
2020
- ./devops/actions/cached_checkout
2121

2222
concurrency:
23-
# Cancel a currently running workflow from the same PR or commit hash.
24-
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
23+
# Cancel a currently running workflow from the same PR or commit hash.
24+
# We need to use the user's branch name (which is in different variables
25+
# for pull request events and push events) so that making a PR from a
26+
# sycl-devops-pr branch doesn't cause two postcommit runs.
27+
group: "${{ github.actor }}-${{ github.head_ref || github.ref_name }}"
2528
cancel-in-progress: true
2629

2730
permissions: read-all

clang/lib/Sema/SemaAccess.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ static AccessResult IsDerivedFromInclusive(const CXXRecordDecl *Derived,
301301
const CXXRecordDecl *Target) {
302302
assert(Derived->getCanonicalDecl() == Derived);
303303
assert(Target->getCanonicalDecl() == Target);
304+
assert(Derived->getDefinition() && "Expecting a complete type");
304305

305306
if (Derived == Target) return AR_accessible;
306307

@@ -776,6 +777,8 @@ static AccessResult HasAccess(Sema &S,
776777
// [B3] and [M3]
777778
} else {
778779
assert(Access == AS_protected);
780+
if (!ECRecord->getDefinition())
781+
continue;
779782
switch (IsDerivedFromInclusive(ECRecord, NamingClass)) {
780783
case AR_accessible: break;
781784
case AR_inaccessible: continue;

clang/test/SemaSYCL/attr-add-ir-attributes.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,3 +991,16 @@ struct __attribute__((sycl_special_class)) InvalidSpecialClassStruct32 {
991991
struct [[__sycl_detail__::add_ir_attributes_kernel_parameter("Attr1", 1)]] InvalidKernelParameterSubjectStruct; // expected-error {{'add_ir_attributes_kernel_parameter' attribute only applies to parameters}}
992992
[[__sycl_detail__::add_ir_attributes_kernel_parameter("Attr1", 1)]] void InvalidKernelParameterSubjectFunction() {} // expected-error {{'add_ir_attributes_kernel_parameter' attribute only applies to parameters}}
993993
[[__sycl_detail__::add_ir_attributes_kernel_parameter("Attr1", 1)]] int InvalidKernelParameterSubjectVar; // expected-error {{'add_ir_attributes_kernel_parameter' attribute only applies to parameters}}
994+
995+
struct A {
996+
protected:
997+
static constexpr const char *ir_attribute_name = ""; // expected-note {{declared protected here}}
998+
static constexpr auto ir_attribute_value = nullptr; // expected-note {{declared protected here}}
999+
};
1000+
1001+
template <typename Ts>
1002+
struct [[__sycl_detail__::add_ir_attributes_global_variable(
1003+
Ts::ir_attribute_name, Ts::ir_attribute_value)]] B { // expected-error {{'ir_attribute_name' is a protected member of 'A'}} // expected-error {{'ir_attribute_value' is a protected member of 'A'}}
1004+
};
1005+
1006+
B<A> v; // expected-note {{in instantiation of template class 'B<A>' requested here}}

clang/tools/clang-offload-wrapper/ClangOffloadWrapper.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1359,6 +1359,9 @@ class BinaryWrapper {
13591359
ObjcopyPath = *ObjcopyPathOrErr;
13601360
}
13611361

1362+
BinaryWrapper(const BinaryWrapper &BW) = delete;
1363+
BinaryWrapper &operator=(const BinaryWrapper &BW) = delete;
1364+
13621365
~BinaryWrapper() {
13631366
if (TempFiles.empty())
13641367
return;

devops/scripts/install_drivers.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,9 @@ InstallIGFX () {
143143
echo "Download IGC dev git hash $IGC_DEV_VER"
144144
get_pre_release_igfx $IGC_DEV_URL $IGC_DEV_VER
145145
echo "Install IGC dev git hash $IGC_DEV_VER"
146-
dpkg -i *.deb
146+
# New dev IGC packaged iga64 conflicting with iga64 from intel-igc-media
147+
# force overwrite to workaround it first.
148+
dpkg -i --force-overwrite *.deb
147149
echo "Install libopencl-clang"
148150
# Workaround only, will download deb and install with dpkg once fixed.
149151
cp -d libopencl-clang.so.14* /usr/local/lib/
Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
# commit 3e1a0ea44842b10cfdc0e1e98af2eee8fcd8e937 (HEAD -> main)
2-
# Author: Artur Gainullin <[email protected]>
3-
# Date: Wed Nov 6 16:05:50 2024 -0800
4-
#
5-
# [L0] Fix binary sizes and binaries returned by urProgramGetInfo
6-
#
7-
# Currently urProgramGetInfo will return UR_INVALID_PROGRAM is program is
8-
# compiled only for a subset of associated devices, i.e. not all devices
9-
# have level zero module and binaries. This PR fixes this behaviour.
10-
set(UNIFIED_RUNTIME_TAG 3e1a0ea44842b10cfdc0e1e98af2eee8fcd8e937)
1+
# commit 3a5b23c8b475712f9107c1d5ab41f27a1465578e
2+
# Merge: f9f71f17 1696524d
3+
# Author: Piotr Balcer <[email protected]>
4+
# Date: Thu Nov 14 14:38:05 2024 +0100
5+
# Merge pull request #2253 from pbalcer/low-power-events
6+
# add low-power events experimental extension spec
7+
set(UNIFIED_RUNTIME_TAG 3a5b23c8b475712f9107c1d5ab41f27a1465578e)

sycl/include/sycl/ext/intel/esimd/memory_properties.hpp

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ class properties
7777
// Deduction guides
7878
template <typename... PropertyValueTs>
7979
properties(PropertyValueTs... props)
80-
-> properties<typename sycl::ext::oneapi::experimental::detail::Sorted<
81-
PropertyValueTs...>::type>;
80+
-> properties<typename sycl::ext::oneapi::experimental::detail::
81+
properties_sorter<PropertyValueTs...>::type>;
8282
#endif
8383

8484
/// The 'alignment' property is used to specify the alignment of memory
@@ -238,13 +238,17 @@ template <typename PropertyListT> struct remove_alignment_property {
238238
};
239239
template <size_t Alignment, typename... LastTs>
240240
struct remove_alignment_property<
241-
properties<std::tuple<alignment_key::value_t<Alignment>, LastTs...>>> {
242-
using type = properties<std::tuple<LastTs...>>;
241+
properties<oneapi::experimental::detail::properties_type_list<
242+
alignment_key::value_t<Alignment>, LastTs...>>> {
243+
using type =
244+
properties<oneapi::experimental::detail::properties_type_list<LastTs...>>;
243245
};
244246
template <typename FirstT, size_t Alignment, typename... LastTs>
245-
struct remove_alignment_property<properties<
246-
std::tuple<FirstT, alignment_key::value_t<Alignment>, LastTs...>>> {
247-
using type = properties<std::tuple<FirstT, LastTs...>>;
247+
struct remove_alignment_property<
248+
properties<oneapi::experimental::detail::properties_type_list<
249+
FirstT, alignment_key::value_t<Alignment>, LastTs...>>> {
250+
using type = properties<
251+
oneapi::experimental::detail::properties_type_list<FirstT, LastTs...>>;
248252
};
249253
template <typename PropertyListT>
250254
using remove_alignment_property_t =
@@ -323,8 +327,11 @@ struct property_value<__ESIMD_NS::cache_hint_L3_key,
323327

324328
// Declare that esimd::properties is a property_list.
325329
template <typename... PropertyValueTs>
326-
struct is_property_list<__ESIMD_NS::properties<std::tuple<PropertyValueTs...>>>
327-
: is_property_list<properties<std::tuple<PropertyValueTs...>>> {};
330+
struct is_property_list<__ESIMD_NS::properties<
331+
oneapi::experimental::detail::properties_type_list<PropertyValueTs...>>>
332+
: is_property_list<
333+
properties<oneapi::experimental::detail::properties_type_list<
334+
PropertyValueTs...>>> {};
328335

329336
namespace detail {
330337
// We do not override the class ConflictingProperties for cache_hint properties

sycl/include/sycl/ext/oneapi/experimental/annotated_arg/annotated_arg.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ annotated_arg(T, Args...)
6666
-> annotated_arg<T, typename detail::DeducedProperties<Args...>::type>;
6767

6868
template <typename T, typename old, typename... ArgT>
69-
annotated_arg(annotated_arg<T, old>, properties<std::tuple<ArgT...>>)
69+
annotated_arg(annotated_arg<T, old>,
70+
properties<detail::properties_type_list<ArgT...>>)
7071
-> annotated_arg<
7172
T, detail::merged_properties_t<old, detail::properties_t<ArgT...>>>;
7273

sycl/include/sycl/ext/oneapi/experimental/annotated_ptr/annotated_ptr.hpp

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,10 @@ template <typename... Ts>
5454
using contains_alignment =
5555
detail::ContainsProperty<alignment_key, std::tuple<Ts...>>;
5656

57-
// properties filter
58-
template <typename property_list, template <class...> typename filter>
59-
using PropertiesFilter =
60-
sycl::detail::boost::mp11::mp_copy_if<property_list, filter>;
61-
6257
// filter properties that are applied on annotations
63-
template <typename... Props>
64-
using annotation_filter = properties<
65-
PropertiesFilter<std::tuple<Props...>, propagateToPtrAnnotation>>;
58+
template <typename PropertyListTy>
59+
using annotation_filter = decltype(filter_properties<propagateToPtrAnnotation>(
60+
std::declval<PropertyListTy>()));
6661
} // namespace detail
6762

6863
template <typename I, typename P> struct annotationHelper {};
@@ -107,8 +102,8 @@ class annotated_ref<T, detail::properties_t<Props...>> {
107102
// implicit conversion with annotaion
108103
operator T() const {
109104
#ifdef __SYCL_DEVICE_ONLY__
110-
return annotationHelper<T, detail::annotation_filter<Props...>>::load(
111-
m_Ptr);
105+
return annotationHelper<
106+
T, detail::annotation_filter<property_list_t>>::load(m_Ptr);
112107
#else
113108
return *m_Ptr;
114109
#endif
@@ -118,8 +113,8 @@ class annotated_ref<T, detail::properties_t<Props...>> {
118113
template <class O, typename = std::enable_if_t<!detail::is_ann_ref_v<O>>>
119114
T operator=(O &&Obj) const {
120115
#ifdef __SYCL_DEVICE_ONLY__
121-
return annotationHelper<T, detail::annotation_filter<Props...>>::store(
122-
m_Ptr, Obj);
116+
return annotationHelper<
117+
T, detail::annotation_filter<property_list_t>>::store(m_Ptr, Obj);
123118
#else
124119
return *m_Ptr = std::forward<O>(Obj);
125120
#endif
@@ -245,7 +240,8 @@ annotated_ptr(T *, Args...)
245240
-> annotated_ptr<T, typename detail::DeducedProperties<Args...>::type>;
246241

247242
template <typename T, typename old, typename... ArgT>
248-
annotated_ptr(annotated_ptr<T, old>, properties<std::tuple<ArgT...>>)
243+
annotated_ptr(annotated_ptr<T, old>,
244+
properties<detail::properties_type_list<ArgT...>>)
249245
-> annotated_ptr<
250246
T, detail::merged_properties_t<old, detail::properties_t<ArgT...>>>;
251247
#endif // __cpp_deduction_guides
@@ -383,8 +379,8 @@ __SYCL_TYPE(annotated_ptr) annotated_ptr<T, detail::properties_t<Props...>> {
383379

384380
T *get() const noexcept {
385381
#ifdef __SYCL_DEVICE_ONLY__
386-
return annotationHelper<T, detail::annotation_filter<Props...>>::annotate(
387-
m_Ptr);
382+
return annotationHelper<
383+
T, detail::annotation_filter<property_list_t>>::annotate(m_Ptr);
388384
#else
389385
return m_Ptr;
390386
#endif

sycl/include/sycl/ext/oneapi/experimental/work_group_memory.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class __SYCL_SPECIAL_CLASS __SYCL_TYPE(work_group_memory) work_group_memory
7777
void __init(decoratedPtr ptr) { this->ptr = ptr; }
7878
#endif
7979
private:
80-
decoratedPtr ptr;
80+
decoratedPtr ptr = nullptr;
8181
};
8282
} // namespace ext::oneapi::experimental
8383
} // namespace _V1

0 commit comments

Comments
 (0)