Access subgroupMinSize/subgroupMaxSize directly on GPUAdapterInfo#4663
Open
gyagp wants to merge 1 commit into
Open
Access subgroupMinSize/subgroupMaxSize directly on GPUAdapterInfo#4663gyagp wants to merge 1 commit into
gyagp wants to merge 1 commit into
Conversation
These properties are now exposed on GPUAdapterInfo, so the local `SubgroupProperties` interface and the `adapterInfo as SubgroupProperties` casts are no longer needed. Read them directly via `adapterInfo.subgroupMinSize` / `adapterInfo.subgroupMaxSize`. They are still declared optional in @webgpu/types (number | undefined), so a non-null assertion (!) is used at these call sites, which are all gated on the `subgroups` (or `subgroup-size-control`) feature where the values are guaranteed to be present. Co-Authored-By: Claude Opus 4 (1M context) <noreply@anthropic.com>
Contributor
Author
|
When working on #4656, I found subgroupMinSize/subgroupMaxSize could be accessed directly via GPUAdapterInfo. So I created this PR for cleanup. PTAL. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These properties are now exposed on GPUAdapterInfo, so the local
SubgroupPropertiesinterface and theadapterInfo as SubgroupPropertiescasts are no longer needed. Read them directly viaadapterInfo.subgroupMinSize/adapterInfo.subgroupMaxSize.They are still declared optional in @webgpu/types (number | undefined), so a non-null assertion (!) is used at these call sites, which are all gated on the
subgroups(orsubgroup-size-control) feature where the values are guaranteed to be present.Requirements for PR author:
All missing test coverage is tracked with "TODO" or.unimplemented().New helpers are/** documented */and new helper files are found inhelper_index.txt.Test have be tested with compatibility mode validation enabled and behave as expected. (If not passing, explain above.)Requirements for reviewer sign-off:
When landing this PR, be sure to make any necessary issue status updates.