<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreML",
  "identifier" : "/documentation/CoreML/MLComputeDevice",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Core ML"
    ],
    "preciseIdentifier" : "s:6CoreML15MLComputeDeviceO"
  },
  "title" : "MLComputeDevice"
}
-->

# MLComputeDevice

Compute devices for framework operations.

```
enum MLComputeDevice
```

## Topics

### Device types

[`MLComputeDevice.cpu(_:)`](/documentation/CoreML/MLComputeDevice/cpu(_:))

A device that represents a CPU compute device.

[`MLComputeDevice.gpu(_:)`](/documentation/CoreML/MLComputeDevice/gpu(_:))

A device that represents a GPU compute device.

[`MLComputeDevice.neuralEngine(_:)`](/documentation/CoreML/MLComputeDevice/neuralEngine(_:))

A device that represents a Neural Engine compute device.

### Getting all devices

[`allComputeDevices`](/documentation/CoreML/MLComputeDevice/allComputeDevices)

Returns an array that contains all of the compute devices that are accessible.

## Relationships

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`Equatable`](/documentation/Swift/Equatable)

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

---

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)