-
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
SYCL choose a specific GPU #3918
Conversation
@@ -127,7 +127,6 @@ class SYCL { | |||
explicit SYCLDevice(sycl::device d); | |||
explicit SYCLDevice(const sycl::device_selector& selector); | |||
explicit SYCLDevice(size_t id); | |||
explicit SYCLDevice(const std::function<bool(const sycl::device&)>& pred); |
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.
What was the deal with this 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.
In https://github.com/kokkos/kokkos/pull/3231/files#diff-14e8d5edacfcbf256b2d86893b81b4ddb925537c1927d137eb16299f82353aacR109-R123, this constructor was implemented allowing passing a device selector (meaning a function taking a sycl::device
to return true
for the first acceptable device
to be used).
Currently, SYCLDevice
is only used internally (similar to Cuda::SelectDevice`) and since it's not implemented I don't see a problem with backward compatibility.
Of course, we could also discuss in a separate pull request if we want to implement or remove this constructor (my preference is removing it).
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.
It was there to be able to provide a filter mechanism (and used in earlier versions when the runtime was buggier). It can be removed.
So far, we were always using the
default_selector
and use whateverSYCL
device we got from that. With this pull request, a specific GPU can be specified (by its position in the list of allGPU
devices). The default behavior is still to usedefault_selector
.Also, delete a constructor that was not implemented (and not used).