Skip to content

[SYCL] Drop sycl::exception::get_cl_code #14400

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
Jul 3, 2024

Conversation

aelovikov-intel
Copy link
Contributor

It was removed in SYCL 2020 and should be dropped during the current ABI breaking window. We still need to access PI error code, either for internal needs or for the backend interoperability, so the member field remains. Also, introduce sycl::detail::get_pi_error(const exception &) instead for internal needs (cache cleanup when out of resources only currently).

It was removed in SYCL 2020 and should be dropped during the current ABI
breaking window. We still need to access PI error code, either for
internal needs or for the backend interoperability, so the member field
remains. Also, introduce `sycl::detail::get_pi_error(const exception &)`
instead for internal needs (cache cleanup when out of resources only
currently).
@@ -66,6 +67,9 @@ class __SYCL_EXPORT SYCLCategory : public std::error_category {
const char *name() const noexcept override { return "sycl"; }
std::string message(int) const override { return "SYCL Error"; }
};

// Forward declare to declare as a friend in sycl::excepton.
__SYCL_EXPORT pi_int32 get_pi_error(const exception &e);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure if it should be an exported symbol or inline header-only utility. Or, in other words (I think), if layout of sycl::exception is a part of ABI.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We do have https://github.com/intel/llvm/blob/sycl/sycl/test/abi/layout_exception.cpp, but then it's unclear to me why get_cl_code wasn't an inline function...

@aelovikov-intel aelovikov-intel marked this pull request as ready for review July 2, 2024 23:49
@aelovikov-intel aelovikov-intel requested a review from a team as a code owner July 2, 2024 23:49
@aelovikov-intel aelovikov-intel merged commit 2d2c13a into intel:sycl Jul 3, 2024
14 checks passed
@aelovikov-intel aelovikov-intel deleted the drop-get-cl-code branch July 3, 2024 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants