Bug 93469 - get_sub_group_id and get_sub_group_size do not return the correct values
Summary: get_sub_group_id and get_sub_group_size do not return the correct values
Status: RESOLVED FIXED
Alias: None
Product: Beignet
Classification: Unclassified
Component: Beignet (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium minor
Assignee: Zhigang Gong
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-21 17:06 UTC by Georg Kolling
Modified: 2016-08-25 02:21 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Georg Kolling 2015-12-21 17:06:59 UTC
On branch master and Release_v1.1, Beignet implements a subset of the cl_intel_subgroups extension (https://www.khronos.org/registry/cl/extensions/intel/cl_intel_subgroups.txt). However, some functions do not behave according to the spec:

get_sub_group_size() is mapped to OP_SIMD_SIZE which returns the constant SIMD width. This is what get_max_sub_group_size() should return. get_sub_group_size() may be smaller than that for the last subgroup in a work group.

get_sub_group_id() is mapped to OP_SIMD_ID which returns the SIMD lane ID. However, the SIMD lane ID is the equivalent of get_sub_group_local_id().
Comment 1 Zhigang Gong 2015-12-22 01:48:01 UTC
Thanks for pointing the issue out. You are right, the current implementation doesn't fully comply with the spec.

Yejun, could you take a look at this bug and make our implementation comply?

Thanks,
Zhigang Gong.
Comment 2 Zhigang Gong 2015-12-22 01:55:28 UTC
Thanks for pointing the issue out. You are right, the current implementation doesn't fully comply with the spec.

Yejun, could you take a look at this bug and make our implementation comply?

Thanks,
Zhigang Gong.
Comment 3 Guo Yejun 2015-12-22 02:01:36 UTC
thanks, yes, the real function should be get_max_sub_group_size and get_sub_group_local_id, i'll fix it accordingly.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.