---
title: "init(type:selectsMultipleComputeDevices:)"
framework: ML Compute
role: symbol
role_heading: Initializer
platforms: [iOS 14.5+, iPadOS 14.5+, Mac Catalyst 14.5+, macOS 11.3+, tvOS 14.5+]
path: "mlcompute/mlcdevice/init(type:selectsmultiplecomputedevices:)"
---

# init(type:selectsMultipleComputeDevices:)

Creates a device that you can configure to use multiple compute devices.

## Declaration

```swift
convenience init?(type: MLCDeviceType, selectsMultipleComputeDevices: Bool)
```

## Parameters

- `type`: The device type.
- `selectsMultipleComputeDevices`: A Boolean that indicates whether to select multiple compute devices if the system supports it.

## Discussion

Discussion For the type parameter, use MLCDeviceType.any unless you need to control device selection. This ensures that the framework selects the best device to execute the neural network.

## See Also

### Creating Devices

- [init(type:)](mlcompute/mlcdevice/init(type:).md)
- [MLCDeviceType](mlcompute/mlcdevicetype.md)
- [init(gpuDevices:)](mlcompute/mlcdevice/init(gpudevices:)-4mj85.md)
- [cpu()](mlcompute/mlcdevice/cpu().md)
- [gpu()](mlcompute/mlcdevice/gpu().md)
- [ane()](mlcompute/mlcdevice/ane().md)
