Skip to content
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

Merged
merged 2 commits into from
Apr 7, 2021
Merged

Conversation

masterleinad
Copy link
Contributor

So far, we were always using the default_selector and use whatever SYCL device we got from that. With this pull request, a specific GPU can be specified (by its position in the list of all GPU devices). The default behavior is still to use default_selector.

Also, delete a constructor that was not implemented (and not used).

@masterleinad masterleinad requested a review from nliber April 6, 2021 16:43
core/src/SYCL/Kokkos_SYCL.cpp Outdated Show resolved Hide resolved
@masterleinad masterleinad requested a review from dalg24 April 6, 2021 21:19
@@ -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);
Copy link
Member

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?

Copy link
Contributor Author

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).

Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants