Skip to content

Add shader validation tests on subgroup-size-control - Part I#4641

Merged
kainino0x merged 4 commits into
gpuweb:mainfrom
Jiawei-Shao:test-subgroup-size-control
May 19, 2026
Merged

Add shader validation tests on subgroup-size-control - Part I#4641
kainino0x merged 4 commits into
gpuweb:mainfrom
Jiawei-Shao:test-subgroup-size-control

Conversation

@Jiawei-Shao

@Jiawei-Shao Jiawei-Shao commented May 14, 2026

Copy link
Copy Markdown
Collaborator

This patch adds the first part of the shader validation tests on the extension subgroup-size-control:

  • Enabling subgroup_size_control must also enable subgroups.
  • The WGSL attribute @subgroup_size cannot used when subgroup_size_control is not enabled.
  • @subgroup_size can only be used in the compute stage

Issue: #4640


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.

This patch adds the first part of the shader validation tests on
the extension `subgroup-size-control`:
- Enabling `subgroup_size_control` must also enable `subgroups`.
- The WGSL attribute `@subgroup_size` must be used when
  `subgroup_size_control` is enabled.
- `@subgroup_size` can only be used in the compute stage

issue: gpuweb#4640
@github-actions

github-actions Bot commented May 14, 2026

Copy link
Copy Markdown

Results for build job (at 364d859):

+webgpu:shader,validation,extension,subgroup_size_control:enable_subgroup_size_control_requires_subgroups:* - 2 cases, 2 subcases (~1/case)
+webgpu:shader,validation,extension,subgroup_size_control:use_subgroup_size_attribute_requires_subgroup_size_control_extension_enabled:* - 2 cases, 2 subcases (~1/case)
+webgpu:shader,validation,extension,subgroup_size_control:subgroup_size_attribute_only_valid_in_compute_stage:* - 3 cases, 3 subcases (~1/case)
-TOTAL: 281249 cases, 2322900 subcases
+TOTAL: 281256 cases, 2322907 subcases

@Jiawei-Shao

Copy link
Copy Markdown
Collaborator Author

PTAL, thanks!

Comment thread src/webgpu/shader/validation/extension/subgroup_size_control.spec.ts Outdated
Comment thread src/webgpu/shader/validation/extension/subgroup_size_control.spec.ts Outdated
Comment thread src/webgpu/shader/validation/extension/subgroup_size_control.spec.ts Outdated
Comment thread src/webgpu/shader/validation/extension/subgroup_size_control.spec.ts Outdated
@Jiawei-Shao Jiawei-Shao requested review from kainino0x and removed request for Kangz May 19, 2026 01:20
@kainino0x kainino0x enabled auto-merge (squash) May 19, 2026 18:32
@kainino0x kainino0x merged commit f08551b into gpuweb:main May 19, 2026
1 check passed
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.

3 participants