-
Notifications
You must be signed in to change notification settings - Fork 407
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
Return input argument if no GPUs werde detected in get_gpu #4623
Return input argument if no GPUs werde detected in get_gpu #4623
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.
This makes that code even less readable
What is it specifically that you want me to change? Are you criticizing the intended behavior or do you merely want to change the implementation to be more readable? In the latter case, we could copy
before calling |
@masterleinad The fix works for me. Thanks. |
@dalg24 I avoided modifying |
Retest this please. |
|
Retest this please |
Works here. |
Retest this please. |
@jczhang07 The comments are not for you but for our CI. 🙂 |
Fixes #4621. @jczhang07 Can you please take a look if this works for you?
Essentially, the changes here are only relevant for the SYCL backend. If a specific device is requested (id>=0) we still error out if there are no GPUs. If that is not the case (id<0), we use the default selector to run on a host queue if no GPUs are detected. This (intended) behavior is not changed here but we have
use_gpu
return the input argument when no GPU is detected (instead of assigning GPU 0 which doesn't exist in that case).