[IE TEST] Fix converiting to constant in applying of meta info (#9666)

This commit is contained in:
Sofya Balandina 2022-01-18 19:08:20 +03:00 committed by GitHub
parent d520e5558f
commit 832b5d0f60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -98,8 +98,23 @@ void ReadIRTest::SetUp() {
}
return info;
};
for (const auto &param : function->get_parameters()) {
auto idx = function->get_parameter_index(param);
auto params = function->get_parameters();
for (const auto &param : params) {
auto idx = -1;
for (size_t i = 0; i < param->get_output_size(); i++) {
for (const auto &node : param->get_output_target_inputs(i)) {
const auto nodePtr = node.get_node()->shared_from_this();
for (size_t port = 0; port < nodePtr->get_input_size(); ++port) {
if (nodePtr->get_input_node_ptr(port)->shared_from_this() == param->shared_from_this()) {
idx = port;
break;
}
}
}
}
EXPECT_GE(idx, 0);
auto info = getPortInfo(idx);
if (info.convert_to_const) {
const auto constant = ngraph::builder::makeConstant(param->get_element_type(),