Skip to content

Access subgroupMinSize/subgroupMaxSize directly on GPUAdapterInfo#4663

Open
gyagp wants to merge 1 commit into
gpuweb:mainfrom
gyagp:subgroup-size-direct-access
Open

Access subgroupMinSize/subgroupMaxSize directly on GPUAdapterInfo#4663
gyagp wants to merge 1 commit into
gpuweb:mainfrom
gyagp:subgroup-size-direct-access

Conversation

@gyagp

@gyagp gyagp commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

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.


Requirements for PR author:

  • All missing test coverage is tracked with "TODO" or .unimplemented().
  • New helpers are /** documented */ and new helper files are found in helper_index.txt.
  • Test behaves as expected in a WebGPU implementation. (If not passing, explain above.)
  • Test have be tested with compatibility mode validation enabled and behave as expected. (If not passing, explain above.)

Requirements for reviewer sign-off:

  • Tests are properly located.
  • Test descriptions are accurate and complete.
  • Tests provide complete coverage (including validation control cases). Missing coverage MUST be covered by TODOs.
  • Tests avoid over-parameterization (see case count report).

When landing this PR, be sure to make any necessary issue status updates.

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>
@gyagp

gyagp commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

When working on #4656, I found subgroupMinSize/subgroupMaxSize could be accessed directly via GPUAdapterInfo. So I created this PR for cleanup. PTAL.

@github-actions

Copy link
Copy Markdown

Results for build job (at 2c1e847):

 Test case/subcase counts did not change.

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.

1 participant