pub(crate) fn prewarm_persistence_postcondition_failed(
fresh_compiles: usize,
engine_count_after: usize,
) -> boolExpand description
Decides whether a single worker’s prewarm postcondition is violated.
The postcondition: if at least one shape on this worker reported a
fresh compile (succeeded && !cache_hit) but the on-disk .engine
file count is still zero, the TRT EP almost certainly emitted Ok(_)
from session.run() without actually persisting the engine plan. This
is the silent-persistence failure mode where the TRT EP reports compile
success but writes no engine files (many compile-success events / 0 engines
on disk).
Returning true should produce an ERROR log so operators see the
failure in CloudWatch immediately. Non-fresh-compile shards (cache hits
only) and shards where at least one engine file exists are accepted.
The check is keyed on engine_count_after == 0 rather than
engine_count_delta <= 0. ORT’s TRT EP rewrites its single
profile-based engine file in-place as more shapes are compiled
(delta == 0 at steady state), so a delta-based rule would produce
false-positive ERRORs on every shape after the first compile.