[oneDPL] Add special predefined policy templates#654
[oneDPL] Add special predefined policy templates#654akukanov wants to merge 4 commits intouxlfoundation:mainfrom
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.
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.
@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.
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.