Skip to main content

Module model

Module model 

Source
Expand description

Inference node (1×in → 1×out) that runs a generic ComputeBackend model.

§Design

  • No dynamic dispatch: backend and model are monomorphized by generics.
  • No unsafe in the hot path.
  • Batching:
    • no_std / no-alloc: stack-bounded batching up to MAX_BATCH.
    • alloc: uses Vec for flexible batch sizing.
  • Queues/telemetry are accessed only via StepContext.
  • Zero-copy preferences are expressed through PlacementAcceptance.

This node delegates inference to the model (infer_one / infer_batch), and pushes outputs directly to the provided output edge. It never copies unless required by payload semantics or batch buffering.

Structs§

InferenceModel
Generic 1×1 inference node for any backend (dyn-free).