Skip to content

Commit

Permalink
Fixed issue with missing operations in SubgraphDumper (openvinotoolki…
Browse files Browse the repository at this point in the history
…t#13078)

* Fixed handling of missing "cloners" for operations

* Added missing opsets for cloners creation

Co-authored-by: Irina Efode <[email protected]>
  • Loading branch information
gkrivor and iefode authored Sep 19, 2022
1 parent f8f8257 commit e7c9151
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ const ClonersMap::cloners_map_type ClonersMap::cloners{
#include <ngraph/opsets/opset5_tbl.hpp>
#include <ngraph/opsets/opset6_tbl.hpp>
#include <ngraph/opsets/opset7_tbl.hpp>
#include <ngraph/opsets/opset8_tbl.hpp>
#include <ngraph/opsets/opset9_tbl.hpp>
};
#undef NGRAPH_OP

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,20 @@ void OPCache::update_ops_cache(const std::shared_ptr<ov::Node> &op,
}();

auto saveOpToCash = [&] {
const auto &clone_fn = SubgraphsDumper::ClonersMap::cloners.at(op->get_type_info());
LayerTestsUtils::OPInfo meta(source_model);
try {
const auto& clone_fn = SubgraphsDumper::ClonersMap::cloners.at(op->get_type_info());
LayerTestsUtils::OPInfo meta(source_model);
const std::shared_ptr<ov::Node> op_clone = clone_fn(op, meta);
if (!op_clone) {
return;
}
op_clone->set_friendly_name(op_clone->get_friendly_name() + "_cached");
m_ops_cache.insert({op_clone, meta});
} catch (std::exception &e) {
std::cout << e.what() << std::endl;
} catch (std::out_of_range& e) {
std::cout << "WARNING: Cloner for " << op->get_type_name() << " (" << op->get_type_info().get_version()
<< ") isn't found: " << e.what() << std::endl;
} catch (std::exception& e) {
std::cout << "ERROR: " << e.what() << std::endl;
}
};

Expand Down

0 comments on commit e7c9151

Please sign in to comment.