Skip to content

[SYCL][ABI-break] Promote guarded SYCL 2020 features and fix buffer reinterpret #6541

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 4 commits into from
Aug 11, 2022

Conversation

steffenlarsen
Copy link
Contributor

@steffenlarsen steffenlarsen commented Aug 8, 2022

Promotes all SYCL 2020 features currently guarded by the SYCL2020_CONFORMANT_APIS macro.
Additionally, buffer::reinterpret is changed to correctly rebind the allocator. To accomplish this, std::allocator_traits is specialized for aligned_allocator.

Related change: intel/llvm-test-suite#1137

…einterpret

Promotes all SYCL 2020 features currently guarded by the
SYCL2020_CONFORMANT_APIS macro.
Additionally, `buffer::reinterpret` is changed to correctly rebind the
allocator. To accomplish this, `std::allocator_traits` is specialized
for `aligned_allocator`.

Signed-off-by: Larsen, Steffen <[email protected]>
@steffenlarsen steffenlarsen requested review from a team as code owners August 8, 2022 16:42
Signed-off-by: Larsen, Steffen <[email protected]>
@steffenlarsen
Copy link
Contributor Author

/verify with intel/llvm-test-suite#1137

be templated and `sycl::buffer` will be using `sycl::buffer_allocator<std::remove_const_t<T>>`
by default, where `T` is the data type of that buffer, if it is not explicitly given an
allocator.
Defining this macro currently has no effect on the API.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we remove it completely then? Maybe (hopefully) next use will be SYCL202Y and not 2020...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The motivation for keeping it is so we can reuse it for any SYCL 2020 changes we may have missed that break API/ABI after we once again close the breakage window. We could always reintroduce it of course, but this way we should hopefully keep the same name for the macro as before if we run into a case like that.

The primary benefit is that users that do not worry about ABI and just want SYCL 2020 features as soon as they are ready can just keep defining this in their project and they will get it automatically as we add such missing features.

@pvchupin - What are your thoughts on this?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the change proposed is the best at this point.
It would be great to track carefully documentation and implementation. It would be great to do everything in this window. But in reality I guess we will miss something or find problem late. So keeping macro around should be fine, as a good predefined/agreed name.

Signed-off-by: Larsen, Steffen <[email protected]>
pvchupin
pvchupin previously approved these changes Aug 8, 2022
be templated and `sycl::buffer` will be using `sycl::buffer_allocator<std::remove_const_t<T>>`
by default, where `T` is the data type of that buffer, if it is not explicitly given an
allocator.
Defining this macro currently has no effect on the API.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the change proposed is the best at this point.
It would be great to track carefully documentation and implementation. It would be great to do everything in this window. But in reality I guess we will miss something or find problem late. So keeping macro around should be fine, as a good predefined/agreed name.

@steffenlarsen
Copy link
Contributor Author

/verify with intel/llvm-test-suite#1137

aelovikov-intel
aelovikov-intel previously approved these changes Aug 8, 2022
@steffenlarsen steffenlarsen requested a review from pvchupin August 10, 2022 16:03
@pvchupin
Copy link
Contributor

@steffenlarsen, there've been HIP-unique device_num fail, is it related?
After resolving conflict testing restarts so we'll see if it repeats

@pvchupin pvchupin merged commit 7827590 into intel:sycl Aug 11, 2022
pvchupin pushed a commit to intel/llvm-test-suite that referenced this pull request Aug 11, 2022
With SYCL 2020 features that were previously guarded by the SYCL2020_CONFORMANT_APIS, tests that distinguished between behaviours with and without the macro are changed to expect the previously guarded API in all cases.

Related change:  intel/llvm#6541
@steffenlarsen
Copy link
Contributor Author

@steffenlarsen, there've been HIP-unique device_num fail, is it related? After resolving conflict testing restarts so we'll see if it repeats

Test was temporarily disabled on HIP (intel/llvm-test-suite#1136) due to consistent test failures.

aelovikov-intel pushed a commit to aelovikov-intel/llvm that referenced this pull request Mar 27, 2023
…1137)

With SYCL 2020 features that were previously guarded by the SYCL2020_CONFORMANT_APIS, tests that distinguished between behaviours with and without the macro are changed to expect the previously guarded API in all cases.

Related change:  intel#6541
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.

3 participants