Skip to navigation

holoscan::ops::inference_eligibility::resolve_dispatch_with_fallback

Beta
View as Markdown
inline FallbackDecision holoscan::ops::inference_eligibility::resolve_dispatch_with_fallback(
const FallbackContext &ctx
)

Runs the full fallback ladder for one InferenceOp configuration.

This is the single entry point InferenceOp::start() uses instead of calling select_dispatch_kind() / demote_if_stream_pool_insufficient() / decide_capture_protection() itself: it wraps those three (their logic is not duplicated here) and adds the degradation ladder plus the diagnostics needed to explain each degradation to the user.

Guarantees:

  • The returned configuration is always runnable: final_protection is never kRefuse, and a configuration that decide_capture_protection() would refuse is degraded instead of throwing.
  • Every degradation is recorded in chain in the order it was applied, so the caller can emit one log block per rung (see emit_fallback_decision()).

Rung order (see the README table): the static eligibility blockers (non-TRT backend, host inputs, chained models) -> stream pool insufficiency -> kDynParFast + graphs with no green context -> too few green-context partitions -> a summary warning that parallelism was requested but not obtained.

Returns: The final safe dispatch configuration and the full degradation chain.

Parameters

ctx
const FallbackContext &

Operator configuration plus resolved resource capabilities.