Log which InferenceCalculator impl is used at runtime.

PiperOrigin-RevId: 506343086
This commit is contained in:
Juhyun Lee 2023-02-01 09:43:28 -08:00 committed by Copybara-Service
parent 3ee377f671
commit 0919a6c0a3

View File

@ -63,6 +63,10 @@ class InferenceCalculatorSelectorImpl
for (const auto& suffix : impls) {
const auto impl = absl::StrCat("InferenceCalculator", suffix);
if (!mediapipe::CalculatorBaseRegistry::IsRegistered(impl)) continue;
VLOG(1) << "Using " << suffix << " for InferenceCalculator with "
<< (options.has_model_path()
? "model " + options.model_path()
: "output_stream " + subgraph_node.output_stream(0));
CalculatorGraphConfig::Node impl_node = subgraph_node;
impl_node.set_calculator(impl);
return tool::MakeSingleNodeGraph(std::move(impl_node));