---
title: MTLCopyAllDevices()
framework: metal
role: symbol
role_heading: Function
path: metal/mtlcopyalldevices()
---

# MTLCopyAllDevices()

Returns an array of all the Metal device instances in the system.

## Declaration

```swift
func MTLCopyAllDevices() -> [any MTLDevice]
```

## Mentioned in

Finding multiple GPUs on an Intel-based Mac

## See Also

### Locating GPUs

- [Finding multiple GPUs on an Intel-based Mac](metal/finding-multiple-gpus-on-an-intel-based-mac.md)
- [Getting the GPU that drives a view’s display](metal/getting-the-gpu-that-drives-a-views-display.md)
- [MTLCopyAllDevicesWithObserver(handler:)](metal/mtlcopyalldeviceswithobserver(handler:).md)
- [MTLRemoveDeviceObserver(_:)](metal/mtlremovedeviceobserver(_:).md)
- [CGDirectDisplayCopyCurrentMetalDevice(_:)](coregraphics/cgdirectdisplaycopycurrentmetaldevice(_:).md)
- [MTLDeviceNotificationHandler](metal/mtldevicenotificationhandler.md)
- [MTLDeviceNotificationName](metal/mtldevicenotificationname.md)
