TS8026
On this page

TS8026

Front-end code WORKGROUP_SHAPE

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

The registry has no documentation comment for this constant, so the line above is written by this site from the messages the compiler raises it with.

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

Example

example.shade.ts
"use typeshade"
declare const data: storage<array<f32>, "read_write">
@compute([32, 16, 1])
export function main(id: builtin<"global_invocation_id">): 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(id: builtin<"global_invocation_id">): 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 positive whole-number literals, integer module constants or u32 override names, x, y and z, a missing y or z being 1, and the default is 64; every default extent reaches reflection and the manifest, and each override name reaches WGSL’s @workgroup_size.

See also

Source

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

Edit this page Report a problem