---
title: MLComputeDevice
framework: coreml
role: symbol
role_heading: Enumeration
path: coreml/mlcomputedevice
---

# MLComputeDevice

Compute devices for framework operations.

## Declaration

```swift
enum MLComputeDevice
```

## Topics

### Device types

- [MLComputeDevice.cpu(_:)](coreml/mlcomputedevice/cpu(_:).md)
- [MLComputeDevice.gpu(_:)](coreml/mlcomputedevice/gpu(_:).md)
- [MLComputeDevice.neuralEngine(_:)](coreml/mlcomputedevice/neuralengine(_:).md)

### Getting all devices

- [allComputeDevices](coreml/mlcomputedevice/allcomputedevices.md)

## Relationships

### Conforms To

- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Compute devices

- [MLCPUComputeDevice](coreml/mlcpucomputedevice.md)
- [MLGPUComputeDevice](coreml/mlgpucomputedevice.md)
- [MLNeuralEngineComputeDevice](coreml/mlneuralenginecomputedevice.md)
- [MLComputeDeviceProtocol](coreml/mlcomputedeviceprotocol.md)
