-
Notifications
You must be signed in to change notification settings - Fork 29
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
Implements dpctl.tensor.count_nonzero
and dpctl.tensor.diff
#1732
Conversation
Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞 |
Array API standard conformance tests for dpctl=0.18.0dev0=py310h15de555_106 ran successfully. |
2e6725d
to
3315646
Compare
Array API standard conformance tests for dpctl=0.18.0dev0=py310ha798474_180 ran successfully. |
Array API standard conformance tests for dpctl=0.18.0dev0=py310ha798474_192 ran successfully. |
Array API standard conformance tests for dpctl=0.18.0dev0=py310ha798474_194 ran successfully. |
Array API standard conformance tests for dpctl=0.18.0dev0=py310ha798474_195 ran successfully. |
Array API standard conformance tests for dpctl=0.18.0dev0=py310ha798474_196 ran successfully. |
Array API standard conformance tests for dpctl=0.18.0dev0=py310ha798474_200 ran successfully. |
Array API standard conformance tests for dpctl=0.18.0dev0=py310ha798474_207 ran successfully. |
Array API standard conformance tests for dpctl=0.18.0dev0=py310ha798474_208 ran successfully. |
ae52dec
to
a5a5a72
Compare
Array API standard conformance tests for dpctl=0.18.0dev0=py310ha798474_207 ran successfully. |
Array API standard conformance tests for dpctl=0.18.0dev0=py310ha798474_211 ran successfully. |
…o_weak_types` to `_type_utils`
…n n > 2 Saves some temporary memory allocations
…defined in the same file
Typos caused this to result in incorrect shaped outputs
…icient Also adds a correctness check
ea67b5a
to
52a8d23
Compare
Array API standard conformance tests for dpctl=0.18.0dev0=py310ha798474_220 ran successfully. |
Array API standard conformance tests for dpctl=0.18.0dev0=py310ha798474_221 ran successfully. |
Array API standard conformance tests for dpctl=0.18.0dev0=py310ha798474_226 ran successfully. |
Array API standard conformance tests for dpctl=0.18.0dev0=py310ha798474_227 ran successfully. |
Please add |
I will add |
Array API standard conformance tests for dpctl=0.18.0dev0=py310ha798474_228 ran successfully. |
Array API standard conformance tests for dpctl=0.18.0dev0=py310ha798474_229 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.
Thank you @ndgrigorian ! Ready to be merged
This PR proposes introducing two new functions to dpctl which will be coming to the array API specification's next version:
count_nonzero
anddiff
.count_nonzero
casts an array tobool
before callingsum
. As dedicated kernels forsum
ofbool
into any integer type, the summation won't require any additional copies.diff
recursively takes then
-th forward difference along a given axis of an array.prepend
andappend
arguments (which can be arrays or scalars) are concatenated to the input array. We diverge from the array API by permitting scalars forprepend
andappend
as well as not constraining them to the same type as the input array