Contents

ane()

Creates a device that uses the Apple Neural Engine, if one exists.

Declaration

class func ane() -> Self?

Return Value

A device that uses the Apple Neural Engine, or nil if none exists.

Discussion

When you select this device, the system uses the Apple Neural Engine to execute valid layers. Layers that can’t execute on the Apple Neural Engine run on the CPU or GPU. The system doesn’t select the Apple Neural Engine if you use MLCDeviceType.any.

This device applies to inference graphs only. It doesn’t work with a training graph or inference graph that shares layers with a training graph.

See Also

Creating Devices