* Eliminate no-op elementwise operations
This change adds EliminateEltwise pass to NopElimination.
EliminateEltwise removes:
- Subtract with zero
- Multiply with one
- Divide by one
* add Add support to EliminateEltwise
* fix unit test
* use get_all_data_elements_bitwise_identical instead of get_single_value
* fix are_all_data_elements_bitwise_identical for constant created from HostTensor
* fix lpt tests
* check for mul in is_dequantization_subgraph function
* optimize fetching constant value
* apply review comments
* [Common FrontEnd] Implement ChangePlaceholderType transformation with OldApiMap
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Add ChangePlaceholderType pass into frontend normalize
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Add a comment about the transformation
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Fix build issue
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Apply code review comments: remove ngraph namespace rountine, etc.
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Remove use of extra Node object in set_old_api_map call
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Create separate pass for legacy nGraph transformations for MO with new frontend
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Fix build for ieFuncTests
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Fix build issue with namespace conflicts
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Revert "Fix build issue with namespace conflicts"
This reverts commit 50a189f4e5.
* Move legacy transformations to ngraph namespace
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Fix build issue with unresolved MOCLegacyTransformation
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Adjust code to new OldApiMap API
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Resolve merge conflicts
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Fix build issue
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Do not set legacy type for parameter in case user defined type
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Removed old dynamism API from infer request
* Fixed segfault
* Fixed some tests
* Added method to set inputs, outputs
* Fix python tests
* Try to fix window build
* Calculate model layout based on 'tensor' layout and convert steps
Previously, 'model layout' is set to '...' by default,
thus no shape conversion happened when tensor layout is set to 'NHWC', then there was explicit convert_layout "NCHW"
Now "model layout" is calculated based on tensor layout and conversion steps:
Examples:
1) Tensor: NHWC, Convert: NCHW. Result: NCHW
2) Tensor: NHWC, Convert: 0312. Result: NCHW
* Initial move of tensor data calculation
* Moved 'impls' to new file
* Postprocessing + unit tests
* clang-format fix
* Added more details to preprocessing nodes
- Mean/Scale - will print mean/scale values
- Convert type - will print type
- Convert layout - will print destination layout
- Convert color - will print destination color
It is needed to troubleshoot the problems. If error occurs, message will not display last op's target shape/layout/type
* Add python bindings
* update tests
* Added memory type to dump if set
* Code style fix
* unity build fix
* Dump tensor if only memory type is set
* Added debug print
* Fix Param->Result case
Previously, layout was set by preprocessing set to old parameter as well
This is incorrect because in case of exception layout info will not be reverted
In this case old Result pointed to old Parameter and was able to preserve runtime info
After fixing of this, case Param->Result was broken if revalidation is not triggerred
Fix is to detect 'Result' as a consumer of some parameter and force revalidation in this case
* Revert occasionally committed line
* And one more line