-
Notifications
You must be signed in to change notification settings - Fork 33
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
Allow importing numba-dpex even if no SYCL device is detected by dpctl #1272
Conversation
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.
LGTM!
sub_group_barrier, | ||
) | ||
|
||
DEFAULT_LOCAL_SIZE = [] |
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.
Why do we still have this? We need to completely nuke the old way of setting the kernel lauch parameters.
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.
Right. DEFAULT_LOCAL_SIZE
is referenced in the vectorizers.py module. The vectorizers.py is badly broken and non functional at the moment that is why I did not remove the code from __init__.py
. I am going to do that in a follow up PR.
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.
Created #1273 to keep track of the pending clean up.
…t-sycl-devices Allow importing numba-dpex even if no SYCL device is detected by dpctl d12331e
…even-without-sycl-devices Allow importing numba-dpex even if no SYCL device is detected by dpctl d12331e
Numba-dpex checks at module importation that at least one non-host SYCL device is available on the system. The check leads to the following
ImportError
if we try to import numba-dpex on a system that has no such device:The check is a legacy of the time when numba-dpex needed to access a default queue to determine where a kernel should be launched if the arguments to the kernel where NumPy arrays. Since numba-dpex does not any longer support launching kernels with NumPy ndarray arguments and all offload target decisions are based on the compute follows data programming model, the check can be removed.
The PR removes the check. Without the check a user will get the exception at the array creation stage from the array library (dpnp or dpctl.tensor). The behavior is more intuitive to an user and correctly points out the reason for the exception.
The test for this change is not easily testable using pytest. Instead a new smoke test was added to the Github conda-package workflow.
Fixes #304