这是indexloc提供的服务,不要输入任何密码
Skip to content

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

Closed
wants to merge 1 commit into from
Closed

WIP: Add subgroups feature #4962

wants to merge 1 commit into from

Conversation

alan-baker
Copy link
Contributor

  • 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

Missing subgroup_branching diagnostic and uniformity updates.

* 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
@alan-baker
Copy link
Contributor Author

@kainino0x @toji I'd appreciate some early feedback on the API changes around properties.

@alan-baker
Copy link
Contributor Author

Closed in favour of #4963

@alan-baker alan-baker closed this Nov 8, 2024
Copy link
Contributor

@dneto0 dneto0 left a 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>
Copy link
Contributor

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
Copy link
Contributor

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.
Copy link
Contributor

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.

@kainino0x kainino0x deleted the milestone-1-subgroups branch November 8, 2024 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants