---
title: "TS8026 WORKGROUP_SHAPE: TypeShade 컴파일러가 진단에 붙이는 오류 코드 한 가지"
description: "TS8026 WORKGROUP_SHAPE, TypeShade 컴파일러의 오류 코드입니다. 경고입니다. @compute([x, y, z])가 WebGPU의 기본 compute 한도(x와 y는 256, z는 64, 전체 호출은 256)를 넘으므로…"
url: https://typeshade.dev/ko/reference/errors/ts8026/
language: ko
---

# `TS8026`

프런트엔드 코드 `WORKGROUP_SHAPE`

경고입니다. `@compute([x, y, z])`가 WebGPU의 기본 compute 한도(`x`와 `y`는 256, `z`는 64, 전체 호출은 256)를 넘으므로, 한도를 올리지 않고 요청한 장치는 파이프라인을 거부합니다.

레지스트리에는 이 상수에 대한 문서 주석이 없습니다. 그래서 위 설명은 컴파일러가 이 코드와 함께 내는 메시지를 보고 이 사이트가 쓴 것입니다.

레지스트리 설명과 컴파일러 메시지는 컴파일러 원문이라 한국어 페이지에서도 영어로 둡니다.

## 예제

example.shade.ts

```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.
}
```

빌드할 때 고정된 컴파일러로 이 프로그램을 컴파일하면 다음 진단이 나옵니다.

**TS8026** warning, 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.

## 고치는 법

같은 프로그램을 고친 모습입니다. 진단 없이 컴파일됩니다.

example.shade.ts

```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.
}
```

## 이 코드가 적용하는 규칙

**[규칙 8.7](https://typeshade.dev/ko/reference/rules/8-7/) 테스트**

`@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`.

## 함께 보기

- [셰이더 스테이지](https://typeshade.dev/ko/guide/language/stages/)
- [오류 코드](https://typeshade.dev/ko/reference/errors/)

## 소스

커밋 af54ddad5에서 컴파일러가 이 코드를 내는 곳입니다. 파일마다 한 줄씩 적었습니다.

- [`src/compiler/ts/lower/function-signature/stage.ts:119`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/function-signature/stage.ts#L119)
- [`src/compiler/ts/lower/function-signature/workgroup.ts:152`](https://github.com/typeshade/typeshade/blob/af54ddad5/src/compiler/ts/lower/function-signature/workgroup.ts#L152)
