<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLDevice/maxThreadsPerThreadgroup",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(pl)MTLDevice(py)maxThreadsPerThreadgroup"
  },
  "title" : "maxThreadsPerThreadgroup"
}
-->

# maxThreadsPerThreadgroup

The maximum number of threads along each dimension of a threadgroup.

```
var maxThreadsPerThreadgroup: MTLSize { get }
```

## Discussion

This property reports the maximum thread group size the device can support for a trivial shader.
This size isn’t guaranteed for all shaders.
For the actual thread group size of a specific compute shader, see the [`maxTotalThreadsPerThreadgroup`](/documentation/Metal/MTLComputePipelineState/maxTotalThreadsPerThreadgroup) property of your compute pipeline state.

For more information on the specific threadgroup limits of each GPU family, see the Metal feature set tables:

- [Metal feature set tables (PDF)](https://developer.apple.com/metal/Metal-Feature-Set-Tables.pdf)
- [Metal feature set tables (Numbers)](https://developer.apple.com/metal/metal-feature-set-tables.zip)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)