# GetKernelThreadGroupSizes(int, out uint, out uint, out uint)

> Get kernel thread group sizes.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.7/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

## GetKernelThreadGroupSizes(int, uint, uint, uint)

```csharp
public void GetKernelThreadGroupSizes(int kernelIndex, out uint x, out uint y, out uint z)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Which kernel to query. A single compute shader asset can have multiple kernel entry points.**** (\[uint]\(https\://learn.microsoft.com/dotnet/api/system.uint32)): Thread group size in the X dimension.**** (\[uint]\(https\://learn.microsoft.com/dotnet/api/system.uint32)): Thread group size in the Y dimension.**** (\[uint]\(https\://learn.microsoft.com/dotnet/api/system.uint32)): Thread group size in the Z dimension.

### Remarks

Work group size for each compute shader kernel is specified in the shader code itself (using "numthreads" HLSL attribute). Use this function to query it.

Additional Resources: [ComputeShader.Dispatch](/engine/6000.7/script-reference/unityengine/computeshader/dispatch.md), [ComputeShader.FindKernel](/engine/6000.7/script-reference/unityengine/computeshader/findkernel.md), [Compute Shaders](/engine/6000.7/manual/materials-and-shaders/shaders/writing-custom/class-compute-shader.md).
