Skip to content

[SYCL] Restore ABI-combatibility for local_accessor ctor #17510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions sycl/source/accessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,25 @@ const sycl::range<3> &LocalAccessorBaseHost::getSize() const {
return impl->MSize;
}
void *LocalAccessorBaseHost::getPtr() {
// `local_accessor_base::GDBMethodsAnchor` was/is inline and used to call
// `(void)getPtr()` inside. As such, binaries compiled with older toolchain
// are calling this method from the `sycl::local_accessor` ctor on host and we
// cannot "abort" for them.
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
// Must not be/isn't called, user-facing APIs do error-checking.
std::abort();
#endif
return nullptr;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we confirm that the return value is not used ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean? If somebody is actually using it, then it's UB and their fault.

}
void *LocalAccessorBaseHost::getPtr() const {
// `local_accessor_base::GDBMethodsAnchor` was/is inline and used to call
// `(void)getPtr()` inside. As such, binaries compiled with older toolchain
// are calling this method from the `sycl::local_accessor` ctor on host and we
// cannot "abort" for them.
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
// Must not be/isn't called, user-facing APIs do error-checking.
std::abort();
#endif
return nullptr;
}
const property_list &LocalAccessorBaseHost::getPropList() const {
Expand Down