Skip to content

Conversation

@akukanov
Copy link
Contributor

@akukanov akukanov commented Oct 6, 2025

Add variable templates to create device policies that use one of the standard SYCL device selectors.

Comment on lines 166 to 168
``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*]
Copy link
Contributor

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?

Copy link
Contributor

@timmiesmith timmiesmith Oct 6, 2025

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?

Copy link
Contributor

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)

@akukanov akukanov marked this pull request as draft October 15, 2025 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants