Bug 93469

Summary: get_sub_group_id and get_sub_group_size do not return the correct values
Product: Beignet Reporter: Georg Kolling <georg.kolling>
Component: BeignetAssignee: Zhigang Gong <zhigang.gong>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: medium CC: rong.r.yang, yejun.guo, zhigang.gong
Version: unspecified   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

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.