-
Notifications
You must be signed in to change notification settings - Fork 116
[oneDPL] Add special predefined policy templates #654
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
base: main
Are you sure you want to change the base?
[oneDPL] Add special predefined policy templates #654
Conversation
| ``dpcpp_default`` is a predefined execution policy object to run algorithms on the default SYCL device. | ||
| It is a global immutable (``const``) instance of type ``device_policy<>``. | ||
| [*Note*: ``dpcpp_default`` can be copied but cannot be moved. -- *end note*] |
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.
Would we want to deprecate this policy object as well to convince people to switch to the new ones, or leave it as is?
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.
@danhoeflinger isn't the question whether to redefine dpcpp_default to be an instance of dpdefault instead of deprecating 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.
If I understand correctly, beyond just the name shortening, I think the other advantage here is that the new policy templates are on-demand usage and cannot cause problems for broken SYCL environments on startup with eager global queue creation. If we allow an easy path for users to continue using dpcpp_default as a instance of the new template, then we perpetuate both of the things we are aiming to improve.
I don't think we can just remove it, but we can deprecate it for eventual removal of the requirement to have some lazy queue creation system in oneDPL implementations. (uxlfoundation/oneDPL#1652)
502ae26 to
a32d793
Compare
Add variable templates to create device policies that use one of the standard SYCL device selectors.