Skip to content

Commit

Permalink
benhcmark_app: fix -api sync -i multiple images (openvinotoolkit#19142)
Browse files Browse the repository at this point in the history
The Python version uses `app_inputs_info` to represent different input configurations, but the C++ version extends that use case and uses `app_inputs_info` to represent different input images as well. That means that the assumption that if `app_input_info.size() > 1`, then input shape is dynamic, doesn’t always hold for C++

Ticket 117673
  • Loading branch information
Wovchena authored Aug 11, 2023
1 parent e33de35 commit 396a899
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion samples/cpp/benchmark_app/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,14 @@ std::vector<float> split_float(const std::string& s, char delim) {
}

bool can_measure_as_static(const std::vector<benchmark_app::InputsInfo>& app_input_info) {
return app_input_info.size() == 1;
for (const benchmark_app::InputsInfo& info : app_input_info) {
for (const auto& pair : info) {
if (pair.second.partialShape.is_dynamic() && app_input_info.size() > 1) {
return false;
}
}
}
return true;
}

static const std::vector<std::string> meta_plugins{"MULTI", "HETERO", "AUTO"};
Expand Down

0 comments on commit 396a899

Please sign in to comment.