Implements dpctl.tensor.logsumexp and dpctl.tensor.reduce_hypot#1446
Implements dpctl.tensor.logsumexp and dpctl.tensor.reduce_hypot#1446ndgrigorian merged 14 commits intomasterfrom
dpctl.tensor.logsumexp and dpctl.tensor.reduce_hypot#1446Conversation
|
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. |
oleksandr-pavlyk
left a comment
There was a problem hiding this comment.
LGTM! Thank you @ndgrigorian
This pull request proposes the additions of
logsumexpandreduce_hypotinto dpctl.reduce_hypotcan be used to find the Euclidean distance in N-dimensional spacelogsumexpcan 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_reffor arithmetic reductions (sumandprod) 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.