Skip to main content

build_shape_guard

Function build_shape_guard 

Source
pub(super) fn build_shape_guard(config: &WorkerConfig) -> Option<TrtJitGuard>
Expand description

Builds the per-request in-band TRT JIT guard from the worker config and the live pool-wide warmed-sequence ceiling.

Returns None (guard disabled) on non-TRT EPs or when BGE_M3_TRT_INBAND_JIT_GUARD=0, so the embed call sites pass None and skip all guard work. The ceiling is read fresh on every request so the decision reflects the latest coverage extended by adaptive warmup or engine propagation.