pub struct TensorRtConfig {
pub plan_path: PathBuf,
pub max_batch_size: u32,
pub precision: TrtPrecision,
pub device_id: u32,
}Expand description
Engine-loading configuration.
The plan_path is a serialised TensorRT plan (output of
IBuilder::buildSerializedNetwork or
atomr-accel-tensorrt::TrtMsg::Build). Builds are out-of-scope
for this runner — operators either hand-build a plan with the
upstream actor or import an ONNX file via the tensorrt-onnx
feature on atomr-accel-tensorrt.
Fields§
§plan_path: PathBufPath to a serialised TensorRT plan.
max_batch_size: u32Maximum batch size the engine was built for. Used by the adapter layer (when wired) to chunk requests.
precision: TrtPrecisionPrecision the engine was built for. Reported via telemetry; the engine itself encodes the constraints.
device_id: u32CUDA device ordinal. Defaults to 0.
Trait Implementations§
Source§impl Clone for TensorRtConfig
impl Clone for TensorRtConfig
Source§fn clone(&self) -> TensorRtConfig
fn clone(&self) -> TensorRtConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TensorRtConfig
impl Debug for TensorRtConfig
Source§impl<'de> Deserialize<'de> for TensorRtConfig
impl<'de> Deserialize<'de> for TensorRtConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TensorRtConfig
impl RefUnwindSafe for TensorRtConfig
impl Send for TensorRtConfig
impl Sync for TensorRtConfig
impl Unpin for TensorRtConfig
impl UnsafeUnpin for TensorRtConfig
impl UnwindSafe for TensorRtConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more