Skip to content

[SYCL][Docs] Fix variadic properties ctor #13676

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

Merged
merged 2 commits into from
May 22, 2024

Conversation

steffenlarsen
Copy link
Contributor

The compile-time properties extension specifies that the variadic ctor has the following behavior:

Available only when each argument in props is an object of a property
value. Construct a property list with zero or more property values. This constructor can accept both runtime and compile-time constant property values. Each property in the property list (as determined by PropertyValuesT) that is not default constructable must have an object provided in props.

However, the current implementation does not adhere to these requirements. This commit makes the following changes to adhere to the required behavior:

  • The ctor is now SFINAE'd out when arguments are non-property types.
  • Each argument must now have a corresponding property in the list.
  • Default-constructible arguments can now be omitted from the arguments. This only applied to compile-time properties previously.

Additionally, this exposed bugs in a set of extensions relying on these properties, which has in turn also been fixed with this commit.

The [compile-time properties extension](https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/experimental/sycl_ext_oneapi_properties.asciidoc)
specifies that the variadic ctor has the following behavior:

>Available only when each argument in props is an object of a property
value. Construct a property list with zero or more property values. This
constructor can accept both runtime and compile-time constant property
values. Each property in the property list (as determined by
PropertyValuesT) that is not default constructable must have an object
provided in props.

However, the current implementation does not adhere to these
requirements. This commit makes the following changes to adhere to the
required behavior:

* The ctor is now SFINAE'd out when arguments are non-property types.
* Each argument must now have a corresponding property in the list.
* Default-constructible arguments can now be omitted from the arguments.
This only applied to compile-time properties previously.

Additionally, this exposed bugs in a set of extensions relying on these
properties, which has in turn also been fixed with this commit.

Signed-off-by: Larsen, Steffen <[email protected]>
Signed-off-by: Larsen, Steffen <[email protected]>
Copy link
Contributor

@gmlueck gmlueck left a comment

Choose a reason for hiding this comment

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

spec changes LGTM

@steffenlarsen steffenlarsen merged commit f90554f into intel:sycl May 22, 2024
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.

3 participants