-
Notifications
You must be signed in to change notification settings - Fork 787
[SYCL] vec abi changes behind -fpreview-breaking-changes flag #11697
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
[SYCL] vec abi changes behind -fpreview-breaking-changes flag #11697
Conversation
Technically, we added API versioning to handle "library-only" ABI changes like this. We should not need any flag/macro to change sycl::vec implementation. |
ping to reviewers. I'd like to get this merged before the next pulldown |
TL;DR I would suggest not to allow users to select between Details: Haven't looked into this in details, but here are my two cents which are more about high-level design/approach/direction for this particular change and future changes like this we may have: I'm concerned about multi-versioning: my This could be inevitable in general case of having different API/ABI between versions and I think it would be helpful to have some comments/documentation somewhere which would instruct a developer about which versions require update depending on the changes, which version is actual, which version is legacy, etc. Note: in this particular case it seems to me that we can actually unify both versions more or less nicely, because at first glance they seem similar: there is a difference of how underlying data type is chosen, but when it comes to operators implementation there seem to be just two implementations which are enough to cover all 4 combinations we have (legacy with/without ext-vec-type, new with/without ext-vec-type). I'm not asking to do that unification in scope of this PR, because it will require notable efforts and may not work out as good as I imagine. Plus, we could use this PR to troubleshoot our versioning mechanism we have:
This is a very good point and I would like to discuss it more. Do we have a use case where uses would actually need a control over If we change our mindset to " We would still have to maintain some However, I doubt that this is a header-only ABI break, because there are host versions of math built-ins, which are implemented within the library and therefore we may have to duplicate all (?) those library entry points to maintain backward compatibility with older runtime. Will it cause even more code changes? Likely so. Will it increase maintenance burden more than having to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We had a discussion about this and we are not sure that we can be safe about passing SYCL-CTS with the old implementation. Considering other constraints we have, the decision was (if I understood it correctly) to proceed with this patch as-is as the only available option at the moment. Therefore, approving the PR (even though I'm not really a code owner for this code)
sycl/include/sycl/types.hpp
Outdated
Ret.setValue(I, !vec_data<DataT>::get(getValue(I))); | ||
return Ret; | ||
} | ||
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would vote for adding a comment here about how to proceed with bugfix/further changes to vec
class. If I understand correctly, all new API/ABI breaking changes should only go into vec_new
, whilst generic implementation bugfix should be done in both versions
I see that it was a bad suggestion now... How hard would it be to return it back? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM given two issues with comments will be fixed before merge.
…intel#11697)" This reverts commit f4ed132.
sycl::vec was updated earlier to be SYCL 2020 conformant. But those were ABI breaking changes, and the decision has been made to put those changes behind the -fpreview-breaking-changes / __INTEL_PREVIEW_BREAKING_CHANGES flag/macro.
This PR restores the old sycl::vec implementation and puts the new conforming one behind the flag/macro.