-
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
Implements dpctl.tensor.logsumexp
and dpctl.tensor.reduce_hypot
#1446
Conversation
View rendered docs @ https://intelpython.github.io/dpctl/pulls/1446/index.html |
Array API standard conformance tests for dpctl=0.15.1dev0=py310ha25a700_48 ran successfully. |
Array API standard conformance tests for dpctl=0.15.1dev0=py310ha25a700_50 ran successfully. |
Array API standard conformance tests for dpctl=0.15.1dev0=py310ha25a700_69 ran successfully. |
c8683e3
to
e95ac44
Compare
Array API standard conformance tests for dpctl=0.15.1dev0=py310ha25a700_69 ran successfully. |
Array API standard conformance tests for dpctl=0.15.1dev0=py310ha25a700_70 ran successfully. |
5e3a671
to
fff36a1
Compare
Array API standard conformance tests for dpctl=0.15.1dev0=py310ha25a700_71 ran successfully. |
1 similar comment
Array API standard conformance tests for dpctl=0.15.1dev0=py310ha25a700_71 ran successfully. |
@oleksandr-pavlyk |
Array API standard conformance tests for dpctl=0.15.1dev0=py310ha25a700_72 ran successfully. |
… contiguous arrays
This change was made to improve the accuracy of these functions
This change is intended to improve the numerical stability of sum and prod
These variants were using ``sycl::maximum`` rather than ``sycl::minimum``
Use lambdas to ignore atomic-specific arguments to hypot and logsumexp dtype_supported functions
For add/multiplies reductions, use tree reduction for FP types, real and complex, to get better round-off accumulation properties.
Reduces code repetition between logsumexp and logaddexp
599fadb
to
d88e78f
Compare
Array API standard conformance tests for dpctl=0.15.1dev0=py310ha25a700_77 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.
LGTM! Thank you @ndgrigorian
This pull request proposes the additions of
logsumexp
andreduce_hypot
into dpctl.reduce_hypot
can be used to find the Euclidean distance in N-dimensional spacelogsumexp
can be used to sum probabilities stored as the logarithm of the probability.This pull request also slips in a change to disable the use of
sycl::atomic_ref
for arithmetic reductions (sum
andprod
) of inexact data types due to concerns with numerical stability. To better support this change, dedicated kernels for tree reductions over contiguous inputs have been implemented.