* resolve skipped HF models: 2nd batch
* commented out models with no info and less than 10 downloads
* Revert "commented out models with no info and less than 10 downloads"
This reverts commit a55861ed69.
* replace with self.image
* resolve todo
* Update tests/model_hub_tests/torch_tests/test_hf_transformers.py
Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
* Update tests/model_hub_tests/torch_tests/test_hf_transformers.py
---------
Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
* [OVC] do not parse inputs
* fix unit-tests
* remove redundant lines, add test case
* add one more unit-test
* skip None values
* replace str with List in test_mo_import_from_memory
* corrected type hints, added a safety assert
* fix parsing output
* use always coma backspace to separate outputs ', '
* update docstring
* call parser only for ovc cli tool
* docstring correction
* separate docs for cli tool and convert_model; other minor changes
* drop redundant arg from cli_parser_test.py
* more solid test cases added
* remove redundant argv.framework from cli_parser_test.py
* shape correction in concat
* Apply suggestions from code review
fix: coma -> comma
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
* apply review suggestions
* remove extra ')'
---------
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
* [MO] compress_to_fp16=True by default (2dn attempt)
* fix unit-tests
* second round of fixin unit-tests
* set compress_to_fp16 default to True in ovc/cli_parser.py
* use save_model in mo_python_api_tests
* enforce compress_to_fp16=False in test_zero_copy
* selectively compress depending on the path user has chosen to generate IR
* corrected doc
* allow compress_to_fp16=False/True for ovc
* doc and unit-tests failing fix
* user save_model in ovc cli tool
* revert back serialize and compress_model but into main instead of moc_emit_ir
* cover more argument combinations for cli tool and convert_model
* add support for scalar shapes into cli_parser.py
* add test-case with scalar shapes for convert_model
* reordered inputs in test-case with scalar shapes for convert_model
* minor clarifications
---------
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
* keep Const+DecompressionConvert pattern for CPU
* temporary disabled failing unit-tests
* disable CF by modifying bounds evaluate as well; minor corrections
* added TODOs with ticket numbers
* join const+decompression markings
* minimized convert_precision.cpp changes
* minor corrections
* refactor fp16 transformations: moved into separate fp16_compression folder
* style-fix
* minor fixes
* do not disable evaluate and CF in shape path
* safer disabling of Const conversion
* style-fix and minor corrections
* restore original placement of ConvertPrecision
* DOCS remove deprecated options
* removed a couple more not actual questions
* remove the whole lines completely
* remove a couple of more deprecations
* improve SoftMax fusion
* style and unit-test fix
* more precise SoftMax unit-tests
* rewritten SoftMaxFusion with single matcher
* fixes for align_mixed_fp32_fp16_types_test.cpp and mark_subgraph_to_keep_in_mixed_precision_test.cpp
* add include for pass/pattern/op/or.hpp
* get rank only when necessary
* style-fix
* add comment why SoftmaxFusion is called manually
* fix copy_runtime_info
* flush fp32 subnormals to zero in IR
* style fix in test_offline_api.py
* simplified call of FlushFP32SubnormalsToZero: is called form offline_transformations.cpp
* reverted offline_transformations.py
* use fpclassify
* style-fix
* Update src/common/transformations/tests/common_optimizations/flush_fp32_subnormals_to_zero_test.cpp
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
---------
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
* enable --compress_to_fp16 by default in MO
* corrected docs, added warning if user did't specify --compress_to_fp16 explicitly
* fix failing MO unit-tests
* do not wipe out data_type if user defined it explicitly by cli argument
* updated warning message and docs
* corrected phrasing
* corrected phrasing in FP16_Compression.md
* set compress_to_fp16=False for convert tests
* leftover: set compress_to_fp16=False for convert tests
* minor correction
* print info message in main.py, som minor changes
* typos fix
* fix losing information whether arguments set by user or got from defaults
* returned back default values instead of None
* more selective correcting of test_mo_convert_pytorch.py; added test for cases when compression is enabled/disabled or left by default
* fix test_mo_convert_pytorch.py
* speed up constant folding and improved load time for FP16
* fix unit-tests
* added OPENVINO_SUPPRESS_DEPRECATED_START
* new evaluate for Convert; added constructor for Constant; constant copying by reference during constant_fold
* removed deprecation macro from Convert evaluate
* returned back Convert evaluate to old HostTensorPtr because it's used in tests accuracy comparator
* add pattern mathing for MVN, Exp->ReduceSum, L2Normalize, Div with eps for mixed precision inference
* added necessary includes
* clang_format_fix_all
* fix warning_as_error for unused variable
* fix warning_as_error for specifying float literals
* enable marking for fp32 IRs as well
* cosmetic improvements in unit-tests
* fix warnings as error
* added unit-tests for compress_float_constants.cpp for out of range values
* Update align_mixed_fp32_fp16_types.cpp
* Apply suggestions from code review
Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
* some grooming: mainly in imports
* build fix: replaced ngraph:: -> ov::
* collected all markings in a single file
* shortened pass names
* style fix
* made MarkNormalizationOps as a separate pass
* removed redundant comment, fixed description of MarkSugraphsToKeepInMixedPrecision pass
* comments on Up and Down marking in MarkSugraphsToKeepInMixedPrecision
* cleared info messages in compress_float_constants.cpp, removed threshold adjusting from ENV
* moved declarations of MarkNormalizationOps, MarkExpInReduceOpPath, MarkDivWithEps to hide them from outside users
* simplified pattern matching for max_or_add
* moved `reduceop_path` rt_info inside mark_subgraphs_to_keep_in_mixed_precision.cpp
* fix potential bug with Convert
* removed redundant check for Converts in `insert_converts_after_if_needed` as well
* set Convert types more safely
* corrections in opset10 namespaces; some minor corrections
---------
Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
* fix checking if there are data nodes for operations with several outputs
* added unit-test
* added ports explicitly, removed redundant lambda
* typo in port
* removed deprecated cli arguments from MO
* removed deprecated options from docs
* Update tools/legacy/benchmark_app/README.md
* removed ConcatOptimization.py, removed deprecated args from unit-tests, renamed tensorflow_use_custom_operations_config -> transformations_config; replaced using or cmd_params.data_type -> cmd_params.compress_to_fp16
* added comment why we set internal 'data_type' always to 'FP32' after introducing 'compress_to_fp16'
* removed openvino_docs_MO_DG_prepare_model_Model_Optimization_Techniques from MO_DevGuide
* returned back --data_type argument
* leftovers from recovering
* returned back to package_BOM.txt; fixed NHWC by default for TF
* recovered --disable_nhwc_to_nchw to MO args
* reverted removing --tensorflow_use_custom_operations_config
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
* cleanup tmp IR files after unexpected failures
* separated catching during tmp serialize and fe.load
* updated file path specification
* moved base MO arguments into utils
* removed redundant 'except' blocks
* shortened specifying MO args
* calling unit-tests from subprocess; joined 2 try/except block into a single one
* changed postfix so that test is run without duplications only once
* turn on bom_tests
* fixed root directories to search
* leftovers fix
* removed requirements from package_BOM.txt; corrected error messages to install via pip
* removed extract_release_version.py from package_BOM.txt, added requirements files to skip
* removed redundant commented line
* mentioned CustomLayersMapping.xml.example in docs
Co-authored-by: Andrei Kochin <andrei.kochin@intel.com>
* handle 'and' marker in requirements
* Revert "handle 'and' marker in requirements"
This reverts commit 952bb949ca.
* moved importlib-metadata from requirements.txt into setup.py
* fixed version comparison: for comparsion extracted hashes are used
* shortened 7 -> 11 to match the current version fromat from nightly
* corrected regex, added comparing by minimal hash len
* forced split argument dtype to int
* added unit-test
* fixed typo in split_test.py
* set explicitly np.int64 instead of np.int
* use split_length's dtype
* grouped convolution resolver fix
* add reverse_infer for Transpose, Elementwise, Identity and some fixes to successfully OOB convert MXNet models
* add reverse_infer for BatchNorms, dynamic groups fix, multi_box_prior.py fix
* add reverse infer for trivial cases
* input rank setting for image detection ops
* reverse_infer for Gather, AttributedGather add todo comment for Parameter
* reverse infer for LSTM, swapaxis; fixes and unit-tests for Elementwise, Gather, Transpose; also generalized Parameter reverse_infer; fixed DetectionOutput and partial reverse_infer
* clarified comment for LSTM reverse_infer
* detalized Elementwise reverse_infer, added several more unit-tests, Split reverse_infer fix, IteratorGetNext_ext.py fix
* generalized group convolution resolver
* specified in_ports explicitly
* clarified Split, Concat, Parameter, other minor typos
* relaxed compatibility check for elementwise; simplified scalar extracting for convolution.py and gather.py, fixed replacer order for ConvolutionNormalizer.py
* added routine set_input_shapes for image detection ops
* fixed typos to pass locally E2E, slightly changed LSTM reverse_infer
* VariadicSplit reverse_infer bugfix
* IteratorGetNextCut.py added check if port is connected
* explicitly specified in_port, added asserts, improved Split reverse infer
* sorted imports
* reverse_infer for ONNX and MXNet LSTM, GRU, RNN operations
* replaced Error raising with red warning
* added missing return for defined input shapes, fixed getting num groups for tf conv
* added mandatory attributes; fixed failing unit-tests, fixed typo with scalar group in ConvolutionNormalizer
* removed priorbox reverse_infer; Parameter reverse_infer corrected to use the only one existing out_port
* fixed clarify_partial_shape_test
* cli_parser.py fix to accept scalar value for freezing
* update cli help
* fixed unit-tests, clarified help for specifying data type
* typos correction
* Moved and merged mo/ and extensions/ into openvino/tools/mo
* edited imports
* edited docs to use mo script from entry_point
* edited MO transformations list loading and setup.py
* changed full path -> 'mo' entry point in docs (leftovers)
* corrected package_BOM
* updated resolving --transformation_config in cli_parser.py
* pkgutil-style __init__.py, added summarize_graph into entry points
* updated DOCs for the new --transformations_config
* fix select
* updated install instructions, fixed setup.py for windows and python_version < 3.8
* fixed typo in requirements.txt
* resolved conflicts
* removed creating custom __init__.py from setup.py
* corrected folder with caffe proto
* corrected loading user defined extensions
* fix openvino.tools.mo import in serialize.py
* corrected layer tests for new namespace
* fix in get_testdata.py
* moved model-optimizer into tools/
* renamed import in POT
* corrected mo.yml
* correct CMakeLists.txt for the newest tools/mo
* corrected find_ie_version.py
* docs and openvino-dev setup.py update for the newest tools/mo
* miscellaneous leftovers and fixes
* corrected CI files, pybind11_add_module in CMakeLists.txt and use of tools/mo path instead of tools/model_optimizer
* add_subdirectory pybind11 for tools/mo
* POT path fix
* updated setupvars.sh setupvars.bat
* Revert "updated setupvars.sh setupvars.bat"
This reverts commit c011142340.
* removed model-optimizer env variables from setupvars
* updated CMakeLists.txt to pack MO properly with tests component
* corrected left imports, corrected loading requirements for layer tests
* mo doc typo correction
* minor corrections in docs; removed summarize_graph from entry_points
* get_started_windows.md, MonoDepth_how_to.md corrections, mo path corrections
* initial solution
* changed namespaces from ngraph -> ov; completed unit-tests
* added Power with negative exponent into the pattern
* division to -> division by; aligned with OV new folder structure; some minor corrections
* corrected pattern
* changed get_pattern_value_map -> get_pattern_map
* dynamic shape calculation for GatherElements
* dynamic shape calculation for sparse_reshape, corrections for sparse_segment_mean/sqrtn/sum
* corrected dynamic_dimension_value, added two unit-test cases
* simplified solution, added missing Nones
* some corrections
* added a couple of more unit-tests
* added IteratorGetNextCut, some improvements in graph.py
* added allowed types check
* reused new graph API for ports
* returned back old API 'out_nodes', removed soft-getting name from base class, changed run_after -> []
* correctly used new port API
* corrected IteratorGetNext message
* fixed dealing with None values in then/else branches of Select
* generalized solution when condition is non one elemental
* fix when both branches are None
* minor corrections
* rewritten Select unit-tests; fixed for condition with [True] mask
* removed mutable default arg from build_graph, added a few more test cases with masked condition, other minor corrections
* corrected output_shape calculation when broadcasting is off
* layer tests fixed: relaxed assert for condition shape to let pass TF Select
* corrected shape calculation when condition is not elementwise equal, calculated calculation for TF, corrected calculation of shape when values are not set
* fixed a typo for Select from TF Where
* updated pattern matcher into GatherBase in negative indices resolver, so that it is triggered in all versions of operation
* copy_runtime_info fix
* added constant folding
* inserted Convert to unsigned
* moved declarations from hpp into cpp, specification corrected
* added static const modifier
* updated convert specification
* minor corrections
* split into 3 passes(Init, Propogate, Update), renamed final pass to ConvertNmsGatherPathToUnsigned
* added description why transformation is needed
* added matcher for several NMS versions, removed TRANSFORMATIONS_API macros from cpp
* applied comments:
- used GraphRewrite instead of FunctionPass
- simplified some expressions
- corrected case when Converts output goes to multiple nodes
- added to MOC transformations
- other minor corrections
* removed redundant namespace prefixes
* fixed #include <ngraph/pass/graph_rewrite.hpp>
* removed matcher_scope, debug code, and redundant dynamic_cast
* turned on MarkingSubgraphsWithCorrectLayout for TF NCHW
* restricted MarkSubgraphsWithCorrectLayout.py only to TF
* added comments why need to MarkSubgraphsWithCorrectLayout even for TF NCHW models
* gather-8 upgrade/downgrade transforms
* bump to opset8
* add Gather-8 to MO
* fix permutation for Gather
* added TF layer tests, ONNX layer tests for negative indices, and nG python api unit-tests for negative indices
* typo fix, disable downgrading transformation
* disable downgrade in clDNN, line width style fix
* all Gathers are converted to 7th version, transformations will be enabled/disabled while op will be added into plugins
* disabled Gather8LayerTest on GPU
* added common function for Op replacement
* concretized meaning of negative indices, fixed some typos
* applied review comments: left only meaningful layer tests
* removed op replacing functions from common utils
* returned back transformations without subroutines
* corrected style, added comments to common_optimizations.cpp
* fix marking of nodes with shape values: corrected 'leaky' starting condition
* cleaned up code
* fixed t2t type collision error: removed strict assert from Pow; now type_infer is same as for other eltwise ops; added warnings about type alignment
* type cast for Pow according to ONNX spec
* fix highlight in dump_graph_for_graphviz
* soft_get('op')
* Revert "soft_get('op')"
This reverts commit cadfe18f
* Revert "type cast for Pow according to ONNX spec"
This reverts commit bf85ebf8
* applied review comments
* comment for ShapeOf bfs, removed Error from elementwise op
* reverted back dump_graph_for_graphviz: fill_color -> node_attrs
* applied last review comments: returned back Error, added type_infer into unit-test utils
* add upgrading gather1 -> gather7 transformation
* added G1->G7 to common_optimizations list but by default in turned off
* fixed a couple of typos in comments
* corrected validation error messages for GatherBase
* removed redundant comments
* clang format fix
* coNverts v1::Gather into v7::Gather
* added explicit batch_dims = 0, corrected axis bound check for dynamic data_rank
* corrected negative batch_dims normalization, some improvements in dynamism for Gather_7
* corrected transformation
* added batch_dims and axis normalization for reference
* updated INTERPRETER backend tests; replaced sizet_t -> int64_t in Gather evaluate
* returned back size_t in reference
* made Gather-1 source compatible with previous ngraph library versions
* added unittest for v7->v1, with nonzero batch_dims transformation should not be executed
* fix axis validation error message
* fix batch_dims gettter
* fixed v7->v1 unittest for nonzero batch_dims
* nG Python api for Gather and IE IR reader tests
* also included old IE IR reader test for Gather1
* added a blank line before Gather
* style corrections
* applied review comments
* removed blank line
* removed xfailed for Gather7 with batch_dims since CPU was moved to nGraph (...allows to fallback node execution on ngraph evaluate() method in case if optimized implementation is absent)
* added new visitor tests
* initial solution
* added unit-tests + some corrections
* axis getting improvements
* fixed MO IR reader for old IR's
* a couple of corrections
* applied review comments
* corrected negative batch_dims normalization for shape calculation, for IR original negative values are kept
* added additional checks and negative tests
* v7->v1 works fine
* gather v1->v7 works fine
* changed op::v7 -> opset7, op:v1 -> opset1
* bumped to gather7 in all transformations
* applied review comments
* fixed pre-commit failures
* disabled incorrect unit-test, fixed f32->i32
* added comments why AddConvertToReorderTest was disabled
* Revert "bumped to gather7 in all transformations"
This reverts commit 965dc295
* fixed typos in v1->v7, v7->v1
* added GatherBase, redefined pattern in eliminate_unsqueeze gather, turned on Gather downgrading transformation
* resolved conflicts and build errors
* 🚀 finally EliminateUnsqueezeGather works: added inheritance of RTTI info from GatherBase
* fixed pre-commit failurer
* removed redundant debug code
* reverted f32 for Gather-1 indices in unit-tests and transformations
* relaxed restrictions for indices and axis type for v1::Gather
* corrected op scope
* moved type_check to validation_util.cpp
* removed type checks from Gather, removed upgrading transformation
* applied review coments
* fixed minor typos
* nGraph shell implementation of Gather-7
* review comments applied
* style_apply
* applied @ilyachur's comments
* style-apply
* applied @popovaan's comments
* changed ieFuncTest for Gather (now is created from op version instead of opset) added check for batch_dims
* clang_format_fix and some other corrections
* returned back opset3::Gather in ieFuncTests
* added `constexpr` to `AXIS_NOT_SET_VALUE` as @vgavrilo suggested
* removed AXIS_NOT_SET_VALUE and added proper support when axis is not specified
* clang_format_fix_all
* applied review comments: added support for dynamic axis
* applied review comments, minor corrections in gather_elements
* Initial working solution
* moved bfs_search_apply_on_shapeof_subgraph_nodes from utils/graph.py to MarkShapeOfSubgraphDataType.py
* Reused bfs from MarkSubgraphsWithCorrectLayout.py
* fixed e2e precomit issues: specified correct const data_types, fixed BFS search staring point to avoid nodeless shapeof subgraphs
* fixed mxnet_rnnt: added converting all Const nodes in ShapeOf subgraph in MarkAndChangeDataTypeInShapeOfSubgraphs.py, revised Const values in transformations that affect ShapeOf subgraph nodes
* reverter ReverseV2ToReverseSequence.py and DecomposeBidirectionalRNNSequence.py
* in MarkSubgraphsWithCorrectLayout BFS search beauty applied
* apply review comments, returned back 'in_shape_subgraph' attribute
* graph condition added
* MO IR reader fix for mixed FP16 models, added replacer order placement comment
* moved to back phase
* new solution with marking nodes from bottom to top (WIP)
* successfully tested on back phase
* corrected unittest
* removed check for start nodes size in bfs
* fix transformations that insert f64 to f32 in shape subgraph
* corrected log.warning -> log.debug
* revised list if shape input operations added unittest for Const shape inputs
* applied @lazarevevgeny's comments
* licence head corrections
* [MO][TF] Fixed TFSliceToSlice conversion error on Win, replaced int32_max with ShapeOf, minor correction in comments
* review apply: added create_op_with_const_inputs
* review apply: renamed variables, updated typehints for int64_array, float_array, float32_array
* renamed to correct_ends
* returned back check_op_attrs=True
* Added TF broadcast_to extractor
* updated Supported_Frameworks_Layers.md
* corrected name
* corrected op name in Supported_Frameworks_Layers.md
* added a space after BroadcastTo in Supported_Frameworks_Layers.md
* fix ss
* successfully converted
* successfully run moved infer and normalizer unit-tests
* successfully rewritten StridedSlice infer unittests
* int64 array
* Successfully converter crash-when-loading, xj_feauture and toy nets (cherry-picked maxpoolV4 and tf_broadcast_ext)
* successfully moved PermuteAttrs to general mechanism
* successfully converted xj_feauture and crash when loading with the new rewritten SS infer
* fixed get_shape_from_slice and moved to common utils
* fixed extending masks and some other
* some refactoring
* fixed extending masks in extractor, fixed licence year and some other code clearing
* corrected a couple of unittests
* fox permute for 5 rank slice and 4 rank inputs/
* WIP
* Added comments
* fixed StridedSlice in ProposalMutation.py
* rechecked shape_infer unittests added some new cases
* added shape_infer unit-tests after StridedSliceNormalizer pass and Permute unit-tests
* corrected unittests
* Applied review comments
* general permutations for inputs implemented, corrected ellipsis unrolling when shrink_axis is at the beginning, some other corrections
* removed code duplication in infer and normalizer, moved 'slices' attr normalizing to StridedSliceNormalizer.py
* removed some code duplication and other minor improvements
* Added tests
* minor corrections
* wider range of unittests added (froze the number)
* review comments applied
* enabled skipped unit-test
* comment corrections
* applied review comments: changed op -> type, added some asserts, corrected comments and other minor corrections
* sorted inputs, updated Supported_Frameworks_Layers.md, some minor
* fix MO cli_parser when input contains substring with matching scale/mean values
* some additions to cli_parser unit-tests
* fixed numpy array comparisons -- added assert_ prefix
* more general solution for mean/scale cli_parser, names with only digit values are processed correctly
* minor corrections
* added getting nms_threshold/iou_threshold from original TF RetinaNet model
* iou_threshold definition added
* fixed getting iou_threshold for TF NMS V2, some minor corrections
* added box_encoding to NMS extractors
* [MO] [Kaldi] Added TDNN Component
* TdnnComponent replacer graphical comment updated
* Added SpecAugmentTimeMaskComponent
* some refactor of memoryoffset shape_infer
* moved memoryoffset splitting to the middle stage
* some corrections
- set `need_shape_inferenc`=False in split_memoryoffset
- use cycle instead of pattern in tdnn_replacer
* separated splitting of MemoryOffsets in LSTM and TDNN blocks
* set transpose_weights=True in TdnnComponent
* Corrected Supported_Frameworks_Layers
* corrected comments
* separate naming for tdnn and lstm memoryoffset splits
* corrected BOM file
* corrected generaldropout_ext.py and removed 'has_default' for tdnn_component
* corrections after PR review
* renamed LSTM -> recurrent; added setting element_size for paired nodes of tdnn_memoffset and othe minor changes
* Update split_tdnn_memoryoffset.py
* corrected partial infer with new API in elemental.py and split_tdnn_memoryoffset.py