-
Notifications
You must be signed in to change notification settings - Fork 33
Enabling sycl_queue for USMNdArray in dpnp overloads #1007
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
Enabling sycl_queue for USMNdArray in dpnp overloads #1007
Conversation
0f037ea to
9c0900a
Compare
| ) | ||
|
|
||
| if queue is not None: | ||
| if queue and not isinstance(queue, types.misc.Omitted): |
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 we have a non-None queue argument can it be anything but a dpctl.SyclQueue? Where can we end up with the queue being a types.misc.Omitted?
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 we have a non-None queue argument can it be anything but a
dpctl.SyclQueue?
Then we fail on these tests numba_dpex/tests/dpjit_tests/parfors/test_builtin_ops.py::test_built_in_operators2
Where can we end up with the queue being a
types.misc.Omitted?
The type of queue becomes types.misc.Omitted when dpnp.epmty() is being called by dpnp functions internally.
numba_dpex/dpnp_iface/arrayobj.py
Outdated
| """ | ||
| if queue and not isinstance(queue, types.misc.Omitted): | ||
|
|
||
| if sycl_queue and not isinstance(sycl_queue, types.misc.Omitted) and device: |
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.
Can be removed as the check is already inside the UsmNdArray constructor.
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.
Can be removed as the check is already inside the
UsmNdArrayconstructor.
We can actually remove these checks in all ol_dpnp_<functions>() too, we are doing this same check on three levels, which we shouldn't do.
dadf286 to
f5d155e
Compare
f5d155e to
1802d7c
Compare
Remove device='gpu' in tests/types/USMNdArray/test_array_creation_errors.py
1802d7c to
4ac7a87
Compare
|
Superceded by #1022 |
This is PR enables
dpctl.SyclQueueforUSMNdArrayindpnpoverloads.This PR does not pass SYCL queue to the functions in
numba_depx/core/runtime/_dpexrt_python.c(yet).Since this PR, we won't have
"unknown"as a default device string anymore, we will useNoneinstead, when there is no need to specify the device type.