[CONFORMANCE] Fix incorrect comparation model in (#21461)

This commit is contained in:
Irina Efode authored and GitHub committed 2023-12-07 18:03:30 +04:00
1 parent aa2dcb1f46
commit fef3d0d3aa
1 file changed
+3 -2
@@ -217,13 +217,14 @@ void SubgraphBaseTest::import_export() {
std::stringstream strm;
compiledModel.export_model(strm);
ov::CompiledModel importedModel = core->import_model(strm, targetDevice, configuration);
auto importedFunction = importedModel.get_runtime_model()->clone();
const auto importedFunction = importedModel.get_runtime_model()->clone();
const auto runtimeModel = compiledModel.get_runtime_model()->clone();
auto comparator = FunctionsComparator::with_default()
.enable(FunctionsComparator::ATTRIBUTES)
.enable(FunctionsComparator::NAMES)
.enable(FunctionsComparator::CONST_VALUES);
auto res = comparator.compare(importedFunction, function);
auto res = comparator.compare(importedFunction, runtimeModel);
if (!res.valid) {
throw std::runtime_error(res.message);
}