* WIP Postpone fp16 in CompressFloatConstantsImpl * Apply suggestions from code review Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com> * WIP: Compression to FP16 in Serialize * Prepared for efficient fp32 to fp16 conversion * Update src/core/reference/src/runtime/reference/convert.cpp * Called real slow reference implementations in the place where the optimized versions are supposed to be implemented * Code style * Fixed 0 values in the fast f64 to f16 compression * Optimized convert_from_f32_to_f16_with_clamp * Added optimized f32->f16 instance of change_constant_precision * compression transformation Python test * use tmp dir, minor corrections * Update src/bindings/python/tests/test_transformations/test_compression.py * Update src/bindings/python/tests/test_transformations/test_compression.py * style fix * define rt_info for postponed_fp16_compression * remove redundant class * fix temp dir for Win in test_compression.py * update definitions in convert.hpp * Update implementation in convert.cpp * Update serialize.cpp * Update compress_float_constants.cpp * added macros for ARM/non_x86 in convert.cpp * fix macros in convert.cpp * change fixme placement in serialize.cpp * style_fix * Update src/core/reference/src/runtime/reference/convert.cpp * style_fix * Optimized count_out_of_f16_range * Code style * Revert unused * Update src/core/src/pass/serialize.cpp Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com> * Update src/core/reference/src/runtime/reference/convert.cpp Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com> * use optimized convert_from_f32_to_f16_with_clamp for non postponed * minor corrections * Update src/common/transformations/src/transformations/common_optimizations/compress_float_constants.cpp * Update compress_float_constants.cpp * Switched mo and ovc to save_model instead of serialize to leverage performance improvements in fp32->fp16 * Applied minor code imporvements to address review feedback * Minor changes in code * Update tools/ovc/openvino/tools/ovc/main.py * Apply suggestions from code review * Fixed failed test in case when both usual xml compression and fp16 compression are applied simultaneously (disabled for now) * Added description for CompressFloatConstantImpl postponed parameter * Description of postponed parameter for CompressFloatConstants * Reverted switching to save_model in mo as the compression can be applied not only via CLI and old code should be kept for Python path (not applicable for ovc) * Removed remining committed test artefacts and reverted remaining changes in mo --------- Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com> Co-authored-by: dmitrygo <dmitry.gorokhov@intel.com> Co-authored-by: Vladimir Paramuzov <vladimir.paramuzov@intel.com> Co-authored-by: Pavel Esir <pavel.esir@intel.com> Co-authored-by: Pavel Esir <pavel.esir@gmail.com>
OpenVINO Python API
OpenVINO Python API is a part of the OpenVINO library. The component is responsible for:
- Bindings of OpenVINO - allowing users to use the OpenVINO library in their Python code. Python API provides bindings to basic and advanced APIs from OpenVINO Runtime.
- Extending OpenVINO with pythonic features - on top of direct translations from C++, Python API component:
- Adds specific extensions to support numpy-based data.
- Provides support for external frameworks inputs.
- Provides shortcuts and helpers with more pythonic design.
- Allows to apply advanced concepts, like shared memory, to take full advantage of OpenVINO.
OpenVINO Python API uses the common codestyle checks which are adjusted to project needs.
Key contacts
If you have any questions, feature requests or want us to review your PRs, send us a message or ping us on GitHub via openvino-ie-python-api-maintainers. You can always directly contact everyone from this group.
Components
OpenVINO PYTHON API has the following structure:
- docs - folder that contains developer documentation and code examples.
- src - folder with all source files for Python API.
- src/compatibility - sources for compatibility API, including older modules like
ngraphandopenvino.inference_engine. - src/openvino - Python sources for current API.
- src/pyopenvino - C++ sources for current API.
- src/compatibility - sources for compatibility API, including older modules like
- tests - tests directory for current API.
- tests_compatibility - tests directory for compatibility API.
- thirdparty - folder that contains third-party modules like
pybind11. - wheel - wheel-specific directory that contains all specific requirements and files used during wheel creation.
Tutorials
If you want to contribute to OpenVINO Python API, here is the list of learning materials and project guidelines:
- How to contribute
- How to extend OpenVINO Python API
- How to test OpenVINO Python API
- How to upgrade local Python version