init(type:selectsMultipleComputeDevices:)
Creates a device that you can configure to use multiple compute devices.
Declaration
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
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.