---
title: requiredThreadsPerThreadgroup
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtl4computepipelinedescriptor/requiredthreadsperthreadgroup
---

# requiredThreadsPerThreadgroup

The required number of threads per threadgroup for compute dispatches.

## Declaration

```swift
var requiredThreadsPerThreadgroup: MTLSize { get set }
```

## Discussion

Discussion When you set this value, you are responsible for ensuring that the threadsPerThreadgroup argument of any compute dispatch matches it. Setting this property is optional, except in cases where the pipeline uses CooperativeTensors. This property’s default value is 0, which disables its effect.
