Skip to content

Add tests on the featuresubgroup-size-control #4640

@Jiawei-Shao

Description

@Jiawei-Shao

This issue tracks the efforts on the tests against the WebGPU feature subgroup-size-control based on the WebGPU SPEC PR (gpuweb/gpuweb#5578).

API Validations:

  • Enabling subgroup-size-control on the creation of device should also enable subgroups.

Shader Validations:

  • Enabling subgroup_size_control must also enable subgroups.
  • The WGSL attribute @subgroup_size cannot be used when subgroup_size_control is not enabled.
  • @subgroup_size can only be used in the compute stage
  • The value of @subgroup_size must be a constant expression or an override expression that resolves to an i32 or an u32.
  • The value of @subgroup_size must be a power of 2.
  • The x-dimension of the entry point's workgroup_size must be a multiple of the @subgroup_size value.

Shader Execution Tests:

  • The value of the built-in variable subgroup_size must equal the value of the @subgroup_size attribute.
  • At least one value in the range of [GPUAdapterInfo.subgroupMinSize, GPUAdapterInfo.subgroupMaxSize] can be used as @subgroup_size attribute in a simple compute pipeline.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions