Expand description
Core ML host backend for GPU and Apple Neural Engine capable Macs.
The production path accepts device-neutral TOSA 1.0 FlatBuffers, validates and analyzes them
with virtio-accel-tosa, and lowers supported static floating-point and exact INT8 graphs
inside this host-native crate. Core ML models use an explicit CPU-and-accelerator policy:
CPUAndNeuralEngine by default, CPUAndGPU, or All when requested. All permit CPU
participation. FP32 NeuralNetwork graphs exclude ANE to preserve their precision.
Program buffers are page-aligned allocations wrapped directly by MLMultiArray;
output execution is accepted only when Core ML uses the same allocation as its output backing.
Structs§
- Core
MlAccelerator - Non-macOS placeholder that keeps workspace consumers portable.
- Core
MlArtifact - Builder for the provider-owned Core ML path artifact.
Enums§
- Artifact
Build Error - Invalid Core ML path artifact construction.
- Core
MlCompute Units - Explicit Core ML placement policy. All policies permit CPU participation; none promises exclusive or simultaneous execution on the selected accelerators.
- Feature
Role - A Core ML model feature’s role in one virtio-accel binding.
- Init
Error - Failure to initialize a Core ML backend instance.
- Lowering
Error
Constants§
- ARTIFACT_
FORMAT - Provider artifact format for
CoreMlArtifact. - COREML_
TOSA_ CAPABILITY - Conservative static floating-profile capability boundary for Core ML lowering.
- COREML_
TOSA_ FP8_ CAPABILITY - COREML_
TOSA_ FP8_ TARGET - COREML_
TOSA_ INTEGER_ CAPABILITY - Conservative integer-profile boundary for the macOS 26+ ML Program tier.
- COREML_
TOSA_ INTEGER_ TARGET - TOSA integer-profile target lowered to Core ML ML Program on macOS 26 or newer.
- COREML_
TOSA_ QUANTIZED_ CAPABILITY - COREML_
TOSA_ QUANTIZED_ TARGET - Mixed integer/float target for explicitly packed-storage graphs (including NVFP4).
- COREML_
TOSA_ TARGET - TOSA target currently lowered by the Core ML backend.
- REQUIRED_
RESIDENT_ BYTES - The Core ML runtime does not publish a finite upper bound for model residency.
- TARGET_
IDENTITY - Core ML path-artifact ABI v1 targeting CPU plus Apple Neural Engine execution.
Functions§
- supports_
tosa_ dtype - Whether this lowering can expose
dtypeat a Core ML model boundary. - supports_
tosa_ operator - Whether the initial Core ML lowering tier can lower
opfor supported types and attributes.