Docs / nablatensor-core / com.nablatensor.engine

interface

AadExecutable

A tape that has been compiled by some AadEngine and can be replayed.

Recording and compilation happen once; after that a replay costs one dispatch to whatever backend produced this handle, no matter how many scenarios it covers. Inputs are arguments rather than baked-in constants, so setInput re-prices a shifted market with no re-record and no re-compile.

An engine implements the five core methods — engineName(), tape(), setInput, replay and close(). The segmentation methods (replaySafe, calibrate, measuredPathsPerSecond, maxChunkSeconds) and compileSeconds have working defaults that split a large replay into budgeted dispatches; AbstractAadExecutable is an optional base that provides the same with its own bookkeeping, and below it HostAadExecutable and GpuAadExecutable carry what a CPU replay and an accelerator replay respectively have in common.

Methods

String engineName()

Identifier of the engine that produced this handle, e.g. cuda.

AadTape tape()
void setInput(String name, double value)
AadResult replay(long paths, long pathOffset, long seed)

One dispatch covering paths scenarios starting at pathOffset.

void close()
double compileSeconds()

Wall-clock compilation time, paid once. Zero for engines that interpret.

AadResult replaySafe(long totalPaths, long seed)

Replays totalPaths as a series of dispatches, each sized from a measured rate to stay within maxChunkSeconds().

double calibrate(long seed)

Measures throughput with dispatches that start small and grow.

double measuredPathsPerSecond()
double maxChunkSeconds()

Per-dispatch wall-clock budget used to size chunks.