[IE TESTS][CONFORMANCE] Support dynamic shapes in Operation Conformance (#10400)

* emove namespeca unity

* [IE TESTS][IE CONFORMANCE] Suppot dynamic shapes in Operation Conformance runner

* Update CMakeLists.txt

* Fix dim generation
This commit is contained in:
Irina Efode 2022-02-17 11:27:45 +03:00 committed by GitHub
parent ed323afc93
commit 68f523010e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,6 +11,7 @@
#include "ngraph_functions/builders.hpp" #include "ngraph_functions/builders.hpp"
#include "common_test_utils/file_utils.hpp" #include "common_test_utils/file_utils.hpp"
#include "common_test_utils/data_utils.hpp"
#include "common_test_utils/common_utils.hpp" #include "common_test_utils/common_utils.hpp"
#include "functional_test_utils/layer_test_utils/op_info.hpp" #include "functional_test_utils/layer_test_utils/op_info.hpp"
#include "functional_test_utils/skip_tests_config.hpp" #include "functional_test_utils/skip_tests_config.hpp"
@ -140,18 +141,25 @@ void ReadIRTest::SetUp() {
} }
} }
} }
std::vector<ov::Shape> staticShapes; std::vector<InputShape> inputShapes;
for (const auto param : function->get_parameters()) { for (const auto& param : function -> get_parameters()) {
if (param->get_partial_shape().is_static()) { if (param->get_partial_shape().is_static()) {
staticShapes.push_back(param->get_shape()); inputShapes.push_back(InputShape{{}, {param->get_shape()}});
} else { } else {
staticShapes.push_back(param->get_partial_shape().get_max_shape()); ov::Shape midShape;
for (const auto s : param->get_partial_shape()) {
int dimValue = s.get_length();
if (s.is_dynamic()) {
CommonTestUtils::fill_data_random(&dimValue, 1, s.get_max_length() - s.get_min_length(), s.get_min_length(), 1);
}
midShape.push_back(dimValue);
}
inputShapes.push_back(InputShape{param->get_partial_shape(), { param->get_partial_shape().get_min_shape(),
param->get_partial_shape().get_max_shape(),
midShape }});
} }
} }
for (const auto& param : function->get_parameters()) { init_input_shapes(inputShapes);
inputDynamicShapes.push_back(param->get_partial_shape());
}
targetStaticShapes.push_back(staticShapes);
} }
} // namespace subgraph } // namespace subgraph