docs.rs failed to build ane-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
ane
Rust bindings for Apple Neural Engine (ANE) via the private AppleNeuralEngine.framework.
Provides a symbolic graph builder and a compile-then-run lifecycle through _ANEInMemoryModel, using IOSurface-backed zero-copy I/O.
Example
use ;
let mut graph = new;
let input = graph.placeholder;
let weights = graph.constant;
let output = graph.convolution_2d_1x1;
let output = graph.relu;
let executable = graph.compile?;
let input_tensor = with_f32;
let output_tensor = new;
executable.run?;
let result = output_tensor.read_f32;
GPT-2 forward pass
The included gpt2_forward example downloads GPT-2 124M from Hugging Face, compiles the transformer layers to ANE, and runs autoregressive text generation with KV-cache:
cargo run --release --example gpt2_forward
Research
The ANE internals research behind this crate was inspired by Mohamed Ghannam's weightBufs exploit chain writeup, which documents the ANE architecture, the aned / ANECompilerService pipeline, and the kernel interface (AppleH11ANEInterface).