-
Notifications
You must be signed in to change notification settings - Fork 329
WIP: Add subgroups feature #4962
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
* API * new feature: subgroups * new properties for adapter info: * minSubgroupSize * maxSubgroupSize * WGSL * new built-in values * subgroup_invocation_id * subgroup_size * subgroup and quad built-in functions * new uniformity diagnostic subgroup_uniformity
@kainino0x @toji I'd appreciate some early feedback on the API changes around properties. |
Closed in favour of #4963 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see this is now closed .
Submitting reivew to save partial results.
@@ -1929,6 +1931,29 @@ interface GPUAdapterInfo { | |||
this value is not recommended. Applications which change their behavior based on the | |||
{{GPUAdapterInfo}}, such as applying workarounds for known driver issues, should rely on the | |||
other fields when possible. | |||
|
|||
: <dfn>properties</dfn> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a need/purpose for encapsulating these things in a new GPUAdapterProperties object?
Can the two new fields be included directly in GPUAdapterInfo?
Somewhat related in C-style APIs, I expect we would have a new chained struct, e.g. either GPUAdapterSubgroupInfo (or GPUAdapterPropertiesSubgroupInfo if we do introduce a new GPUAdapterProperties)
while on other devices they may not. | ||
|
||
Note: There is considerable non-portability among underlying devices when | ||
operating in non-uniform control flow and device compilers often agressively |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"aggressively"
operating in non-uniform control flow and device compilers often agressively | ||
optimize such code. | ||
The result is that subgroups may contain different invocations than the shader author | ||
reasons ought to be active in a particular operation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "reasons ought to" phrasing seems awkward.
Suggest replacing this sentence with something like one of these:
The result is that the set of active invocations executing a particular subgroup operation may not be what a shader author expects.
The result is that for a particular subgroup operation, the set of active invocations may not be what a shader author expects.
The result is that for a particular subgroup operation, the set of active invocations may differ from shader author expectations.
Missing subgroup_branching diagnostic and uniformity updates.