Expand description
TrtActor — sibling of atomr_accel_cuda::DeviceActor.
Lifecycle:
- On
Buildit consumes a network builder (or ONNX bytes whentensorrt-onnxis enabled) plus anIBuilderConfig, drivesIBuilder::buildSerializedNetworkand returns anEnginePlan. - On
Deserializeit loads a previously built plan into anTrtEngine. - On
CreateContextit creates a freshExecutionContext. - On
EnqueueOnStream { stream, context, reply }it submits the inference on the suppliedArc<cudarc::driver::CudaStream>— the same stream type carried byDeviceActorso the two actors share one CUDA execution timeline. - On
Refitit patches engine weights via [TrtRefitter].
The actor keeps the TrtEngine alive in an Arc so multiple
ExecutionContexts can share it.
Structs§
- Refit
Weights - 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
DevicePtrtag 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§
- Network
Source - Network description for
TrtMsg::Build. The builder API has many entry points; for now we accept either a serialised ONNX blob (undertensorrt-onnx) or a precompiled TensorRT plan to import. - TrtMsg
- Public message surface for
TrtActor.
Type Aliases§
- Build
From Onnx Reply - Build
Reply - Reply types for each
TrtMsgvariant. Each is aoneshot::Senderso the actor never blocks on IO. - Create
Context Reply - Deserialize
Reply - Enqueue
Reply - Execute
Reply - Refit
Reply