-
Notifications
You must be signed in to change notification settings - Fork 32
Allow Python scalars as the search values in dpt.searchsorted
#2225
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
base: master
Are you sure you want to change the base?
Conversation
|
View rendered docs @ https://intelpython.github.io/dpctl/pulls/2225/index.html |
|
Array API standard conformance tests for dpctl=0.22.0dev0=py310h93fe807_104 ran successfully. |
b7de201 to
e85940e
Compare
|
Array API standard conformance tests for dpctl=0.22.0dev0=py310h93fe807_104 ran successfully. |
|
Array API standard conformance tests for dpctl=0.22.0dev0=py310h93fe807_105 ran successfully. |
|
Array API standard conformance tests for dpctl=0.22.0dev0=py310h93fe807_106 ran successfully. |
bda9809 to
b7c56e1
Compare
|
Array API standard conformance tests for dpctl=0.22.0dev0=py310h93fe807_106 ran successfully. |
|
|
||
| if not isinstance(x2, usm_ndarray): | ||
| x2 = dpt.asarray(x2, dtype=dt2, usm_type=res_usm_type, sycl_queue=q) | ||
| if x2.dtype != dt: |
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.
| if x2.dtype != dt: | |
| elif x2.dtype != dt: |
| if x2.dtype != dt: | ||
| x2_buf = _empty_like_orderK(x2, dt) | ||
| dep_evs = _manager.submitted_events | ||
| ht_ev, ev = ti_copy(src=x2, dst=x2_buf, sycl_queue=q, depends=dep_evs) |
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.
Copying x1 and x2 to the buffers might be done in parallel.
While currently it assumes a sequence execution order: x1 must be copied first and then either x2 is cased to usm_ndarray or x2 is copying to the buffer (but always once the x1 copy kernel is completed).
| skip_if_dtype_not_supported(dt, q) | ||
|
|
||
| x = dpt.zeros(10, dtype=dt, sycl_queue=q) | ||
| py_zeros = ( |
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.
Would it make sense to parametrize py_zeros with below values instead of iterating over the loop for sc in py_zeros?
This PR proposes permitting the search values of
dpt.searchsortedto be Python scalars, a change coming to the 2026 array API specResolves #2224