Skip to content

Request for additional attribute sub_group_sizes #975

Closed

Description

@fcharras

This issue is a follow-up on #894 which have already added nice attributes to sycl devices and kernels.

This attribute sub_group_sizes is listed in the array of device attribute descriptors of the SYCL spec but it's not an attribute of SyclDevice (while e.g max_work_group_size or max_num_sub_groups).

In the meantime I wonder if max_work_group_size // max_num_sub_groups is supposed to be always equal to "min(sub_group_sizes)" ?

Also I understand that max_sub_group_size can't be implemented because it needs actions in libsycl, is there a follow up issue on this ?

Activity

  1. oleksandr-pavlyk commented on Nov 9, 2022

    @oleksandr-pavlyk
    Contributor

    max_sub_group_size is not currently supported because of a problem in DPC++ compiler which is already fixed in the sources of open-source intel/llvm. Once new version of DPC++ compiler ships, this property will become available.

  2. oleksandr-pavlyk commented on Nov 9, 2022

    @oleksandr-pavlyk
    Contributor

    In the meantime I wonder if max_work_group_size // max_num_sub_groups is supposed to be always equal to "min(sub_group_sizes)" ?

    Here is the response I've gotten from SYCL experts:

    In many implementations, the maximum number of sub-groups is a hardware limit that is independent of the sub-group size. For example, the maximum number of sub-groups might be the maximum number of hardware threads. The maximum work-group size for such an implementation would be the maximum number of sub-groups multiplied by the maximum sub-group size. The typically relationship would be max_work_group_size == max_num_sub_groups * max(sub_group_size), but this can't be guaranteed by all implementations, either.

  3. oleksandr-pavlyk commented on Nov 9, 2022

    @oleksandr-pavlyk
    Contributor

    @fcharras The support for sub_group_sizes has been merged to the main branch. Please give it a try.

  4. fcharras commented on Nov 17, 2022

    @fcharras
    ContributorAuthor

    Can confirm that it works:

    In [1]: import dpctl
    
    In [2]: device = dpctl.SyclDevice()
    
    In [3]: device.sub_group_sizes
    Out[3]: [8, 16, 32]
    
    In [4]: device
    Out[4]: <dpctl.SyclDevice [backend_type.level_zero, device_type.gpu,  Intel(R) Iris(R) Xe Graphics [0x9a49]] at 0x7f03716ea9f0>
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions