Skip to main content

Module actor

Module actor 

Source
Expand description

TrtActor — sibling of atomr_accel_cuda::DeviceActor.

Lifecycle:

  • On Build it consumes a network builder (or ONNX bytes when tensorrt-onnx is enabled) plus an IBuilderConfig, drives IBuilder::buildSerializedNetwork and returns an EnginePlan.
  • On Deserialize it loads a previously built plan into an TrtEngine.
  • On CreateContext it creates a fresh ExecutionContext.
  • On EnqueueOnStream { stream, context, reply } it submits the inference on the supplied Arc<cudarc::driver::CudaStream> — the same stream type carried by DeviceActor so the two actors share one CUDA execution timeline.
  • On Refit it patches engine weights via [TrtRefitter].

The actor keeps the TrtEngine alive in an Arc so multiple ExecutionContexts can share it.

Structs§

RefitWeights
Descriptor of a single weight blob to push into the engine via the refitter. The pointer / device pointer is not held inside the message; instead callers pass a host-side blob (refitter stages it). Future variants can add a DevicePtr tag if direct device-to-device refit is desired.
TrtActor
TrtActor — owns nothing across messages besides the FFI runtime/builder handles, all engines/contexts ride the messages.

Enums§

NetworkSource
Network description for TrtMsg::Build. The builder API has many entry points; for now we accept either a serialised ONNX blob (under tensorrt-onnx) or a precompiled TensorRT plan to import.
TrtMsg
Public message surface for TrtActor.

Type Aliases§

BuildFromOnnxReply
BuildReply
Reply types for each TrtMsg variant. Each is a oneshot::Sender so the actor never blocks on IO.
CreateContextReply
DeserializeReply
EnqueueReply
ExecuteReply
RefitReply