pub struct TensorRtBackend {
pub inference_metrics: InferenceMetrics,
pub precision_policy: PrecisionPolicy,
pub batch_config: BatchConfig,
/* private fields */
}Fields§
§inference_metrics: InferenceMetrics§precision_policy: PrecisionPolicyPhase 8: precision policy for TRT EP.
batch_config: BatchConfigPhase 8: batch configuration.
Implementations§
Source§impl TensorRtBackend
impl TensorRtBackend
Sourcepub fn new(
model_path: PathBuf,
ctx: Arc<GpuContext>,
device_id: i32,
ring_size: usize,
downstream_capacity: usize,
) -> Self
pub fn new( model_path: PathBuf, ctx: Arc<GpuContext>, device_id: i32, ring_size: usize, downstream_capacity: usize, ) -> Self
Create a new backend instance.
§Parameters
ring_size: number of output ring slots to pre-allocate.downstream_capacity: the bounded channel capacity between inference and the encoder. Ring size is validated ≥downstream_capacity + 2.
Sourcepub fn with_precision(
model_path: PathBuf,
ctx: Arc<GpuContext>,
device_id: i32,
ring_size: usize,
downstream_capacity: usize,
precision_policy: PrecisionPolicy,
batch_config: BatchConfig,
) -> Self
pub fn with_precision( model_path: PathBuf, ctx: Arc<GpuContext>, device_id: i32, ring_size: usize, downstream_capacity: usize, precision_policy: PrecisionPolicy, batch_config: BatchConfig, ) -> Self
Create with explicit precision policy and batch config.
Trait Implementations§
Source§impl Drop for TensorRtBackend
impl Drop for TensorRtBackend
Source§impl UpscaleBackend for TensorRtBackend
impl UpscaleBackend for TensorRtBackend
fn initialize<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn process<'life0, 'async_trait>(
&'life0 self,
input: GpuTexture,
) -> Pin<Box<dyn Future<Output = Result<GpuTexture>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn metadata(&self) -> Result<&ModelMetadata>
Auto Trait Implementations§
impl !Freeze for TensorRtBackend
impl !RefUnwindSafe for TensorRtBackend
impl Send for TensorRtBackend
impl Sync for TensorRtBackend
impl Unpin for TensorRtBackend
impl UnsafeUnpin for TensorRtBackend
impl !UnwindSafe for TensorRtBackend
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