Skip to content

Add support of uint64 dtype in dpnp.bincount #2361

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

Merged
merged 13 commits into from
Mar 7, 2025
Merged

Conversation

antonwolfy
Copy link
Contributor

@antonwolfy antonwolfy commented Mar 5, 2025

Previously NumPy prohibits uint64 dtype of input array in numpy.bincount. But that is going to be changed since 2.2.4 release (fixed in numpy#28355 and backported to 2.2.x branch in numpy#28420).

This PR proposes to align with upcoming changes and to allow uint64 dtype of input array in dpnp.bincount.
Additionally, it extends the docstring of histogram-like functions to clearly notify with a warning about possible synchronization impact.

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • Have you added documentation for your changes, if necessary?
  • Have you added your changes to the changelog?

@antonwolfy antonwolfy self-assigned this Mar 5, 2025
Copy link
Contributor

github-actions bot commented Mar 5, 2025

View rendered docs @ https://intelpython.github.io/dpnp/index.html

@coveralls
Copy link
Collaborator

coveralls commented Mar 5, 2025

Coverage Status

coverage: 71.751% (-0.2%) from 71.961%
when pulling ead8b6d on add-uint64-to-bincount
into 25fb39b on master.

Copy link
Contributor

github-actions bot commented Mar 5, 2025

Array API standard conformance tests for dpnp=0.18.0dev0=py312he4f9c94_39 ran successfully.
Passed: 1006
Failed: 0
Skipped: 17

@antonwolfy antonwolfy marked this pull request as ready for review March 5, 2025 14:41
@antonwolfy antonwolfy added this to the 0.18.0 release milestone Mar 5, 2025
Copy link
Collaborator

@AlexanderKalistratov AlexanderKalistratov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@antonwolfy antonwolfy merged commit acd33e4 into master Mar 7, 2025
66 of 68 checks passed
@antonwolfy antonwolfy deleted the add-uint64-to-bincount branch March 7, 2025 11:40
github-actions bot added a commit that referenced this pull request Mar 7, 2025
Previously NumPy prohibits `uint64` dtype of input array in
`numpy.bincount`. But that is going to be changed since `2.2.4` release
(fixed in numpy#28355 and backported to 2.2.x branch in numpy#28420).

This PR proposes to align with upcoming changes and to allow `uint64`
dtype of input array in `dpnp.bincount`.
Additionally, it extends the docstring of histogram-like functions to
clearly notify with a warning about possible synchronization impact. acd33e4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants