Skip to main content

prewarm_persistence_suspicious_undercount

Function prewarm_persistence_suspicious_undercount 

Source
pub(crate) fn prewarm_persistence_suspicious_undercount(
    fresh_compiles: usize,
    engine_count_after: usize,
) -> bool
Expand description

Decides whether the on-disk .engine count is suspiciously low relative to the number of fresh compiles, in a way not already caught by prewarm_persistence_postcondition_failed.

This is a non-fatal diagnostic signal intended to back a WARN log only — it must never cause the process to exit non-zero.

Current behaviour: always returns false when engine_count_after > 0. ORT’s TRT EP writes one profile-based engine file that covers all compiled shapes; engine_count_delta == 0 after the first compile is the normal steady-state, not an anomaly. The only meaningful anomaly is engine_count_after == 0, which is already caught by the ERROR predicate above. Future operators who need a ratio-based WARN for multi-engine workloads can re-introduce it here without changing call sites.