Skip to content

Commit a6a1a39

Browse files
[SYCL] Restore ABI-combatibility for local_accessor ctor (#17510)
Initially broken in #17147.
1 parent 8e878c3 commit a6a1a39

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

sycl/source/accessor.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,25 @@ const sycl::range<3> &LocalAccessorBaseHost::getSize() const {
119119
return impl->MSize;
120120
}
121121
void *LocalAccessorBaseHost::getPtr() {
122+
// `local_accessor_base::GDBMethodsAnchor` was/is inline and used to call
123+
// `(void)getPtr()` inside. As such, binaries compiled with older toolchain
124+
// are calling this method from the `sycl::local_accessor` ctor on host and we
125+
// cannot "abort" for them.
126+
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
122127
// Must not be/isn't called, user-facing APIs do error-checking.
123128
std::abort();
129+
#endif
124130
return nullptr;
125131
}
126132
void *LocalAccessorBaseHost::getPtr() const {
133+
// `local_accessor_base::GDBMethodsAnchor` was/is inline and used to call
134+
// `(void)getPtr()` inside. As such, binaries compiled with older toolchain
135+
// are calling this method from the `sycl::local_accessor` ctor on host and we
136+
// cannot "abort" for them.
137+
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
127138
// Must not be/isn't called, user-facing APIs do error-checking.
128139
std::abort();
140+
#endif
129141
return nullptr;
130142
}
131143
const property_list &LocalAccessorBaseHost::getPropList() const {

0 commit comments

Comments
 (0)