-
Notifications
You must be signed in to change notification settings - Fork 30
Round signed integers toward negative infinity in dpctl.tensor.floor_divide #1260
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
View rendered docs @ https://intelpython.github.io/dpctl/pulls/1260/index.html |
Array API standard conformance tests for dpctl=0.14.4=py310h7bf5fec_8 ran successfully. |
29b214d
to
7b702bc
Compare
Array API standard conformance tests for dpctl=0.14.4=py310h7bf5fec_10 ran successfully. |
in: dpt.floor_divide(dpt.asarray(1), 0)
out: usm_ndarray(4294967295)
expected: 0 in: dpt.floor_divide(dpt.asarray(0), 0)
out: usm_ndarray(4294967295)
expected: 0 |
Another ugly case. I was trying to avoid a branch for the denominator = 0 case, but I will add a branch to resolve this after all. |
- Also fully enables sycl::vec overload for floor_divide - Added a test for integer division by 0 behavior
Array API standard conformance tests for dpctl=0.14.4=py310h7bf5fec_11 ran successfully. |
Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞 |
Array API standard conformance tests for dpctl=0.14.4=py310h7bf5fec_12 ran successfully. |
Resolves #1247
This PR changes the behavior of dpctl.tensor.floor_divide to round the result of division between signed integers toward negative infinity rather than toward 0 (as is the norm in C++).