Report dynamic -data_shape (#18457)

Ticket 112256

Python check was already there
This commit is contained in:
Zlobin Vladimir 2023-07-17 16:32:01 +04:00 committed by GitHub
parent c1fde50cd9
commit a5880ee1eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -612,7 +612,18 @@ std::vector<benchmark_app::InputsInfo> get_inputs_info(const std::string& shape_
// Tensor Shape
if (info.partialShape.is_dynamic() && data_shapes_map.count(name)) {
info.dataShape = data_shapes_map.at(name)[input_id % data_shapes_map.at(name).size()];
ov::PartialShape p_shape = data_shapes_map.at(name)[input_id % data_shapes_map.at(name).size()];
if (p_shape.is_dynamic()) {
throw std::logic_error("Data shape always should be static, " + p_shape.to_string() +
" is dynamic.");
}
if (info.partialShape.compatible(p_shape)) {
info.dataShape = p_shape.to_shape();
} else {
throw std::logic_error("Data shape " + p_shape.to_string() + "provided for input " + name +
"is not compatible with partial shape " + info.partialShape.to_string() +
" for this input.");
}
} else if (info.partialShape.is_dynamic() && fileNames.count(filesInputName) && info.is_image()) {
auto& namesVector = fileNames.at(filesInputName);
if (contains_binaries(namesVector)) {