KhronosGroup / KhronosGroup/OpenCL-Docs

Clarification to the execution model semantics of non-uniform subgroup functions

Open
#874 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
420
Forks
131
Avg merge
5d 13h
Merged PRs (30d)
11

Description

I'm used to thinking of the OpenCL WG execution semantics via parallel WI loops. This is likely due to working on the PoCL implementation which converts the WG to parallel loops (marks the iterations independent for more compiler scheduling/reorder freedom) and passes the IR to target-specific passes such as vectorization or VLIW instruction scheduling to achieve some level of "performance portability" in a modular fashion.

I understand that SGs have been designed primarily with (predicated) SIMD/SIMT execution model in mind to utilize their fast cross-PE/lane shuffle hardware. If this is the case, I feel we should make the case of "non-uniform SG functions" more explicit in the execution model description. The concept of an "active" vs. "inactive" work-items basically comes from the predicated SIMD/SIMT execution model and it's mentioned only in this context of non-uniform SG functions (as far as I see).

Currently there's a sentence 3.2.1: _In the absence of synchronization functions (e.g. a barrier), work-items within a sub-group may be serialized. In the presence of sub -group functions, work-items within a sub -group may be serialized before any given sub -group function, between dynamically encountered pairs of sub-group functions and between a work-group function and the end of the kernel._

Maybe the "dynamically encountered pairs..." part is meant to denote this semantics somehow?

Could it be something along the lines of: _If a subgroup calls non-uniform subgroup functions such as sub_group_shuffle, it is assumed all work-items in the sub-group for which the predicate to reach the call site evaluates to true will synchronize at the call._

Contributor guide

Open the contributing guide

Research direction

Start by reviewing execution model section 3.2.1 and the surrounding description of non-uniform subgroup functions, especially the sentence about dynamically encountered pairs of subgroup functions. Determine whether the existing wording already defines the proposed active-work-item synchronization semantics; done means the specification clearly states the intended behavior or explains why clarification is unnecessary.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.