Skip to content

[SYCL] Implement sycl_ext_oneapi_queue_priority revision 2 - #23497

Open
againull wants to merge 5 commits into
syclfrom
priority-levels-sycl
Open

againull wants to merge 5 commits into
syclfrom
priority-levels-sycl

Conversation

@againull

Copy link
Copy Markdown
Contributor

Add implementation and move proposed specification to supported with some required adjustments.

Assisted-By: Claude

Add the sycl::ext::oneapi::property::queue::priority property and the
sycl::ext::oneapi::info::device::priority_range descriptor.

Numeric priorities are clamped to the device range and passed to UR via
ur_exp_queue_priority_properties_t. The pre-defined priorities keep
using the UR priority flags, which adapters map to the ends of the
priority range. Devices without priority levels report {0, 0}.

Also fix queue property validation accepting dataless deprecated aliases
as properties with data, which made their kinds collide.

Assisted-By: Claude
Replace the supported extension document with the proposed revision 2,
which is now implemented, and remove the proposed document. Only the
status section and the copyright years are changed.

Assisted-By: Claude
Changes to the moved revision 2 text and the reasons for them:

- Add priority::get_priority(). Without a getter the value of the
  property can't be read back with queue::get_property, and other
  properties with data, such as compute_index, provide one.
- Document the priority constructor and get_priority in separate member
  blocks, as other extension documents do.
- Add a "Conflicting priorities" section. Revision 1 forbids combining
  the pre-defined priorities, but revision 2 doesn't specify combining
  them with the numeric priority. Extend the existing errc::invalid rule
  to all priority properties.
- Allow priority_low and priority_high to specify lower and higher
  priorities than the default one on devices without numeric priorities,
  whose priority_range is {0, 0}. Backends such as CUDA, HIP and Level
  Zero v1 keep supporting these hints.
- State that the priority range always contains the default priority 0.
  Otherwise priority(0) and priority_normal could be clamped to a
  non-default priority.
- Specify that devices without numeric priorities return {0, 0}, so that
  priority_range can be queried on any device and clamping to it is
  consistent with the default priority.
- Mention in the status note that numeric priorities are only used by
  the Level Zero v2 adapter.
- Drop "additional" from the overview, since the document now describes
  all properties, and "with fixed numeric values", which doesn't hold
  for priority_low and priority_high whose values depend on the device.

Assisted-By: Claude
@againull
againull requested review from a team as code owners October 14, 2026 22:50
Comment thread sycl/doc/extensions/supported/sycl_ext_oneapi_queue_priority.asciidoc Outdated
Comment thread sycl/doc/extensions/supported/sycl_ext_oneapi_queue_priority.asciidoc Outdated
Comment thread sycl/doc/extensions/supported/sycl_ext_oneapi_queue_priority.asciidoc Outdated
Comment thread sycl/doc/extensions/supported/sycl_ext_oneapi_queue_priority.asciidoc Outdated
Comment thread sycl/doc/extensions/supported/sycl_ext_oneapi_queue_priority.asciidoc Outdated
Comment thread sycl/doc/extensions/supported/sycl_ext_oneapi_queue_priority.asciidoc Outdated
- Don't distinguish between devices supporting numeric priorities and
  devices supporting the pre-defined priorities. Devices without priority
  support return {0, 0} from priority_range, so all pre-defined
  priorities are 0 there, which follows from the existing wording.
- Delete the status note listing the backends using each kind of
  priority.
- Keep the copyright year of the original publication.
- Write the extension against SYCL 2020 revision 12.

Assisted-By: Claude
@againull
againull requested a review from gmlueck October 19, 2026 20:33

@gmlueck gmlueck left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spec changes LGTM.

@againull
againull removed the request for review from sergey-semenov October 21, 2026 17:59
@againull
againull marked this pull request as draft October 21, 2026 18:01
@againull
againull marked this pull request as ready for review October 21, 2026 18:01

This branch has not been deployed

No deployments
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.

2 participants