Contents

MLComputeUnits

The set of processing-unit configurations the model can use to make predictions.

Declaration

enum MLComputeUnits

Overview

Use this enumeration to set or inspect the processing units you allow a model to use when it makes a prediction.

Use all to allow the OS to select the best processing unit to use (including the neural engine, if available).

Use MLComputeUnits.cpuOnly to restrict the model to the CPU, if your app might run in the background or runs other GPU intensive tasks.

Topics

Processing Unit Configurations

Creating compute units

See Also

Allowing access to processing units