Processors Core ML may schedule the model on.
CPU_AND_NE is the reason this package exists: it is the only way
to reach the Neural Engine, which neither of Lucid's own backends
(Accelerate, MLX) targets.
Examples
>>> import shutil, tempfile
>>> import lucid, lucid.nn as nn, lucid.coreml as cml
>>> model = nn.Sequential(nn.Conv2d(3, 16, 3, padding=1), nn.ReLU()).eval()
>>> x, room = lucid.randn(1, 3, 32, 32), tempfile.mkdtemp()
>>> package = cml.export(model, x, f"{room}/m.mlpackage",
... precision=cml.Precision.FLOAT16,
... compute_units=cml.ComputeUnits.CPU_AND_NE)
>>> package.compute_units
<ComputeUnits.CPU_AND_NE: 'CPU_AND_NE'>
>>> set(package.compute_plan().compute) <= {"CPU", "ANE"} # never the GPU
True
>>> package.close()
>>> shutil.rmtree(room)