Skip to navigation

holoscan::ops::inference_eligibility::select_dispatch_kind

Beta
View as Markdown
inline DispatchSelection holoscan::ops::inference_eligibility::select_dispatch_kind(
const std::map<std::string, std::string> &model_path_map,
const std::map<std::string, std::vector<std::string>> &input_map,
const std::map<std::string, std::vector<std::string>> &output_map,
const std::string &backend,
const std::map<std::string, std::string> &backend_map,
bool input_on_cuda,
bool dynamic_input_dims,
bool parallel_inference
)

Pure, unit-testable dispatch-kind selector.

Static blockers (any one forces kStandard):

  • !input_on_cuda: the fast paths (do_inference_on_stream) do not stage host<->device input buffers.
  • chained models: any tensor produced by one model (output_map value) consumed as another model’s input (input_map value) — see has_chained_models().

Returns: The selected DispatchKind and, for single-model fast paths, the cached model name.

Parameters

model_path_map
const std::map<std::string, std::string> &

Model name -> model path.

input_map
const std::map<std::string, std::vector<std::string>> &

Model name -> input tensor names.

output_map
const std::map<std::string, std::vector<std::string>> &

Model name -> output tensor names.

backend
const std::string &

Scalar backend string (used when backend_map is empty).

backend_map
const std::map<std::string, std::string> &

Optional per-model backend override map.

input_on_cuda
bool

Whether input tensors are device-resident.

dynamic_input_dims
bool

Whether input dimensions may change between compute() calls.

parallel_inference
bool

Whether multi-model configurations should run in parallel.