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

Implement extension for dpnp.choose #2201

Merged
merged 45 commits into from
Feb 4, 2025

Conversation

ndgrigorian
Copy link
Collaborator

This PR implements a new SYCL kernel for dpnp.choose in a new extension, _indexing_impl.

choose is an embarrassingly parallel copy operation, where the array to copy from is chosen from a list based on the index in the indices array.

  • 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?

@ndgrigorian ndgrigorian force-pushed the dedicated-choose-kernel branch 3 times, most recently from c42f2ae to 8793b54 Compare December 9, 2024 23:08
@ndgrigorian
Copy link
Collaborator Author

Tests will need to be added in general, and especially to test_usm_type and test_sycl_queue, but suggestions are committed, as well as existing tests passing, so this PR is ready for first phase of review @antonwolfy

@ndgrigorian ndgrigorian marked this pull request as ready for review December 10, 2024 00:50
@ndgrigorian ndgrigorian force-pushed the dedicated-choose-kernel branch from 8793b54 to e7f0a0b Compare December 10, 2024 00:54
@ndgrigorian ndgrigorian force-pushed the dedicated-choose-kernel branch from ed84f7a to 7642045 Compare December 13, 2024 17:24
@coveralls
Copy link
Collaborator

coveralls commented Dec 13, 2024

Coverage Status

coverage: 71.752% (+0.4%) from 71.39%
when pulling 6609637 on ndgrigorian:dedicated-choose-kernel
into 5660da3 on IntelPython:master.

@ndgrigorian ndgrigorian force-pushed the dedicated-choose-kernel branch from 7642045 to efa7e1c Compare December 14, 2024 00:14
@ndgrigorian ndgrigorian force-pushed the dedicated-choose-kernel branch from efa7e1c to 131308f Compare December 26, 2024 18:40
@ndgrigorian ndgrigorian force-pushed the dedicated-choose-kernel branch 3 times, most recently from a54f420 to 0fb1fdf Compare January 12, 2025 02:13
@ndgrigorian ndgrigorian force-pushed the dedicated-choose-kernel branch 3 times, most recently from 925b7d8 to dad41e3 Compare January 28, 2025 03:54
ndgrigorian and others added 26 commits February 4, 2025 08:17
Also corrects errors for unexpected dtype to TypeError to match NumPy
Logic now handles 0d inputs to _populate_choose_kernel_params
to avoid dereferencing empty shape and strides of input arrays
Fix spacing in choices type list

Fix spacing in example arrays
py_choose now uses multiple functions to move host data for choose
kernel parameters to the device
@ndgrigorian ndgrigorian force-pushed the dedicated-choose-kernel branch from 4ee9863 to 6609637 Compare February 4, 2025 16:18
@ndgrigorian
Copy link
Collaborator Author

@antonwolfy

Please merge at your convenience, I won't be able to due to Sphinx build failure

@antonwolfy antonwolfy merged commit 7a782ae into IntelPython:master Feb 4, 2025
66 of 71 checks passed
github-actions bot added a commit that referenced this pull request Feb 4, 2025
This PR implements a new SYCL kernel for `dpnp.choose` in a new
extension, `_indexing_impl`.

`choose` is an embarrassingly parallel copy operation, where the array
to copy from is chosen from a list based on the index in the indices
array. 7a782ae
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.

5 participants