-
Notifications
You must be signed in to change notification settings - Fork 30
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
Disable vectorized bitwise_invert
for boolean inputs
#1681
Conversation
This overload would cause sufficiently large boolean arrays to produce unexpected results when cast to another type
Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞 |
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_359 ran successfully. |
bitwise_invert
on sufficiently large boolean inputsbitwise_invert
boolean inputs
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.
This looks good to me. Thank you @ndgrigorian ! I have added @npolina4 as a reviewer as original reporter of this issue.
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_360 ran successfully. |
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.
Looks good to me. Thank you @ndgrigorian!
bitwise_invert
boolean inputsbitwise_invert
for boolean inputs
This PR proposes removing the
sycl::vec
overload ofbitwise_invert
for boolean inputs to fix unexpected behaviors.Vectorized
bitwise_invert
on boolean inputs would corrupt the data in a subtle way. When casting this data to an integer data type, 255 would always be the result of castingtrue
.This is likely related to
operator!
onsycl::vec
returning -1 fortrue
and expecting the output type to be a signed integer type.