TS8026
On this page

TS8026

Front-end code WORKGROUP_SHAPE

A warning: @compute([x, y, z]) exceeds one of WebGPU's default compute limits (x and y 256, z 64, 256 invocations in all), so a device requested without raising that limit refuses the pipeline.

The registry text and every compiler message on these pages are the compiler's own English.

When it fires

A warning: @compute([x, y, z]) exceeds one of WebGPU's default compute limits (x and y 256, z 64, 256 invocations in all), so a device requested without raising that limit refuses the pipeline. It was the error that refused a y or z other than 1 before the backend carried all three extents.

Example

example.shade.ts
"use typeshade"
declare const data: storage<array<f32>, "read_write">
@compute([32, 16, 1])
export function main(@builtin("global_invocation_id") id: vec3u): void {
data[id.x] = data[id.x] * 2.
}

Compiled at build time against the pinned compiler, this program gets:

TS8026 warning, line 5: @compute workgroup shape [32, 16, 1] has 512 invocations, over maxComputeInvocationsPerWorkgroup (256). WebGPU guarantees no more, so a device requested without raising that limit refuses the pipeline.

How to fix it

The same program, corrected. It compiles with no diagnostic.

example.shade.ts
"use typeshade"
declare const data: storage<array<f32>, "read_write">
@compute([16, 16, 1])
export function main(@builtin("global_invocation_id") id: vec3u): void {
data[id.x] = data[id.x] * 2.
}

The rule this enforces

Rule 8.7 Test
@compute carries the workgroup size as an array literal of one to three whole numbers, x, y and z, a missing y or z being 1, and the default is 64; every extent reaches the emitted @workgroup_size and the reflection, and a shape over WebGPU’s default compute limits must be reported as a warning.

See also

Source

Where the compiler raises this code at commit 26de7be8, one line per file:

Edit this page Report a problem