Docs / nablatensor-core / com.nablatensor.engine
interface
AadEngine
A backend able to turn a recorded tape into something replayable.
Implementations are discovered with ServiceLoader, so a backend becomes usable simply by being on the module path. An implementation that depends on an optional runtime capability — a CUDA device, an incubating JDK module — must keep that dependency out of its own class body and report it through isAvailable(), so that merely enumerating engines cannot fail on a machine that lacks it.
Methods
Stable lower-case identifier used by -Dnablatensor.engine.
Higher wins when selecting automatically. CUDA is 100, SIMD 50, scalar 10, so an accelerator is always preferred unless one is named explicitly.
Whether this engine can run here, right now. Must never throw.
Whether this engine can honour these options at all.
Short human-readable description of what it will run on.
The two limits every generated-kernel backend currently shares: one stream of standard normals, and one recorded output. Called at the top of compile so that automatic selection falls back to an engine that can take the tape rather than failing the run.
Guard for backends that only implement a single stream of standard-normal draws: throws (so automatic selection falls back to one that can) when the tape uses rec.randu() or a named rec.stream(...). A backend that has grown native support for those simply does not call this.
Guard for backends that only implement a single output: throws (so automatic selection falls back) when the tape was recorded with several rec.output(name, ...) calls.