pub struct IBuilderConfig {
pub precision: Precision,
pub device_type: DeviceType,
pub structured_sparsity: bool,
pub tactic_sources: TacticSources,
pub timing_cache: Option<Vec<u8>>,
pub refit: RefitPolicy,
pub workspace_bytes: usize,
pub dla_sram_bytes: usize,
pub extra_flags: BuilderFlags,
}Expand description
Pure-Rust mirror of nvinfer1::IBuilderConfig. Holds the requested
knobs in a side table; the FFI shim under tensorrt-link replays
them against the C++ object inside BuilderActor::build.
Fields§
§precision: Precision§device_type: DeviceType§structured_sparsity: boolEnable structured 2:4 sparsity (Ampere+).
tactic_sources: TacticSourcesTactic-source allow-list (default: all on).
timing_cache: Option<Vec<u8>>Persist the per-build timing cache. None = no cache.
refit: RefitPolicyEngine refit policy.
workspace_bytes: usizeWorkspace memory pool budget (bytes).
dla_sram_bytes: usizeDLA SRAM pool budget (bytes), only honoured when device_type == Dla(_).
extra_flags: BuilderFlagsExtra builder flags merged in on top of precision.flags() —
allows callers to toggle e.g. DEBUG_KERNELS without losing
the high-level precision policy.
Implementations§
Source§impl IBuilderConfig
impl IBuilderConfig
pub fn new() -> Self
pub fn with_precision(self, p: Precision) -> Self
pub fn with_device(self, dt: DeviceType) -> Self
pub fn with_sparsity(self, on: bool) -> Self
pub fn with_tactic_sources(self, ts: TacticSources) -> Self
pub fn with_timing_cache(self, cache: Vec<u8>) -> Self
pub fn with_refit(self, refit: RefitPolicy) -> Self
pub fn with_workspace_bytes(self, bytes: usize) -> Self
pub fn with_extra_flags(self, flags: BuilderFlags) -> Self
Sourcepub fn effective_flags(&self) -> BuilderFlags
pub fn effective_flags(&self) -> BuilderFlags
Compute the final BuilderFlags bitmask the FFI shim would
pass to IBuilderConfig::setFlag(). Combines the precision
policy with refit + sparsity + caller-supplied extras.
Trait Implementations§
Source§impl Clone for IBuilderConfig
impl Clone for IBuilderConfig
Source§fn clone(&self) -> IBuilderConfig
fn clone(&self) -> IBuilderConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more