-
Notifications
You must be signed in to change notification settings - Fork 31
Improves reduction code and removes kernels/boolean_reductions.hpp
#1557
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
Boolean reductions now use the same reduction implementation as other reductions
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_21 ran successfully. |
Use `sycl_utils::Is[Op]` functions rather than checking if a reduction operator is a sycl operator
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_22 ran successfully. |
New test failure:
|
2b43713
to
e4a9344
Compare
This was caused by the atomic To fix this, I added more utilities for checking if an operator is specifically a sycl op. That way if a work-around is needed for |
These allow atomic reductions to use custom_reduce_over_group with the faster `fetch_[op]` atomic operations
e4a9344
to
713a177
Compare
Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_23 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.
LGMT! Thank you @ndgrigorian !
This pull request further modularizes reduction code and fully moves boolean reductions (any and all) functionality into
reductions.hpp
.Sequential reductions now have a
submit_sequential_reduction
wrapper, reducing repetitious kernel calls.Boolean reductions now use the same basic kernels as other reductions.
Additionally, reduction type dispatching has been moved into individual reduction files, i.e.,
reductions/max.cpp
now contains the dispatch factories, and so on for all reductions. This significantly reduces the amount of code inkernels/reductions.hpp
.