Commit Graph

20 Commits

Author SHA1 Message Date
Dawid Kożykowski 9731d9a295
fix throwing exception for bool type (#8172) 2021-11-05 14:15:28 +01:00
Tomasz Dołbniak b5f0ca5d10
Offline transformations exposed to python with pybind11 (#7987)
* New approach to offline transformations

* Include paths fix

* Imports fix

* offline_transformations target dependency simplification

* MakeStatefulTransformation exposed to python

* Python bindings build configuration fix

* Test variable name refactor

* Stop crying (snow)flake

* Snake cased offline transformations API

* Removal of old offline transformations from python

* Imports adaptation to new code style

* offline_transformations as a part of the common wheel

* Cmake simplification and refactor

* Correct transform invocation

* CI fix

* Proper dependency check in MO

* _pyngraph as a dependency of MO in cmake

* IR serialization fix in MO

* POT adaptation to the new API

* Revert "Removal of old offline transformations from python"

This reverts commit f9a0551ead.

* Merge of old& new bindings for offline_transformations

* Revert "POT adaptation to the new API"

This reverts commit 499554e68c.

* Obsolete cmake line removal

* Missing comma and merge conflict fix

* Offline transformations tests fix

* IE imports removal from check_ie_bindings

* Installation of opevino/__init__.py fix

* Obsolete line removal

* MO serialization switched to the new API

* Revert of preliminary MO adaptation to the new API

* Another magic spell that will hopefully make CI pass

* Python api cmake dependencies reorg

* Temporary solution for the CI/cpack errors

* Installation fix and code formatting

* ie_api & pyopenvino dependency removal

* Explicit cpack configuration for the new API

* cpack configuration adaptation

* Revert of obsolete cpack changes

Co-authored-by: Alexander Zhogov <alexander.zhogov@intel.com>
2021-11-03 20:00:14 +03:00
Tomasz Jankowski de4ceba375
[ONNX FE] Add implementation of Frontend API methods for naming and annotation (#8026) 2021-11-02 09:35:04 +01:00
Jan Iwaszkiewicz d8f9445a96
Add new init to Tensor from array, add tests and helper methods for openvino tests (#8306) 2021-11-01 10:16:35 +03:00
Piotr Szmelczynski c729a6bfca
[PYTHON] Expose Layout class (#7578)
* Create binding for Layout class

* add import of Layout to __init__

* add Layout to pyngraph.cpp

* create test for Layout

* fix typo

* fix style

* clean file

* fix style

* add Layot import to ngrapph init

* remove const char* init

* style fix

* move Layout from pyngraph/ to pyopenvino/graph

* style fix

* add doc() and args to Layout

* add Layout to openvino init

* fix style

* change import name

* fix import

* add __str__ impl

* remove duplicate

* style fix

* update test_layout

* add eq and ne operators

* create test for eq and ne operators

* fix style

* update copyright year
2021-10-28 19:46:50 +03:00
Tomasz Dołbniak e8e7cdf306
Python 3.6.9 crash fix (#8273) 2021-10-28 14:49:06 +03:00
Ilya Lavrenov dfefb92164
Made ov::runtime::Tensor strides to be in bytes (#8078) 2021-10-21 22:35:58 +03:00
Katarzyna Mitrus e0062fc274
Extend openvino (ngraph) Python API for operation Slice-8 (#7965) 2021-10-21 10:22:51 +02:00
Jan Iwaszkiewicz 78358bacb0
[PYTHON API] Expose ngraph bindings as part of openvino API (#8027) 2021-10-18 21:36:48 +02:00
Alexey Lebedev db1eadac26
[PYTHON API] Tensor api for python (#7881)
* Bind ov Tensor

* Fix code style

* Fix code style

* Parse dtype for np.array in one constructor

* move dtypes map to common

* fix test

* remove empty constructor

* Add new constructor with numpy parameters

* pass numpy literal in constuctor

* Add comments about future removal

* fix code style

* add py::arg

* Add constructors

* add test

* add roi constructor

* Add test

* Add test

* Add test

* Fix code style

* Fix code style

* use np.all() in tests

* Fix strides

* Add test

Co-authored-by: Anastasia Kuporosova <anastasia.kuporosova@intel.com>
2021-10-14 00:41:49 +03:00
Anastasia Kuporosova cdb3e17763
[New Python API] Add new python API based on pybind11 (#7752)
* Mk/ov pybind poc (#48)

* Move _pyngraph module to ngraph.pyngraph

* Stub for IECore and IENetwork classes

* Additional API classes

* passing test, extended functions and added blob

* worksave

* [POC Python API] Add IECore methods

* [POC Python API] Add iecore tests

* ienetwork

* ienet, input_info, dataptr

* irequest and exeecnet

* adapted benchmark

* Move _pyngraph module to ngraph.pyngraph

* Stub for IECore and IENetwork classes

* Additional API classes

* passing test, extended functions and added blob

* worksave

* [POC Python API] Add IECore methods

* [POC Python API] Add iecore tests

* ienetwork

* ienet, input_info, dataptr

* irequest and exeecnet

* adapted benchmark

* Added suport for InputInfo bindings

* Add Blob support for different types

* fix typo

* Fixed InputInfo maps

* Add keys() to inputs maps

* add uint8 blob

* return read_network as it should be

* return read_network as it should be

* fix blob buffer

* remove const input_info files and fix codestyle

* add mode parameter in benchmark app

* return _pyngraph

* delete benchmark copy

* return pyngraph as in master

* fix benchmark working

* add comment with api which need to implement

* remove unnecessary code from benchmark

* remove hardcoded path from setup.py

* Rename vars in setup.py

* working wheel

* fix wheel building

* Revert "working wheel"

This reverts commit 11d03a1833.

* fix tests

* Added async infer

* pass by ref

* add ccompiler to requirements

* fix blob creation and view

* replace abscent method with working code in benchmark

* fix building

* worksave

* worksave queue

* no-deadlock async infer

* add lock handle in waitAll

* fix building issues with includes

* update of setup and cmakelist

* fix setup.py way of building

* add new methods for ie_core

* add ienetwork methods: serizlize and getfunction

* add methods for exec net and infer request class

* remove ccompiler from requirements

* remove set from cmake

* Update Blob class with precisions

* Rewrite test_write_numpy_scalar_int64

* Generic Blob casting in infer queue

* implementation of preprocess_info

* update license

* add set_blob method

* worksave

* added template for setblob

* Added blob convert in infer request

* move blob casting to common namespace

* add_outputs method

* work with func from pyopenvino

* add user_id to callbacks

* remove hardcoded root dir

* refactor code and comments

* [Python API] use parametrize in blob tests

* move common functions to conftest file

* Add tests for blob

* Update test_blob and test_network

* add parametrize in blob tests

* blob refactoring

* Fix sync in InferQueue and add default callbacks

* patch for protobuf cmake

* blob refactoring

* rename convert_to_blob to cast_to_blob

* rename to cast_to_blob in infer queue

* add missing cast_to_blob

* remove boost

* change license

* undo in cmake

* fix building

* [IE PYTHON API POC] Add fixed InferQueue and modification in async part of benchmark

* Add read_network(model,blob)

* Add blob_from_file helper

* Add read from Path

* Add tests

* Add read_network from bytes

* Error throwing in Common IE functions

* Cleaning samples

* Changes in ConstInputInfoWrapper class

* Add StatusCode to callback function for InferRequest

* Add random image generation and model path getting

* Move example model to examples path

* Adapt sync and async examples to new helpers

* Return request info containing StatusCode and ID from InferQueue for top idle request.

* Update benchmark app to use new API with request info

* Update examples to use two different approaches to InferQueue

* reset new line

* Add is_ready() to InferQueue

* fix building

* remove benchmark

* temporary add separate flag for building poc

* refactoring

* Remove GIL acquire in default callback and latencies

* Adapt benchmark to Core()

* Codestyle

* fix building

* [Python API] Move ngraph python api to the new destination

* fix building tests

* fix code-style checks

* building in azure

* fix building wheels

* apply fixes

* new structure

* fix building

* Add support for InferRequest::Cancel in pyopenvino

* fixes

remove gil release
add async infer after cancel

* remove extra files

* remove examples and benchmark

* fix code style

* fix building

* fix tests

* merge inits from old and new api

* fix azure ci

* fix setup.py

* fix setup.py building

* try to fix mac

Co-authored-by: Michal Karzynski <michal.karzynski@intel.com>
Co-authored-by: jiwaszki <jan.iwaszkiewicz@intel.com>
Co-authored-by: anastasia.kuporosova <akuporos@akuporos.inn.intel.com>
Co-authored-by: Alexey Lebedev <alexey.lebedev@intel.com>
Co-authored-by: Mateusz Tabaka <mateusz.tabaka@intel.com>

* Fix comments

* fix comments: cmakelist

* fix building on arm

* permission for merge script

* permission for merge script

Co-authored-by: Michal Karzynski <michal.karzynski@intel.com>
Co-authored-by: jiwaszki <jan.iwaszkiewicz@intel.com>
Co-authored-by: anastasia.kuporosova <akuporos@akuporos.inn.intel.com>
Co-authored-by: Alexey Lebedev <alexey.lebedev@intel.com>
Co-authored-by: Mateusz Tabaka <mateusz.tabaka@intel.com>
2021-10-05 13:55:54 +03:00
Michał Karzyński bd5b1bf99f
Change the way Model Optimizer loads frontends (#7330)
* Adds two switches `use_new_frontend` and `use_legacy_frontend` to override defaults.
* Rename ONNX frontend from `onnx_experimental` to `onnx`
2021-09-30 12:17:36 +02:00
Michał Karzyński d0efd61aad
Add nGraph Python API versioning (#7539)
* Expose ngraph_version_string as ngraph.__version__

* Fix linking error on CentOS
2021-09-30 12:59:20 +03:00
Mateusz Bencer fb11560b82
Implemented missing methods of ONNX Place API (#7518)
* Implemented get_consuming_ports, get_producing_operation and is_equal for PlaceOpONNX

* fixed unambiguous_node_check

* removed PlaceTensorONNX::get_input_port

* added PlaceOpONNX::is_input, PlaceOpONNX::is_output

* fixed python styles

* added get_consuming_operations implementation

* added missing get_consuming_operations for PlaceOpONNX

* added missing get_target_tensor for PlaceOpONNX

* changed place spec

* add support of get_source_tensor

* add support of get_producing_operation for PlaceOpONNX

* add support of get_producing_port for PlaceInputEdgeONNX

* fixed python styles

* missing ref in std::transform
2021-09-23 09:47:33 +03:00
Piotr Szmelczynski e5927dbe15
Expose discrete type info (#7301)
* Create pyngraph DiscreteTypeInfo bind

* add DiscreteTypeInfo to ngraph impl __init__

* add DiscreteTypeInfo to pyngraph.cpp

* remove comment

* create common file and add string_to_char_arr helper function

* create test for DiscreteTypeInfo class

* fix style

* add not equal test

* fix style

* create __repr__ and make member variables readonly

* Create trampoline for Node class

* update DiscreteTypeInfo test

* remove common files

* style fix

* clang style fix

* update __repr__ method for DiscreteTypeInfo

* style fix

* fix typo in test_core

* update repr method

* update comparison operators

* update operator overloading for DiscreteTypeInfo
2021-09-20 13:31:28 +03:00
Michał Karzyński 702633073e
Add set_argument/s methods to nGraph Python API (#7196)
* Add set_argument/s methods to nGraph Python API

* Apply formatting

* Clear inputs in Node::set_arguments

* Run all tests in one container

* Fix formatting

* Add unit test
2021-09-18 06:37:26 +03:00
Anastasia Popova 08ea036a36
RandomUniform Python API. (#7373)
* Added RandomUniform python API.

* Small fix.

* Small fix.

* Code style.

* Removed xfail mark.

* Added seed checks.

* Moved test.

* Changed quotes.
2021-09-15 14:06:02 +03:00
Szymon Durawa c50c0d59bb
Add default constructor for op. (#7368)
* Add default constructor for op.

* Apply correct format.

* Apply correct format for py files.

* Remove underscore prefix, add create overlaod method.

* Resolve use cases for parameter arguments in create fucntion.

* Resolve myoy issue.

* Remove underscore for getter and setter functions.

* Restore check when arguments is None.

* Add tests covering raising errors and get_attributes() function.
2021-09-13 06:49:19 +03:00
Ilya Lavrenov a952540edf
Openvino cmake config (#7419)
* Added OpenVINOConfig.cmake

* OpenVINOConfig.cmake part 2

* Trying to fix cmake generation

* Fixes

* Export frontends as well

* Fixed condition

* Added OpenVINO cmake package usage: docs, C samples

* Use more OpenVINO config

* Install OpenVINOConfig.cmake

* Trying to fix private plugins

* Trying to fix .tox

* Trying to fix ARM

* Fixed samples build

* Explicit ngraph duplicated targets

* Fixed fuzzing tests build

* Added IR frontend installation

* Removed install directory for IE reader

* Removed IR frontend from export list

* Reverted ngraph_DIR

* Try to fix .tox

* Fixed ieFuncTests with ONNX extensions

* Attempt #2

* Trying to fix ngraph setup.py

* Fix

* Trying to fix ONNX ngraph .tox CI

* Trying to remove spaces

* Fixed ngraph_DIR -> OpenVINO_DIR

* Removed junk files

* Try to fix ngraph wheel

* Try to fix ie_wheel

* Try to fix ngraph wheel
2021-09-10 15:31:27 +03:00
Anastasia Kuporosova 36318ca2cc
[Python API] move ngraph python api to the new location (#7364)
* [Python API] Move ngraph python api to the new destination

* fix building tests

* fix code-style checks

* building in azure

* fix building wheels

* apply fixes
2021-09-09 13:41:11 +03:00