Skip to content

FunctionPropertyMetaInfo and PropertyMetaInfo are duplicated for every property #22729

Closed

Description

@againull

Commit bba4f4d (#21738) introduced FunctionPropertyMetaInfo<T> as a separate parallel trait to the existing PropertyMetaInfo<T>, used by SYCL_EXT_ONEAPI_FUNCTION_PROPERTY on the lightweight free-function path. However, for every property that needs to work on both the property-list path and the free-function path, authors are now required to write two structurally identical specializations with the same name and value members.

Currently duplicated in free_function_kernel_properties.hpp:

  • work_group_size_key
  • work_group_size_hint_key
  • sub_group_size_key
  • max_work_group_size_key
  • max_linear_work_group_size_key

And in grf_size_properties.hpp:

  • grf_size_key / grf_size_automatic_key

Activity

  1. sarnex commented on Jul 22, 2026

    @sarnex
    Contributor

    @koparasy Can you please provide some analysis? Thanks

  2. koparasy commented on Jul 22, 2026

    @koparasy
    Contributor

    We were trying to reduce compile time of the "free_function_kernel_properties.hpp" header. That header used to pull in sycl/ext/oneapi/properties/properties.hpp. That is an expensive header in terms of compilation time. So any TU that just wanted to annotate a free-function kernel (work_group_size, nd_range_kernel) dragged in the full properties<...> list template + aspects.hpp + forward_progress.hpp. The lightweight approach skips that duplicates 'PropertyMetaInfo` all that.

    I believe though, I should not have introduced a new MetaInfo I could had re-used the existing one without any additional compilation cost. I will need to check compile time about this, but I believe you are right.

  3. sarnex commented on Jul 22, 2026

    @sarnex
    Contributor

    Thanks, looking forward to your results

  4. added a commit that references this issue on Jul 23, 2026
    f3121ca
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions