-
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
Check in of generic reduction templates and some reductions #1399
Conversation
29fb95f
to
11f4c4a
Compare
View rendered docs @ https://intelpython.github.io/dpctl/pulls/1399/index.html |
Array API standard conformance tests for dpctl=0.14.6dev5=py310ha25a700_3 ran successfully. |
Array API standard conformance tests for dpctl=0.14.6dev5=py310ha25a700_3 ran successfully. |
Array API standard conformance tests for dpctl=0.14.6dev5=py310ha25a700_6 ran successfully. |
Array API standard conformance tests for dpctl=0.14.6dev5=py310ha25a700_7 ran successfully. |
Array API standard conformance tests for dpctl=0.14.6dev5=py310ha25a700_8 ran successfully. |
9feca2d
to
42d20e4
Compare
Array API standard conformance tests for dpctl=0.14.6dev5=py310ha25a700_9 ran successfully. |
1 similar comment
Array API standard conformance tests for dpctl=0.14.6dev5=py310ha25a700_9 ran successfully. |
42d20e4
to
316b88a
Compare
Array API standard conformance tests for dpctl=0.15.0rc1=py310ha25a700_9 ran successfully. |
Array API standard conformance tests for dpctl=0.15.0rc1=py310ha25a700_10 ran successfully. |
Array API standard conformance tests for dpctl=0.15.0rc1=py310ha25a700_11 ran successfully. |
198785a
to
4bb76a7
Compare
Array API standard conformance tests for dpctl=0.15.0rc2=py310ha25a700_11 ran successfully. |
6d10437
to
d1de259
Compare
Array API standard conformance tests for dpctl=0.15.0rc3=py310ha25a700_13 ran successfully. |
1 similar comment
Array API standard conformance tests for dpctl=0.15.0rc3=py310ha25a700_13 ran successfully. |
c3d1f62
to
1025b92
Compare
Array API standard conformance tests for dpctl=0.15.0rc3=py310ha25a700_15 ran successfully. |
1 similar comment
Array API standard conformance tests for dpctl=0.15.0rc3=py310ha25a700_15 ran successfully. |
Array API standard conformance tests for dpctl=0.15.0rc3=py310ha25a700_15 ran successfully. |
Array API standard conformance tests for dpctl=0.15.0=py310ha25a700_19 ran successfully. |
Array API standard conformance tests for dpctl=0.15.0=py310ha25a700_22 ran successfully. |
Adds a test for this behavior Fixed a typo in argmin and argmax causing shared local memory variant to be used for more types than expected
- comparison and search reductions will throw an error in this case - slips in change to align sum signature with array API spec
Removed unnecessary copies in custom_reduce_over_group Sequential reduction now casts before calling operator (makes behavior explicit rather than implicit)
Also removed unused `_usm_types` in `test_tensor_sum`
1cda64c
to
24b54d7
Compare
Array API standard conformance tests for dpctl=0.15.1dev0=py310ha25a700_19 ran successfully. |
1 similar comment
Array API standard conformance tests for dpctl=0.15.1dev0=py310ha25a700_19 ran successfully. |
These were unused by dpctl
Array API standard conformance tests for dpctl=0.15.1dev0=py310ha25a700_20 ran successfully. |
Implementation of Identity trait should call sycl::known_identity if trait sycl::has_known_identity is a true_type. Added IsMultiplies, and identity value for it, since sycl::known_identity for multiplies is only defined for real-valued types.
…icable Passing these function pointers around allows to turn atomic off altogether if desired. Use custom trait to check if reduce_over_groups can be used. This allows to work-around bug, or switch to custom code for reduction over group if desired. Such custom trait type works around issue with incorrect result returned from sycl::reduce_over_group for sycl::multiplies operator for 64-bit integral types.
Also tweaked docstring for sum.
Small tweaks to sum, min, and max docstrings
Implement product over axis
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 think this PR is ready to go in. Subsequent development can be done in new PRs. Thank you @ndgrigorian !
Array API standard conformance tests for dpctl=0.15.1dev0=py310ha25a700_28 ran successfully. |
This pull request implements the necessary meta-programming utilities for reductions with arbitrary binary operators, templates for generic reductions, as well as the new functions
dpctl.tensor.max
,dpctl.tensor.min
,dpctl.tensor.argmax
, anddpctl.tensor.argmin
.These meta-programming utilities, such as
Identity
, make it possible to define unique aspects of a reduction such that it may be passed to a generic functor for computation.