-
Notifications
You must be signed in to change notification settings - Fork 23
Implementation of histogram with sycl kernel #2027
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
Implementation of histogram with sycl kernel #2027
Conversation
bc18622
to
088beb5
Compare
Quick validation via independent implementation: def histogram1d_impl_tensor(data : dpt.usm_ndarray, bins : dpt.usm_ndarray) -> dpt.usm_ndarray:
assert data.ndim == 1
assert bins.ndim == 1
assert bins.shape[0] > 1
bin_idx = dpt.searchsorted(bins, data)
_, c = dpt.unique_counts(dpt.sort(bin_idx))
return c
|
e6c66d1
to
020ea2c
Compare
020ea2c
to
ad8291f
Compare
I think this is a bug:
The density should be |
3721b6e
to
bfc7ede
Compare
@oleksandr-pavlyk it is not a bug. Numpy demonstrates the same behavior:
|
07b8228
to
ed7cbcc
Compare
@oleksandr-pavlyk @antonwolfy please re-review |
ed7cbcc
to
406dd47
Compare
3849eed
to
e2b6217
Compare
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 @AlexanderKalistratov for improving the histogram implementation.
I don't have any more comment.
8464d9b
into
IntelPython:master
Implementation of histogram with sycl kernel --------- Co-authored-by: Anton <[email protected]> 8464d9b
Implemention of histogram with sycl_kernel.
This PR adds generic histogram kernel which can be used in the future to implement other versions of histogram such as
bincount
,histogram2d
andhistogramdd
or specialize kernel for special cases like uniform bins.sycl kernel covers only specific datatype and usm memory types. Unsupported cases are covered by additional copy.