---
title: threadExecutionWidth
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtlcomputepipelinestate/threadexecutionwidth
---

# threadExecutionWidth

The number of threads that the GPU executes simultaneously.

## Declaration

```swift
var threadExecutionWidth: Int { get }
```

## Mentioned in

Calculating threadgroup and grid sizes Creating threads and threadgroups

## Discussion

Discussion For better performance, when dispatching a compute command, make the number of threads in the threadgroup a multiple of threadExecutionWidth. See Creating threads and threadgroups and Calculating threadgroup and grid sizes for more information on aligning data, thread width, and threadgroup size.

## See Also

### Checking threadgroup attributes

- [maxTotalThreadsPerThreadgroup](metal/mtlcomputepipelinestate/maxtotalthreadsperthreadgroup.md)
- [staticThreadgroupMemoryLength](metal/mtlcomputepipelinestate/staticthreadgroupmemorylength.md)
