Skip to content
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

[DO NOT MERGE][ABI-Break][SYCL] ABI-neutralize exception constructor #13369

Closed
wants to merge 52 commits into from

Conversation

bso-intel
Copy link
Contributor

@bso-intel bso-intel commented Apr 11, 2024

To support ABI-neutral feature, a constructor of the sycl::exception class should take detail::string_view instead of std::string.
Also, to break cyclic dependencies, I introduced exception_helper.hpp/.cpp to throw an invalid parameter exception from the cpp file.

Signed-off-by: Byoungro So <byoungro.so@intel.com>
Signed-off-by: Byoungro So <byoungro.so@intel.com>
Signed-off-by: Byoungro So <byoungro.so@intel.com>
Signed-off-by: Byoungro So <byoungro.so@intel.com>
Signed-off-by: Byoungro So <byoungro.so@intel.com>
Signed-off-by: Byoungro So <byoungro.so@intel.com>
Signed-off-by: Byoungro So <byoungro.so@intel.com>
Signed-off-by: Byoungro So <byoungro.so@intel.com>
Signed-off-by: Byoungro So <byoungro.so@intel.com>
Signed-off-by: Byoungro So <byoungro.so@intel.com>
Signed-off-by: Byoungro So <byoungro.so@intel.com>
Signed-off-by: Byoungro So <byoungro.so@intel.com>
@bso-intel bso-intel marked this pull request as ready for review April 12, 2024 01:50
@bso-intel bso-intel requested a review from a team as a code owner April 12, 2024 01:50
@bso-intel
Copy link
Contributor Author

@steffenlarsen
friendly ping.

sycl/include/sycl/exception.hpp Outdated Show resolved Hide resolved
sycl/include/sycl/property_list.hpp Outdated Show resolved Hide resolved
Signed-off-by: Byoungro So <byoungro.so@intel.com>
Comment on lines 3 to 11
// This file is intended be used to break dependency cycles due to
// exception.hpp. In some header files where exceptions are thrown, it has to
// #include <sycl/exception.hpp> which could lead to a cyclic dependency. In
// that case, it can utilize this work-around. This helper class is not intended
// to replace all throwing exception cases.
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think you need to make it part of ABI: https://godbolt.org/z/bEbW181vn

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ABI-break is caused by changes to exception constructors, not because this new helper function.

Signed-off-by: Byoungro So <byoungro.so@intel.com>
Signed-off-by: Byoungro So <byoungro.so@intel.com>
Signed-off-by: Byoungro So <byoungro.so@intel.com>
Signed-off-by: Byoungro So <byoungro.so@intel.com>
Signed-off-by: Byoungro So <byoungro.so@intel.com>
@bso-intel
Copy link
Contributor Author

I will close this PR when #13560 is merged.

@bso-intel bso-intel changed the title [ABI-Break][SYCL] ABI-neutralize exception constructor [DO NOT MERGE][ABI-Break][SYCL] ABI-neutralize exception constructor Apr 25, 2024
@bso-intel bso-intel closed this Apr 30, 2024
@bso-intel bso-intel deleted the exception branch April 30, 2024 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abi-break change that's breaking abi and waiting for the next window to be able to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants