-
Notifications
You must be signed in to change notification settings - Fork 788
[SYCL] Remove direct initialization constructor from bfloat16 class #4989
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
Conversation
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. Is this something that should be reflected in the extension document?
@AlexeySotkin, can you please answer the question above before merging of this PR? |
in fact, the spec does not contain the removed constructor. So nothing to be changed. |
The latest change contains a new method which should be added to the spec. Also I'd like to hear feedback from @GHGmc2. Marking this PR as a draft for now. |
This PR fixes #4871 |
@AlexeySotkin Thanks, I'll have have try and give feedback soon. |
@AlexeySotkin ambiguous error when cast bfloat16 to long "error: conversion from 'bfloat16' (aka 'sycl::ext::intel::experimental::bfloat16') to 'long' is ambiguous": #include <sycl/ext/intel/experimental/bfloat16.hpp>
using bfloat16 = sycl::ext::intel::experimental::bfloat16;
int main() {
long ret = bfloat16(3.14f);
return 0;
} |
This constructor is being removed to resolve ambiguity when user trying initialize bfloat16 with int, like auto a = bfloat16(0);
1f1147a
bca94e6
to
3b3a4a7
Compare
@AlexeySotkin could you please fix the CI failure? |
Add conversion operator for sycl::half Conversion operator for storage_t is replaced by 'raw()' method Signed-off-by: Alexey Sotkin <[email protected]>
3b3a4a7
to
46f81d6
Compare
Yes, but I'd like to have this PR approved first. |
LGTM |
Align the document with changes made in intel#4989
This constructor is being removed to resolve ambiguity when user trying
initialize bfloat16 with int, like
auto a = bfloat16(0);
Fixes #4871.