Package ai.beestream.jitnn.onnx
package ai.beestream.jitnn.onnx
The ONNX importer:
OnnxSession loads an ONNX file and runs it on
jitNN's operators. It has its own protocol-buffers reader and no third-party dependencies.-
ClassDescriptionWrites a jitNN forward pass as an ONNX model (opset 20), for ONNX Runtime and the other ONNX tools.An ONNX model as read from its file: the main graph's nodes, initializers, inputs and outputs, and the operator-set versions.An attribute of a node; which fields are set depends on its type.A graph: its nodes in topological order, the initializers (weights and constants) by name, and its inputs and outputs.A node of the graph: an operator application, with the names of its input and output values.A tensor stored in the model: dims, element type and its data as little-endian bytes.A graph input or output: name, element type and dims (-1 for a symbolic dimension), with the symbolic dimensions' names (
dim_param, null where a dimension has none or dims is null).Runs an ONNX model with jitNN: each node becomes jitNN operations, so a call records one trace that jitNN compiles into a TornadoVM plan on the first run and replays afterwards (same input shapes).A reader for the protocol buffers wire format, enough to decode ONNX's messages without a protobuf library: varints, fixed 32/64-bit values and length-delimited fields (strings, bytes, nested messages and packed repeated numbers).Receives double values fromProto.doubles(Proto.DoubleSink).Receives float values fromProto.floats(Proto.FloatSink).Receives int64 values fromProto.longs(Proto.LongSink).