pub(super) struct PrewarmStats {
pub warmed: usize,
pub total_compile_ms: u64,
pub total_fsync_ms: u64,
pub fully_cached: bool,
pub skipped: usize,
pub fresh_compiles: usize,
pub engine_count_delta: i64,
pub engine_count_before: usize,
pub engine_count_after: usize,
pub max_warmed_seq: usize,
}Expand description
Aggregate per-worker statistics returned by trt_prewarm.
total_compile_ms and total_fsync_ms sum across only the shapes that
completed successfully on this worker’s shard, whether they were cache
hits or fresh compiles. They are intended for the "TensorRT pre-warm complete" summary log emitted by the worker.
Fields§
§warmed: usize§total_compile_ms: u64§total_fsync_ms: u64§fully_cached: booltrue when the dimensional-extreme coverage check determined the
entire shard was already cached and the remaining shapes were skipped.
false on cold cache, on a fresh compile, or when the check phase
detected at least one slow (≥ CACHE_HIT_THRESHOLD_MS) shape.
skipped: usizeNumber of shapes in the shard that were skipped because
fully_cached was determined to be true. Zero on cold cache or
when all shapes were run.
fresh_compiles: usizeNumber of shapes that reported a fresh compile (!cache_hit and
Ok(_) from session.run()). Used together with engine_count_delta
by the worker to decide whether the on-disk artifacts match what the
per-shape logs claimed.
engine_count_delta: i64Net .engine file count change across this worker’s prewarm sweep
(count_after_last_shape - count_before_first_shape). SM-filtered:
reflects only plans matching the worker’s GPU compute capability,
so a stale _sm89.engine next to a fresh _sm120.engine does not
silently zero out the delta on a Blackwell worker. Compared against
fresh_compiles to detect compile-success-without-persistence.
engine_count_before: usize.engine file count observed in engine_cache_dir before the worker
ran any of its shard’s shapes. SM-filtered: counts only plans matching
the worker’s GPU compute capability (see the sm parameter on
trt_prewarm). When SM detection failed and sm == None, falls
back to the legacy unfiltered count.
engine_count_after: usize.engine file count observed in engine_cache_dir after the worker
finished its shard (post final fsync). SM-filtered with the same
semantics as engine_count_before.
max_warmed_seq: usizeLargest sequence length among the shapes this worker successfully
warmed (fresh compile or warm-cache hit). Zero when no shape
succeeded (e.g. every compile failed, the worker-3 seq=8192 failure
mode). Folded into the pool-wide warmed_seq_ceiling atomic by the
worker so super::jit_guard::TrtJitGuard knows the highest sequence
tier with a persisted engine plan. See worker.rs.
Auto Trait Implementations§
impl Freeze for PrewarmStats
impl RefUnwindSafe for PrewarmStats
impl Send for PrewarmStats
impl Sync for PrewarmStats
impl Unpin for PrewarmStats
impl UnsafeUnpin for PrewarmStats
impl UnwindSafe for PrewarmStats
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more