Skip to content
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

Get rid of falling back on numpy in dpnp.put #1838

Merged
merged 4 commits into from
May 22, 2024

Conversation

antonwolfy
Copy link
Contributor

@antonwolfy antonwolfy commented May 21, 2024

The PR proposes to get rid of call_origin (i.e. falling back on numpy) in dpnp.put function.
Additionally, the safe casting of indices to intp dtype is added to the implementation.

The tests are updated to remove temporary workaround of dpctl#1382, because it has been resolved.
Also they are separated to class TestPut and extended with more test scenarios.

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to 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?
  • If this PR is a work in progress, are you filing the PR as a draft?

@antonwolfy antonwolfy self-assigned this May 21, 2024
Copy link
Contributor

github-actions bot commented May 21, 2024

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

@antonwolfy antonwolfy marked this pull request as ready for review May 21, 2024 14:15
@vlad-perevezentsev
Copy link
Collaborator

@antonwolfy
1.It would be good if you could change test_put... in test_indexing.py by implementing them via class TestPut
2. Should we support the case where a and ind is a bool data type?
3.Would it make sense to add tests for test_sycl_queue and test_usm_type?

@antonwolfy
Copy link
Contributor Author

antonwolfy commented May 22, 2024

1.It would be good if you could change test_put... in test_indexing.py by implementing them via class TestPut
2. Should we support the case where a and ind is a bool data type?
3.Would it make sense to add tests for test_sycl_queue and test_usm_type?

  1. The existing tests are separated into class TestPut. Additionally the test scenarios are extended to cover more use cases.
  2. The safe casting to intp dtype is added to the implementation. The tests are extended to cover that.
  3. dpnp.put doesn't create any result array, but updating input array in-place. What kind of tests do you propose to add to test_sycl_queue and test_usm_type?

@antonwolfy antonwolfy changed the title No fallback on numpy in dpnp.put Get rid of falling back on numpy in dpnp.put May 22, 2024
Copy link
Collaborator

@vlad-perevezentsev vlad-perevezentsev left a comment

Choose a reason for hiding this comment

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

LGTM!
Thank you @antonwolfy

@antonwolfy antonwolfy merged commit 614af33 into master May 22, 2024
49 of 56 checks passed
@antonwolfy antonwolfy deleted the no-fallback-on-numpy-in-put branch May 22, 2024 13:28
github-actions bot added a commit that referenced this pull request May 22, 2024
* Get rid of call_origin in dpnp.put

* Extended tests for dpnp.put 614af33
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.

2 participants