espressoe5rtdispatch

command
v0.7.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command espressoe5rtdispatch runs a MIL program on the Apple Neural Engine through Espresso's private e5rt_* direct dispatch route, and checks the answer. It calls the generated private/espresso binding through the example-local espressoe5rt adapter.

The route skips Core ML entirely. A MIL program and its weights are written to a directory, Espresso's compiler lowers them to a signed hardware program inside the aned daemon, and the result is bound to buffer objects and submitted on an execution stream:

config -> compiler -> options -> compile -> library -> function
       -> operation -> ports -> buffers -> stream -> execute

Compile runs once and is expensive; bind and dispatch are the hot loop.

Every stage prints what it observed. The demo's claim to have run on the Neural Engine rests on the last stage: the output buffer is compared against a float64 CPU reference computed in Go, so a route that silently returned zeros, or ran the wrong program, fails the check rather than printing a success it did not earn.

Two programs run. The first has a single weight tensor in its own file, the shape every MIL template in this repository emits. The second packs two weight tensors into one file at two different offsets, which is how the reference implementation lays out real models; it exercises github.com/tmc/apple/x/ane/mil.BlobWriter multi-entry output, a path this repository has never previously submitted to the compiler.

go run ./examples/ane/espressoe5rtdispatch
go run ./examples/ane/espressoe5rtdispatch -in 64 -out 64 -spatial 32
go run ./examples/ane/espressoe5rtdispatch -device cpu

The e5rt_* argument lists are not Apple-documented. They come from ANEForge, the source paper author's own working implementation. If a signature is wrong the process faults in C, where the fault is fatal and recover cannot see it, so a crash here is a real result and is reported as one.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL