Mikhail Nosov 8bfde58fd9 [Core] Improve performance for 'ov::Model::add_output' (#11052)
* Improve performance for 'ov::Model::add_output'

On first call of `add_output(tensor_name)` all available tensor names are cached.
Next calls take nodes from cache which significantly reduces complexity.
Cache is invalidated if topological cache is not valid or cache points to incorrect output (no tensor name of this node anymore)

The same caching is done for 'add_output(op_name, output_index)'

Tests:
- Verifies that adding outputs to all nodes has linear complexity O(N), not O(N^2)
- Verifies cache invalidation scenarios

* Fix python tests

* Update topological cache after add_output(Output<Node>) by adding result to the end of cached ops

* Add 'm_shared_rt_info' to 'result node just for consistency (there is actually no scenario which may fail due to absence of this info for Result

* Added test cases to verify that names cache should be cleared on refresh of 'get_ordered_ops'
2022-03-25 12:17:41 +03:00
2021-05-31 15:24:56 +03:00
2018-10-16 13:45:03 +03:00
2020-11-17 16:44:44 +03:00

OpenVINO™ Toolkit

Stable release Apache License Version 2.0 GitHub branch checks state Azure DevOps builds (branch) PyPI Downloads

This toolkit allows developers to deploy pre-trained deep learning models through a high-level OpenVINO™ Runtime C++ and Python APIs integrated with application logic.

This open source version includes several components: namely Model Optimizer, OpenVINO™ Runtime, Post-Training Optimization Tool, as well as CPU, GPU, MYRIAD, multi device and heterogeneous plugins to accelerate deep learning inferencing on Intel® CPUs and Intel® Processor Graphics. It supports pre-trained models from the Open Model Zoo, along with 100+ open source and public models in popular formats such as TensorFlow, ONNX, PaddlePaddle, MXNet, Caffe, Kaldi.

Repository components

License

OpenVINO™ Toolkit is licensed under Apache License Version 2.0. By contributing to the project, you agree to the license and copyright terms therein and release your contribution under these terms.

Resources

Support

Please report questions, issues and suggestions using:


* Other names and brands may be claimed as the property of others.

Languages
C++ 80.5%
Python 15.5%
C 2.8%
CMake 0.9%
Cython 0.1%