Compare commits

..

572 Commits

Author SHA1 Message Date
dependabot[bot]
7e25a49cae Bump actions/download-artifact from 3 to 4
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-15 05:31:41 +00:00
David Nam
23fae3b1bc [GPU] fix strided_slice axis in case of dynamic shape (#21460)
* [GPU] fix strided_slice axis in case of dynamic shape

* Modify indexing and add description

* Modify indexing
2023-12-14 17:39:00 -08:00
PuQing
a28fd2e009 【Hackathon 5th No.95】add paddle unique op (#20077)
* add unique

* fix args

* Refactor unique() function to handle dtype
correctly

---------

Co-authored-by: Xiuchuan Zhai <xiuchuan.zhai@intel.com>
2023-12-15 08:28:40 +08:00
Kelvin Choi
6f0db3330a [GPU] Skip remove reorder in case input padding is different from output padding (#21619) 2023-12-15 09:25:46 +09:00
Alina Kladieva
c01f50e3ff [GHA] Set SSL_CERT_FILE for model downloading (#21668)
* [GHA] Set SSL_CERT_FILE for model downloading

* Run Win CC in precommits

* Move setting SSL_CERT_FILE before calling CMake

* Set SSL_CERT_FILE for model downloading in windows.yml

* Wording

* Revert "Run Win CC in precommits"

This reverts commit 94126aab1c.
2023-12-15 01:34:43 +04:00
Alina Kladieva
8bc724d160 [GHA] Add workflow_dispatch trigger to coverity (#21676)
To be able to trigger it via GitHub API from Jenkins nightly
2023-12-14 23:11:13 +04:00
Zlobin Vladimir
bbddb89171 Update open_model_zoo submodule (#21662) 2023-12-14 18:01:51 +00:00
Karol Blaszczak
6367206ea8 [DOCS] NPU articles (#21430)
merging with the reservation that additional changes will be done in a follow-up PR
2023-12-14 17:31:44 +01:00
Przemyslaw Wysocki
f4b2f950f2 [Docs] Add a single-point starter guide for contributors (#21322)
Co-authored-by: Karol Blaszczak <karol.blaszczak@intel.com>
2023-12-14 16:22:24 +00:00
Mikhail Ryzhov
59e9f50ec6 [GHA] Windows pytest optimizations (#21650)
* parallel runs

* enabled pip cache

* pip cache fix
2023-12-14 16:14:51 +00:00
Anastasia Kuporosova
0a21205ad4 [PyOV] move rest of start_async tests to test_async (#21643) 2023-12-14 15:51:42 +01:00
Vitaliy Urusovskij
4fde957689 Additional changes in src/ to API2.0 (#21601)
* `src/core/` to API2.0

* `src/plugins/auto/` to API2.0

* `src/plugins/hetero/` to API2.0

* ClangFormat

* Fix build
2023-12-14 14:13:18 +00:00
Roman Lyamin
6a50ea3c74 [GPU] Using a cpu impl type for NMS in a dynamic case (#21648) 2023-12-14 17:22:01 +04:00
Georgy Krivoruchko
88c8143dd8 [ONNX] Refactoring tests on API 2.0 (#21596)
* Applied common functions to tests in conversion.cpp

* Refactored convert_partially_tests

* Refactored convert_tests.cpp

* Removed usage of ngraph namespace in load_from.cpp

* Replaced definition in model_support_tests.cpp

* Fixed codestyle
2023-12-14 14:03:21 +01:00
Evgeny Kotov
f094ef81f0 remove tests (#21654) 2023-12-14 16:54:37 +04:00
Mikhail Ryzhov
de81bbbbc2 enabled triggers for release branches (#21651) 2023-12-14 16:50:04 +04:00
Alexander Suvorov
9faf18b0ff Update 2023.2.0 Selector Tool with nightly archive (#21629)
* Update selector tool

* Trigger CI
2023-12-14 16:49:19 +04:00
Maxim Vafin
1d03b0813b [PT FE] Remove unique names from FE, rely on ResolveNameCollisions (#21636)
* [PT FE] Remove unicalisation from FE, rely on ResolveNameCollisions

* Fix build
2023-12-14 12:49:46 +01:00
Ekaterina Aidova
27bf494355 [PT FE]: support aten::take_along_dim (#21625) 2023-12-14 12:42:32 +01:00
Tomasz Jankowski
9f6c3e997f [core] Migrate Select operator to new API (#21249)
* Drop legacy stuff

* Repalce HostTensor with ov::Tensor

* Reduce binary size

* Revert "Reduce binary size"

This reverts commit 4f69f98357.

* Fix mistype in bounds evaluation

* Drop redundant check

* Fix shape in bounds evaluation

* Fix interval bound evaluate

* Add IF_TYPE_OF to enable CC

* Fix shape of scalar bound evaluation
2023-12-14 12:02:20 +01:00
Tingqian Li
7965213014 [CPU] support QWen RoPE (#21519) 2023-12-14 10:37:13 +00:00
Evgenya Nugmanova
e5a6077877 Enables SharedOpOptimization for v1 and v3 Broadcasts (#21635) 2023-12-14 10:33:00 +01:00
Tomasz Jankowski
0649865372 [Core] Move validation util into dev API (#21501)
* Move infer_convolution_forward to dev API

* Move infer_auto_padding to dev API

* Move evaluate_as_partial_shape to dev API

* Move default_label_evaluator to dev API

* Move generate_transpose_default_order to dev API

* Move is_valid_axes_order to dev API

* Move has_no_labels to dev API

* Remove usage of legacy get_constant_from_source

from core and transformations

* Move normalize_axes to dev API

* Move normalize_axis to dev API

* Deprecate functions to be removed later
2023-12-14 10:10:46 +01:00
Gorokhov Dmitriy
32b6362076 [CPU] Improve first token latency for 4bit compressed models (#21547) 2023-12-14 09:06:09 +00:00
Ilya Lavrenov
17008c9389 Escape pip command with apostrophe (#21645) 2023-12-14 10:29:38 +04:00
Wanglei Shen
5f2045909e [CPU] Change default latency mode of MTL to Pcore + Ecore (#20659) 2023-12-14 10:19:56 +04:00
Sergey Shlyapnikov
a04d59d779 [GPU] Gemm tiled opt add dynamic padding support (#21640) 2023-12-14 09:38:16 +04:00
Alina Kladieva
926a0591ff Add overall status check to more workflows (#21644) 2023-12-14 01:43:42 +04:00
Anastasia Kuporosova
1aa0c0ca0d [PyOV] OVDict as input for infer/call methods (#21275)
* [PyOV] OVDict as input for infer/call methods

* for copied inputs

* improvement

* add test

* apply comments

* add test assert

---------

Co-authored-by: Michal Lukaszewski <michal.lukaszewski@intel.com>
2023-12-13 18:13:18 +00:00
Maxim Vafin
4752237871 [PT FE] Support aten::pow_ (#21630)
* [PT FE] Support aten::pow_

* Fix tests
2023-12-13 18:54:53 +01:00
Mateusz Mikolajczyk
336a69ec24 Enable BitwiseOps to LogicalOps transform for static bool dtype on CPU plugin (#21510)
* Re-enable bitwise-logical transform in CPU plugin

* Update docstrings
2023-12-13 18:39:40 +01:00
Maxim Vafin
be7c70c8c4 [PT FE] Support aten::scatter_add (#21633) 2023-12-13 17:54:33 +01:00
Piotr Krzemiński
65439eda5d [Core][CPU] Add transformation for i64 support for Multinomial (#21469)
* [CORE] Add transformation for i64 support for Multinomial

* [CPU][TESTS] Apply test suggestions, remove unnecessary override - comment from cpu PR

* Update src/common/transformations/src/transformations/convert_precision.cpp

Co-authored-by: Mateusz Tabaka <mateusz.tabaka@intel.com>

* Update src/common/transformations/src/transformations/convert_precision.cpp

Co-authored-by: Mateusz Tabaka <mateusz.tabaka@intel.com>

---------

Co-authored-by: Ivan Tikhonov <ivan.tikhonov@intel.com>
Co-authored-by: Mateusz Tabaka <mateusz.tabaka@intel.com>
2023-12-13 20:22:34 +04:00
Surya Siddharth Pemmaraju
1b2eed0bbe Enable options for openvino backend in torch.compile (#20946)
* Added backend options for openvino torch.compile

* Added config options to enable openvino configs

* Fixed linter issues

* Addressed review comments

---------

Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
2023-12-13 20:10:48 +04:00
Vitaliy Urusovskij
dcf9247bc8 Clean up of tests/ov_helpers leftovers (#21416)
* CLean up ov_helpers headers from ngraph/

* Move `ngraph/` includes from ov_helpers to tests

* Remove include of all opsets in builders.hpp

* Remove opsets includes from ov_helpers

* Fix GNA tests

* Delete comments

* ClangFormat

* Fix build

* Fix `-fpermissive`

* Fix build #2

* Fix `<` && `>` in includes

* Fix build #3

* Build fix
2023-12-13 14:45:19 +00:00
Vladislav Golubev
adb4703d82 [Snippets] LIR serialization improvements (#21291) 2023-12-13 14:22:10 +00:00
Oleg Pipikin
d18d8a457f Update create_and_fill_tensor to work with InputGenerateData (#20008)
* Update create_and_fill_tensor to work with InputGenerateData
2023-12-13 15:21:23 +01:00
Pavel Esir
20ad8b43a1 Enable dinov2-base (#21626)
with the newest transformers dinov-2-base started to pass
2023-12-13 13:52:52 +00:00
Vladimir Paramuzov
2bcc94064f [GPU] Fixed stateful KV cache issues (#21618) 2023-12-13 16:15:00 +04:00
Maciej Smyk
3e2037c943 [DOCS] Troubleshooting note for WINOGRAD convolutions in GPU for master (#21623)
* Update GPU.rst

* Update GPU.rst

* Update docs/articles_en/openvino_workflow/running_inference_with_openvino/Device_Plugins/GPU.rst

Co-authored-by: Karol Blaszczak <karol.blaszczak@intel.com>

---------

Co-authored-by: Karol Blaszczak <karol.blaszczak@intel.com>
2023-12-13 13:03:11 +01:00
Yaroslav Torziuk
ea639a8c48 Enable GroupNormalizationDecomposition transformation (#21600) 2023-12-13 12:10:24 +01:00
Wang, Yang
7e88a9d6c8 [AUTO] Fix the issue of querying the optional property unsupported by HW plugin via AUTO compiled model (#21518)
* 1. Update the logic for handling the unsupported property querying from hw device.
2. Add test cases.

* Updated.

* Updated.

* Updated.

* Updated.
2023-12-13 18:06:59 +08:00
Andrew Kwangwoong Park
71e7015d39 [GPU] Reduce host time overhead in ReadValue execution for stateful model (#21521) 2023-12-13 14:06:30 +04:00
Oleg Pipikin
3fb60dc41c Subgraph builders refactor (#21373)
* Refactor subgraph builders

* Refactor make_conv_pool_relu builder

* Refactor make_conv_pool_relu_no_reshapes builder

* Refactor make_conv_pool2_relu2 and make_conv_pool_relu_non_zero

* Refactor make_split_conv_concat builders

* Refactor make_kso_function

* Refactor make_split_multi_conv_concat

* Refactor make_ti_with_lstm_cell

* Refactor make_single_conv

* Refactor make_detection_output

* Refactor make_multi_single_conv

* Refactor make_2_input_subtract

* Refator make_nested_branch_conv_concat

* Refactor make_nested_split_conv_concat

* Refactor make_conv_bias

* Refactor make_read_concat_split_assign

* Refactor make_matmul_bias

* Refactor make_convert_transpose

* Refactor make_multiple_input_output_double_concat
2023-12-13 10:46:31 +01:00
dependabot[bot]
47939684df Bump actions/setup-python from 4 to 5 (#21515)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-13 13:42:52 +04:00
Sebastian Golebiewski
82cdc116c1 Updating Interactive Tutorials (#21548) 2023-12-13 10:33:50 +01:00
River Li
e07fe02cb9 [CPU tests] migrate single layer test cases to be API 2.0 - part 8 (#21568)
* [CPU tests] migrate single layer test cases to be API 2.0 - part 8

* [CPU tests] migrate single layer test cases to be API 2.0 - part 8

* Fix skipped testcase issue

* Remove unused ie header files
2023-12-13 13:18:41 +04:00
Xuejun Zhai
b7745a1895 [CPU tests] migrate single layer test cases to be API 2.0 - part 9 (#21587)
* [CPU tests] migrate single layer test cases to be API 2.0 - part 9

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU tests] migrate single layer test fix error

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU tests] fix review comments

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

---------

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
2023-12-13 08:48:10 +00:00
Haiqi Pan
e2e9d6056f add FailedAsyncInferWithNegativeTimeForWait test case (#21392)
* add FailedAsyncInferWithNegativeTimeForWait

* add getTestCaseName

* skip FailedAsyncInferWithNegativeTimeForWait in gna

* skip FailedAsyncInferWithNegativeTimeForWait in gna

* Update src/plugins/intel_gna/tests/functional/shared_tests_instances/skip_tests_config.cpp

---------

Co-authored-by: Chen Peter <peter.chen@intel.com>
2023-12-13 12:20:04 +04:00
Tomasz Adamowicz
9fe38f1a9c [GNA] Properly obtain all subsequent layers for memory layer connection (#21602) 2023-12-13 08:55:32 +01:00
Vitaliy Urusovskij
ef14b50d79 src/common/*transformations/ API1.0 clean up (#21574)
* `src/common/transformations/` API1.0 cleanup

* `src/common/low_precision_transformations/` API1.0 cleanup

* Fix comments

* Fix
2023-12-13 10:50:42 +04:00
Maxim Vafin
34b2b66b69 [PT FE] Report unsupported operations with model list (#21607)
* [PT FE] Report unsupported operations with model list

* Continue on error

* Disable more models

* Check if file exists

* continue of error

* Fix on failure

* Fix file path

* Apply suggestions from code review
2023-12-12 21:25:27 +00:00
Oleg Pipikin
358cd4b709 Refactor GPU single layer tests (#21527)
* Refactor GPU single layer tests
2023-12-12 21:03:09 +00:00
Andrey Babushkin
5a4f632680 [workflows] New path for volumes (#21604) 2023-12-13 00:56:24 +04:00
Ivan Tikhonov
ff8d8a5b16 Introduced "reset_state" method to reset all model states in one line (#21595)
* added reset_state method to simplify the user API

* using reset_state method in the tests
2023-12-13 00:55:49 +04:00
Ahmad Chalhoub
942bc8b1ba support pytorch efrc op (#21567)
* support pytorch efrc op

* allow dynamic case & fix code format

* fix code style, use space 4
2023-12-12 21:54:29 +01:00
Andrey Kashchikhin
9ab0a6d2f1 change trigger (#21609) 2023-12-13 00:46:16 +04:00
Ekaterina Aidova
5b655d3c50 [PT FE]: fix aten::index_put type alignmnet (#21606) 2023-12-12 20:34:05 +00:00
Irina Efode
8e52742f86 [CONFORMANCE] Specify validation entity as arg of run_conformance (#21610)
* [CONFORMANCE] Specify validation entity as arg of

* Readme + op_summary
2023-12-12 20:07:11 +00:00
Maxim Vafin
182b44f6cc [PT FE] Support dict on input (#21450)
* [PT FE] Support dict on input

* Check that keys are strings

* Revert changes in PtFrameworkNode
2023-12-12 18:58:04 +01:00
Anastasia Kuporosova
3e42ddbde5 [PyOV] support Type as arg in convert op (#21603)
* [PyOV] support Type as arg in convert op

* add test

* fix linter
2023-12-12 18:21:47 +01:00
River Li
a2cc6a036f [CPU Test] use internal_properties for snippets_mode (#21549) 2023-12-12 14:13:22 +00:00
Sergey Shlyapnikov
15421001fc [GPU] Add missed override keyword in typed_primitive_onednn_impl struct (#21593) 2023-12-12 14:01:34 +00:00
Andrey Kashchikhin
79ca3d2fb9 [CI] [GHA] Introduce Coverity pipeline (#21599)
* add coverity pipeline

* report less progress

* add curl installation

* change trigger to post-commit
2023-12-12 16:55:58 +04:00
Maciej Smyk
2f65827f9f [DOCS] Moving files to new location for master (#21575)
* repo update

* repo update

* repo update

* Update LowPrecisionModelRepresentation.rst

* Update LowPrecisionModelRepresentation.rst

* Update CMakeLists.txt

* Update QuantizedNetworks.rst

* separate location for pypi publishing files

* Update src/bindings/python/CMakeLists.txt

fixing path in src/bindings/python/CMakeLists.txt

---------

Co-authored-by: Karol Blaszczak <karol.blaszczak@intel.com>
Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
2023-12-12 16:27:01 +04:00
Xuejun Zhai
f7d8bdef46 [CPU tests] migrate single layer test about logical (#21589)
Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
2023-12-12 11:55:52 +00:00
Chenhu Wang
14639d292d [CPU] Fixed block layout tails process on SSE for MVN impl (#21534) 2023-12-12 11:52:11 +01:00
Maksim Kutakov
b31aad78b0 [CPU] Apply parallel copy of IO tensors when possible (#21546)
* Apply parallel copy of IO tensors when possible

* Add sanity check for the precisions
2023-12-12 10:21:55 +01:00
Oleg Pipikin
2fb683d667 GPU remote tensor tests update. Get rid of API 1.0 (#21553)
* GPU remote tensor tests update. Get rid of API 1.0

* Apply comments

* Apply comments
2023-12-12 12:43:49 +04:00
Min, Byungil
42c33ac7b1 [GPU] Bugfix optimized slice_mem (#21452)
Signed-off-by: Min, Byungil <byungil.min@intel.com>
2023-12-12 17:17:49 +09:00
Wang, Yang
521da22797 [AUTO] update logic of checking if device with ID is proxy (#21493)
* the proxy device with id should be also a proxy device.

* 1. using real name in the logic of checking if device is proxy.
2. Disable the added test case.

Signed-off-by: Wang, Yang <yang4.wang@intel.com>

* enable test case

---------

Signed-off-by: Wang, Yang <yang4.wang@intel.com>
Co-authored-by: Chen Peter <peter.chen@intel.com>
2023-12-12 14:10:14 +08:00
Asthestarsfalll
e51ba62831 【Hackathon 5th No.97】add paddle tanh_shrink op (#20067)
* Add paddle tanh_shrink conversion

* update

* update

* restore CMakeLists.txt and waitting for PD test build enabled

* update for unittests

* remove code

* Add paddle tanh_shrink conversion
2023-12-12 05:49:49 +01:00
Sungeun Kim
0b49bb99d0 [GPU] dump graphs during execution (#21411)
* dump graphs during execution
2023-12-12 13:16:02 +09:00
Anastasia Kuporosova
889f2f54a2 [PyOV] Improve warning throwing in Const op (#21576)
* [PyOV] Improve warning throwing in Const op

* wrap warn to lambda

* fix linter
2023-12-11 23:18:59 +01:00
Sofya Balandina
cc8aeb0c09 Add [rename conformance ir] input shape to hash name for Convolution (#21484) 2023-12-11 23:32:07 +04:00
Maxim Vafin
e1b9d8c167 [PT FE] Fix constant type in aten::square (#21580)
* Fix constant type in aten::square

* Add test

* Simplify test
2023-12-11 19:29:02 +00:00
Maxim Vafin
0f6b9abee8 Support aten::lstm, aten::gru and aten::rnn_{relu,tanh} operations (#21579)
* [PT FE] Initial LSTM impl

* Support aten::lstm operation

* Support aten::gru and aten::rnn_{relu,tanh}

* Apply suggestions from code review

* Fix build

* Simplify implementation

* More simplification

* Update src/frontends/pytorch/src/op/lstm.cpp

* Simplification

* Use default LSTM helpers

---------

Co-authored-by: Roboreptile <piotr.krzeminski@intel.com>
2023-12-11 19:06:51 +00:00
Oleg Pipikin
df029eb9c7 Move negative shared tests (#21582) 2023-12-11 19:25:59 +01:00
Vishniakov Nikolai
f3fc503288 Revert core component extra exclude (#21583) 2023-12-11 19:02:21 +04:00
Ilya Lavrenov
02dec1c2d9 Added more exclude markers for install rules (#21561) 2023-12-11 17:05:09 +04:00
Wanglei Shen
9e2bd77abb fix parse_freq_info_linux for wrong cpu frequency information (#21387) 2023-12-11 19:54:29 +08:00
Pavel Esir
948fc265b4 [tests] resolve skipped HF models: 2nd batch (#21526)
* 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>
2023-12-11 15:12:12 +04:00
Aleksandr Voron
f49f84a4b1 the fix (#21577) 2023-12-11 14:59:37 +04:00
Aleksandr Voron
ddb4902c33 [CPU] [ARM] Disable gemm_acl tests on 32-bit arm platforms (#21551) 2023-12-11 10:21:02 +01:00
Ilya Lavrenov
8e69f2c278 Add CPU tests as required for Linux arm64 (#21562) 2023-12-11 13:16:15 +04:00
Ilya Lavrenov
402d251483 Removed legacy cmake utils from IE 1.0 (#21559) 2023-12-11 11:26:16 +04:00
yanlan song
f66c9492d3 enable load from file in proxy (#21495)
* enable load from file in proxy

Signed-off-by: fishbell <bell.song@intel.com>

* enable test

Signed-off-by: fishbell <bell.song@intel.com>

* clang

Signed-off-by: fishbell <bell.song@intel.com>

---------

Signed-off-by: fishbell <bell.song@intel.com>
Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
2023-12-11 11:09:42 +04:00
River Li
df7b047de6 [CPU] Remove duplicated string terminator from device full name (#21512) 2023-12-11 11:09:25 +04:00
Sergey Shlyapnikov
8d77a52e81 [GPU] Add callback function for MarkDequantizationSubgraph pass to skip non FC-related subgraphs (#21552) 2023-12-11 08:59:46 +04:00
Georgy Krivoruchko
8960da9014 [ONNX] Preparing environment for moving ONNX tests to API2.0 (#21528)
* Added common functions for onnx tests
* Removed test cases which are non-related to ONNX
Extended convert_model by extension
* Extended test utils by convert_partially
* Added model convertion using istream as input
* Moved common functionality to a ov namespace
* Removed unused function
2023-12-09 11:06:15 +04:00
Wanglei Shen
04c9a52b7f update parse_processor_info_macos for macOS ver 11 (#21517)
* update parse_processor_info_macos for wrong macos info

* update default setting

* update default setting

* update for comment

* fix typo

* update test data

* update init order
2023-12-09 14:10:28 +08:00
Alina Kladieva
06a27e7b31 [GHA] Add Smart CI to Windows pipeline (#21558)
* [GHA] Add Smart CI to Windows pipeline

* Remove Smart CI from Python API units due to 127101

* Rename overall GHA status check for Windows
2023-12-09 01:50:14 +04:00
Andrey Babushkin
a84d615abd Switch Windows Conditional Compilation workflow to AKS runners (#21375)
* Switch Windows Conditional Compilation workflow to AKS runners

* Fix YAML syntax

* Limit number of threads for CC build

* Split build stages to two to avoid step being successful when it's not

* Install python to conditional compilation job

* Combine both build commands into a single step

* Trying to work around sccache port issue

Sometimes build hangs and then ends by timeout. The only error message
in the logs is "sccache: error: An attempt was made to access a socket in a way forbidden by its access permissions. (os error 10013)"

* Temporary disable ctest step

* Revert "Temporary disable ctest step"

This reverts commit 8714200994.

* Disable Windows conditional compilation for PRs
2023-12-08 14:45:36 +00:00
Anastasia Kuporosova
ba34fa77e8 [PyOV] Expose result op (#21482)
* [PyOV] Expose result op

* update docs with op.Result

* codestyle

* add test and fix flake8 errors

* add result test

* fix transformation tests

* update return type
2023-12-08 13:57:11 +00:00
Georgy Krivoruchko
a3de4c17a1 [ONNX] QDQ uint16 support (#21278)
* [ONNX] QDQ uint16 verification
* Added tests
2023-12-08 17:04:40 +04:00
Sergey Shlyapnikov
0ad0a6bfaa [GPU] Improve fake alignment logic and fix missed zero point value (#21530)
* [GPU] Improve fake alignment logic and fix missed zero point value

* Add tests
2023-12-08 12:20:35 +00:00
River Li
c565bf0c37 [CPU tests] migrate single layer test cases to be API 2.0 - part 7 (#21538) 2023-12-08 14:43:39 +04:00
River Li
04db11e921 [CPU] CPU plugin api 2.0 migration for TensorDesc (#21002)
* [CPU] CPU API 2.0 migration for TensorDesc

* Fixed CustomOpCPUTest issue

* Cleanup unused code

1. normalize_preprocess
2. MemoryDescUtils::convertToBlockedMemoryDesc
3. Fix a typo issue

* Fix zero dim with none zero strides issue

* Fix Expected and actual shape are different: [] VS [1]

* Remove InferenceEngine::Layout

* Solve rebase issues

* Update for code reviewer's comments

* Keep ov::intel_cpu::node::Generic for legacy compatibility

* Solve scalar data issue

* Solve reviewer's comments

* Restore Generic registeration
2023-12-08 11:28:52 +01:00
Ilya Lavrenov
fbec7be5e0 Try to run arm64 without system tbb (#21524)
* Try to run arm64 without system tbb

* Moved files

* Moved cmake files for auto batch
2023-12-08 13:59:48 +04:00
Maciej Smyk
89e4cb4252 Update learn_openvino.rst (#21539) 2023-12-08 10:58:05 +01:00
Ilya Lavrenov
3481568a39 Fixed Linux CC (#21540) 2023-12-08 13:51:06 +04:00
River Li
8eb26dce6c [CPU tests] migrate single layer test cases to be API 2.0 - part 6 (#21497)
* [CPU tests] migrate single layer test cases to be API 2.0 - part 6

* Fix duplication issue

* Remove ov::Layout from PriorBox test cases
2023-12-08 13:24:19 +04:00
Xuejun Zhai
9866bc4d37 [CPU tests] migrate single layer test cases to be API 2.0 - part 2 (#21441)
* [CPU tests] migrate single layer test cases to be API 2.0 - part 2

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU][Single layer test] fix tests error

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* Update augru_sequence.cpp

---------

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
2023-12-08 13:22:10 +04:00
dependabot[bot]
df2ff92d21 Bump actions/stale from 8 to 9 (#21535)
Bumps [actions/stale](https://github.com/actions/stale) from 8 to 9.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v8...v9)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-08 12:58:56 +04:00
_bhaskar365
4c67ab7381 Merge changes from upstream/master referencing - test_infer_request.py renamed to test_sync_infer_request.py and new f… #21436 (#21516) 2023-12-08 09:48:13 +01:00
Anastasia Kuporosova
5e3176d617 [PyOV] Hide warning in const op (#21529) 2023-12-08 09:36:10 +01:00
Vladislav Golubev
261cf4e4dc [Snippets] Brgemm blocking by KN dims at the LIR level (#19335) 2023-12-08 11:58:35 +04:00
Fang Xu
488abd0ad2 fix coredump with numactl (#21393)
* fix coredump with numactl

* record original socketid and numaid

* update comment

* update comments

---------

Co-authored-by: Chen Peter <peter.chen@intel.com>
2023-12-08 14:20:35 +08:00
Aleksandr Voron
2086041552 [CPU] Fix XmlModelWithExtensionFromDSO test (#21507) 2023-12-08 09:21:16 +04:00
River Li
072dcea299 [CPU Test] fix any_layout test (#21490) 2023-12-08 03:30:52 +00:00
Taylor Yeonbok Lee
68d4ed91ed minor fix on the help message (#21327) 2023-12-08 02:13:33 +00:00
Andrey Kashchikhin
dfc91186a1 [CI] [GHA] Extract test jobs into reusable workflows (#21395)
* extract cpu func tests into a reusable workflow

* add needs

* check paths

* correct paths

* rm usage of setupvars

* extract samples

* use yaml string

* split mac workflow

* check variables

* try github workspace

* check full dir

* set variables

* try with sub directory

* Revert "try with sub directory"

This reverts commit d891ee3f28.

* extract c++ tests from linux

* change

* use cxx workflow in mac workflows

* add noninteractive

* extract cpu func tests

* rm unused

* enable mac

* fix reusable workflow name

* correct path for sparse-checkout

* extract python UT

* remove unnecessary asterisk

* remove another unnecessary asterisk

* use reusable action for linux cc

* add check for setupvars existence

* check with manually installed opencl

* add components input to samples workflow; rm pr triggers for mac workflows

* add missing needs

* add missing option for deps install  script

* use disables in test themselves instead of ifs in workflows

* use reusable workflow for cxx tests in linux arm

* use python reusable workflow in linux arm

* add missing endif

* use self-hosted for samples, add x86_64 constraint for jax

* check paths

* find gompby partial name

* skip failing tests on arm; correct gomp finding for ovc

* check tests

* add debian packages job; use job_ prefix for reusable workflows with jobs

* extract tf hub model tests

* extract tf model hub perf tests

* extract pytorch models tests

* do not use container on GHA runners

* extract onnx runtime

* add missing deps

* skip test for linux arm

* rm always()s

* fix quotes

* correct paths

* correct ifs, check dir for onnxruntime

* correct path for onnxruntime utils folder; install python3

* use self-hosted as input

* check for self-hosted runner via name, pass version

* skip cpu plugin unittest

* check cxx tests

* rm pr trigger
2023-12-07 23:44:45 +04:00
Aleksandr Voron
9cdf1a17ad [CPU] [ARM] Enable Conv SLT tests on ARM (#18061) 2023-12-07 20:50:51 +04:00
Ahmad Chalhoub
aa69f00e8d support MulNoNan for TF (#21459)
* support MulNoNan for TF

* update test_tf_MulNoNan

* Update src/frontends/tensorflow_common/src/op/mul_no_nan.cpp

* update zeros const method

* Update src/frontends/tensorflow_common/src/op/mul_no_nan.cpp

* Update src/frontends/tensorflow_common/src/op/mul_no_nan.cpp

* Update src/frontends/tensorflow_common/src/op/mul_no_nan.cpp

* Update src/frontends/tensorflow_common/src/op/mul_no_nan.cpp

* Update src/frontends/tensorflow_common/src/op/mul_no_nan.cpp

* Update tests/layer_tests/tensorflow_tests/test_tf_MulNoNan.py

---------

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2023-12-07 16:31:41 +00:00
Maxim Vafin
056282b7ef [PT FE] Unroll lists in a same way as tuples when on input (#21505)
* [PT FE] Unroll lists in a same way as tuples when on input

* Fix codestyle
2023-12-07 16:09:43 +01:00
Irina Efode
fef3d0d3aa [CONFORMANCE] Fix incorrect comparation model in (#21461) 2023-12-07 18:03:30 +04:00
Mikhail Ryzhov
aa2dcb1f46 [GHA] Test command length excess (#21502)
* debug

* enabled pre-commit

* Disabled shell on Win

* remove shell length

* remove debug print
2023-12-07 18:01:19 +04:00
Maxim Vafin
dd8f4f3661 Fix ClampFusion for case when min is greater then max (#21509) 2023-12-07 17:58:38 +04:00
Roman Kazantsev
ec40652cea [TF FE] Switch on ConvLSTM2D layer tests in pre-commit (#21520)
* [TF FE] Switch on ConvLSTM2D layer tests in pre-commit

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Remove extra blank line

---------

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-12-07 13:46:58 +00:00
Xuejun Zhai
e393678590 [CPU tests] migrate single layer test cases to be API 2.0 - part 4 (#21488)
* [CPU tests] migrate single layer test cases to be API 2.0 - part 4

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU tests] fix test error

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Func Test] revert single_layer_tests/group_convolution_backprop_data.cpp change

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

---------

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
2023-12-07 17:19:46 +04:00
River Li
23424ab73c [CPU tests] migrate single layer test cases to be API 2.0 - part 1 (#21420)
* [CPU tests] migrate single layer test cases to be API 2.0 - part 1

* Remove LayerTestsDefinitions
2023-12-07 16:45:31 +04:00
River Li
886e0b9f59 [CPU Tests] Migrate subgraph_test to be api 2.0 - part 1 (#21358)
* [CPU Tests] Migrate subgraph_test to be api 2.0 - part 1

* Update

* Handle ngraph::pass::ConvertPrecision issue

* Remove unused config variable
2023-12-07 16:33:54 +04:00
Evgenya Nugmanova
dde7e70771 [DOCS] Reduce Min / Max -- Reducing empty tensor would result in an undefined behavior (#20736) 2023-12-07 13:06:02 +01:00
Pavel Esir
b71906c672 [PT FE] [ONNX FE] Partially upcast random_normal to f32 (#21400)
* upcast randn to fp32

* style fix

* corrected tests

* add layer tests with statistics

* style-fix

* move make_random_normal to cmmmon

* style-fix

* added randn layer tests; updated CMakeLists.txt

* moved to inline

* fix problem with _USE_MATH_DEFINES on Win

* pass NodeRegistry as reference; some other minor corrections

* adjust thresholds to avoid sporadicity

* move random_normal_helper and hide from public api

* fix install

* fix install: 2nd try

* Frontend common

* remove last frontend_common::static

* build fix

* try to fix mock1 build: 2nd attempt

* try to fix mock1 build: 3rd attempt

* Update src/core/tests/CMakeLists.txt

* Fixed build: attemp 2

* Update src/plugins/intel_cpu/tests/unit/CMakeLists.txt

* Update CMakeLists.txt

---------

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
2023-12-07 15:23:03 +04:00
Georgy Krivoruchko
c61de14c66 Aligned reporting with latest implemenration (#21503) 2023-12-07 15:08:05 +04:00
Evgenya Nugmanova
b29a08d15c RPE operation and fusing transformation (#20734)
* RPE operation and fusing transformation

* Correct includes

* Apply suggestions from code review

Co-authored-by: Pawel Raasz <pawel.raasz@intel.com>

* Comments adressed

* Misprints

* Update src/common/transformations/src/transformations/common_optimizations/fuse_rotary_positional_embeddings.cpp

Co-authored-by: Pawel Raasz <pawel.raasz@intel.com>

* Ivan comments adressed

* Update src/common/transformations/src/transformations/common_optimizations/fuse_rotary_positional_embeddings.cpp

Co-authored-by: Pawel Raasz <pawel.raasz@intel.com>

* Fix includes and adds comments

---------

Co-authored-by: Pavel Durandin <pavel.durandin@intel.com>
Co-authored-by: Pawel Raasz <pawel.raasz@intel.com>
2023-12-07 11:37:43 +01:00
Oleg Pipikin
a8a493accf Refactor gpu tests (#21448)
* Refator gpu beh tests

* Refactor concurency tests

* Refactor gpu dynamic tests

* Refactor gpu subgraph tests

* Refactor gpu single layer tests

* Fix

* Fix
2023-12-07 14:35:56 +04:00
Vitaliy Urusovskij
8ef3834fe9 ngraph leftovers in CPU shared single_layer and subgraph (#21499)
tests
2023-12-07 14:34:11 +04:00
Pawel Raasz
25e5818645 Fix temporary axes remove from MatMul shape_infer (#21474) 2023-12-07 10:36:00 +01:00
Pawel Raasz
320e2bad57 [shape_infer] Fix Equal upper bound calculation (#21453)
* Fix Equal upper bound calculation

* Correct test name
2023-12-07 09:27:06 +00:00
Evgeny Kotov
90087dbb48 Use time limits instead of number iterations limits in GHA performance tests (#21407)
* use perf_counter_ns to measure performance; meausure within time not count

* fixes

* remove nightly

* set 60 secs by default

* fix output html

* code review fixes

* fix runtime duration

* remove unneeded inference

* cleanup
2023-12-07 11:53:27 +04:00
Wang, Yang
fd0809ead4 [AUTO] Enable round robin policy for cumulative throughput mode of AUTO plugin (#20439)
* Add and implement the logic of property SCHEDULE_POLICY for MULTI plugin.

* Updated.

* Enable test case for schedule policy test.

* enable test case for property ov::intel_auto::schedule_policy.

* Update.

* Updated.

* Updated.

* Update.

* Update the lock logic here by considering the runtime fallback case.

* Update.

* Update.

* Update.

* Update default value of schedule policy to DEVICE_PRIORITY

* Enable the function test case for schedule policy.

* Add description for inference requests schedule policy within AUTO plugin cumulative mode.

* Updated.

* Python bindings for enum SchedulePolicy and property ov::intel_auto::schedule_policy.

* Update.

* Update.

* Update.

* Updated.

---------

Co-authored-by: Chen Peter <peter.chen@intel.com>
Co-authored-by: Wanglei Shen <wanglei.shen@intel.com>
2023-12-07 07:04:56 +01:00
Roman Kazantsev
33b2e6bb51 [TF FE] Allow any model format extension (#21508)
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-12-07 09:21:38 +04:00
Luo Cheng
0a7d1d770f [CPU] Optimize ScaledDotProductAttention performance (#21412) 2023-12-07 00:24:49 +01:00
rghvsh
55d7765704 [TF FE] Support Atan2 operation for TensorFlow models (#21076)
* Create atan2.cpp

* Update common_op_table.hpp

Adds atan2 operation to the list

* Update op_table.cpp

Adds atan2 to the list of BinaryOp.

* Create test_tf_Atan2.py

Adds test for Atan2.

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Update src/frontends/tensorflow/src/op_table.cpp

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Update atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Update atan2.cpp

declares x and y , explicitly mentions conditions

* Update atan2.cpp

* Update atan2.cpp

Adds versions.

* Update atan2.cpp

adds namespace

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update atan2.cpp

Clang format

* Update atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

* Update test_tf_Atan2.py

fixes the datatype of y

* Update tests/layer_tests/tensorflow_tests/test_tf_Atan2.py

* Update test_tf_Atan2.py

shape to float

* Update tests/layer_tests/tensorflow_tests/test_tf_Atan2.py

* Update tests/layer_tests/tensorflow_tests/test_tf_Atan2.py

* Update tests/layer_tests/tensorflow_tests/test_tf_Atan2.py

* Update test_tf_Atan2.py

Makes the range of input inclusive for x<0 and y<0.

* Update src/frontends/tensorflow_common/src/op/atan2.cpp

---------

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2023-12-06 21:57:07 +01:00
Roman Kazantsev
148daf035b [TF FE] Avoid reinterpret_cast for non-standard types (#21506)
Clean-up translator for Placeholder

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-12-06 19:55:59 +00:00
Roman Kazantsev
cac6aadcc8 [TF FE] Support object removal and Pad for complex type (#21498)
* [TF FE] Support object removal and Pad for complex type

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Add test for Pad on complex type

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

---------

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-12-06 20:03:43 +01:00
Aleksandr Voron
60109caf63 [CPU] FP16 support in EmbeddingBagOffsetSum and EmbeddingBagSum (#21433) 2023-12-06 22:21:02 +04:00
Sergey Shlyapnikov
152b4dfc0d [GPU] Add SLM support for FC bf tiled kernel (#21435)
* [GPU] Add SLM support for FC bf tiled kernel

* Fix unaligned IFM leftovers processing in case of compressed weights and add decompression scale post op support

* added FullyConnected_bf_tiled::GetUpdateDispatchDataFunc

* updated FullyConnected_bf_tiled::GetUpdateDispatchDataFunc for two types of kernels

---------

Co-authored-by: Kim, Eddy <eddy.kim@intel.com>
2023-12-06 18:18:01 +01:00
Maxim Vafin
8a0317101c [PT FE] Disable freezing (#20679)
* Disable freezing

* Add rules for freezing

* Update src/bindings/python/src/openvino/frontend/pytorch/ts_decoder.py

* Update src/bindings/python/src/openvino/frontend/pytorch/ts_decoder.py
2023-12-06 15:39:54 +01:00
Xuejun Zhai
275e14d94a [CPU tests] migrate single layer test cases to be API 2.0 - part 5 (#21489)
Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
2023-12-06 17:05:44 +04:00
Xuejun Zhai
6391b0c9f6 [CPU tests] migrate single layer test cases to be API 2.0 - part 3 (#21445)
* [CPU tests] migrate single layer test cases to be API 2.0 - part 3

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU tests] migrate single layer test cases to be API 2.0 - part 3

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

---------

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
2023-12-06 16:55:44 +04:00
Haiqi Pan
ddc395b6cb API 2.0 infer request io blob test case (#20336)
* add failToSetUninitializedInputBlob, failToSetUninitializedOutputBlob and canInferWithGetOut

* FailedAsyncInferWithNegativeTimeForWait

* Revert "FailedAsyncInferWithNegativeTimeForWait"

This reverts commit 3b6780102f.

* Update src/tests/functional/plugin/shared/src/behavior/ov_infer_request/io_tensor.cpp

Co-authored-by: River Li <river.li@intel.com>

* Update src/tests/functional/plugin/shared/src/behavior/ov_infer_request/io_tensor.cpp

Co-authored-by: River Li <river.li@intel.com>

---------

Co-authored-by: River Li <river.li@intel.com>
2023-12-06 16:38:10 +04:00
Irina Efode
1f01036997 [CONFORMANCE] Fix reg exp to find models (#21496) 2023-12-06 13:29:03 +01:00
Pawel Raasz
635f5d373d [core]Migrate Gathers operators to new API (#21390)
* Migrate Gather operators to new API

* Remove redundant code form reference

* Use IF_TYPE_OF macro

* Remove unused include

* Use common utils in gather base

* Fix normalize after merge issues
2023-12-06 16:27:14 +04:00
Vitaliy Urusovskij
e4c38e3afd Port tests/ to API2.0 (#21476)
* Port properties in time and stress tests to API2.0

* Port CC tests infer_tool.py to API2.0

* Update tests/conditional_compilation/tools/infer_tool.py

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>

---------

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
2023-12-06 14:36:43 +04:00
Sonder
6d3fbf4237 【Hackathon 5th No.113】Support paddle 2.5.1 (#20161)
* Fixed comments for linux-riscv64 GHA workflow

* Try to enable PDPD tests back

* support paddle 2.5

* fix op test errors

* fix op test errors

* recover openvino/src/core/src/op/swish.cpp

* recover thirdparty open_model_zoo

* update cmakelist

* disable some tests

* fix code style

* enable paddle ci tests

* disable some tests

* fix np.long error

* recover reverse op

* update ci config

* recover set_value test codes

* rm linux_debian.yml

* Compatible with cases where different paddle versions have different output shapes

* remove set_value tests

* recover save_model.py

* Added ctest labels for FE tests only if FW is found

* recover thirdparty

* Update CMakeLists.txt

Fixed creation of paddle_tests target two times

* update paddle v2.5.1 proto file

* recover thirdparty

* fix Paddle_Reader_Tests.LoadModelMemoryToCore error

* fix Paddle_Places test issue in v2.5.1

* support some tests for low version paddle

* fix paddle FrontEndCutModelTest issue

* fix

* support all other tests for low version paddle

* fix codestyle

* fix codestyle

* Update generate_multi_tensor_split.py

* fix build error

* add testUnloadLibBeforeDeletingDependentObject into paddle skip tests config

* remove PROTOBUF_LITE from paddle CmakeList.txt

* fix path error

* add debug info

* add debug codes

* use make_model_path

* recover

* add option optimize_for

* use FrontEndTestUtils in read_paddle_model_test.cpp

* use FrontEndTestUtils in read_paddle_model_test.cpp

* fix grid_sample error when using dynamic shape

* fix error tests for 2.4 version

* add paddle version judge for floor_div

* fix grid_sample and add tests

* fix

* fix

* recover

* recover grid_sampler

* Apply suggestions from code review

* fix

* Apply suggestions from code review

* Apply suggestions from code review

* fix build error

---------

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
Co-authored-by: meiyang-intel <yang.mei@intel.com>
2023-12-06 13:59:50 +04:00
Irina Efode
bbfe22732f [CONFORMANCE] Change downgrade coefficient logic for conformance reports (#21475)
* [CONFORMANCE] Change downgrade coefficient logic for conformance reports

* Remove extra reports
2023-12-06 13:02:04 +04:00
Ilya Lavrenov
d217847714 Allow to load extension by relative path in frontends, node factory (#21486) 2023-12-06 10:21:30 +04:00
Wanglei Shen
0520216481 fix streams calculation issue for latency mode with big threads input (#21437)
* fix streams calculation issue for latency mode with big threads input

* update for typo

* update for typo

* add test cases

* update for comments
2023-12-06 11:53:58 +08:00
Fang Xu
ea1ffbaf7f [CPU] Output correct streams and threads number (#21421) 2023-12-05 22:52:15 +04:00
River Li
bd315f4b6a [CPU Tests] migrate matmul test cases to be api 2.0 (#21332)
* [CPU Tests] migrate matmul test cases to be api 2.0

* Update

* Handle convert2OutputVector inplace

---------

Co-authored-by: Vitaliy Urusovskij <vitaliy.urusovskij@intel.com>
2023-12-05 14:42:47 +00:00
River Li
65b8bdf892 [CPU Tests] migrate sub_graph test cases - part 2 (#21379)
* [CPU Tests] migrate sub_graph test case - part 2

* remove unused header files

---------

Co-authored-by: Vitaliy Urusovskij <vitaliy.urusovskij@intel.com>
2023-12-05 14:18:16 +00:00
Chenhu Wang
f80793e420 [SnippetS] Perf count nodes and emitters (#19493) 2023-12-05 15:49:27 +04:00
Vladislav Golubev
791762fb19 Tests compilation fix (#21473) 2023-12-05 15:47:35 +04:00
Pawel Raasz
c18041ab53 [core] Remove tensor conversion utils from new API (#21396)
* Remove usage of util::wrap_tensor

* Remove tensor conversion utils
make it local in model to remove with legacy evaluate

* Make only output tensor dynamic if Shape{0}

* Evaluate fixes on HostTensor

---------

Co-authored-by: Michal Lukaszewski <michal.lukaszewski@intel.com>
2023-12-05 15:11:43 +04:00
Mikhail Ryzhov
725aae4dbd partly reverted d6f7664 (#21454) 2023-12-05 13:28:17 +04:00
Andrey Kashchikhin
62f5bd6570 [CI] [GHA] Introduce the Linux ARM64 workflow (#20809)
* add arm as a matrix for build job

* uncomment

* comment

* try inside pipeline

* check location

* another dirs

* try to privide correct action path

* use corrected action

* use newer commit

* use newer commit

* use newer commit

* use newer action commit

* add setting

* rm from pipeline, adapt action iteslf

* add missing deps

* enable samples and debian jobs

* correct yml

* correct image name

* correct syntax, use self-hosted option

* enable onnx runtime and c++, use newer action

* enable Python and CPU Func tests

* add missing deps for arm64

* increase timeout for python tests

* disable some tests, add more time

* skip failing tests

* skip speech sample test on arm

* dummy chang

* skip mxnet mo on arm, run all tests

* rm quotes

* separate linux x86 and arm64 workflows

* rm unused matrix refs, add timeouts

* add skips for c++ tests and some Python tests

* correct cache keys, extend timeout

* skip more python tests

* add more skips: for python and CPU func

* extend cpu func list with skips

* disable cpu func tests and python api 2.0 tests

* rm disable job

* styling, rm pr trigger, rm always(), rm unnecessary changes

* revert

* use ifs instead of comments, provide better wording for skips
2023-12-05 12:14:02 +04:00
Evgenya Nugmanova
a6903b8398 [Symbolic Transformation] DeReshape FullyConnected (#21419) 2023-12-05 12:05:03 +04:00
Pawel Raasz
24209239bf Restore CC feature in operators evaluate (#21446) 2023-12-05 11:23:19 +04:00
Roman Kazantsev
f9d20d5aa0 [TF FE] Support different types: tf.i8, u8, i16, u16, i32, u32, i64, u64, f16, f32, bf16 (#21439)
* [TF FE] Support different types: u16, u64, u32, boolean

Support constants of different types and dtype attribute values

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Use map instead of unordered_map

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Add tests with different types

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

---------

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-12-05 11:08:46 +04:00
River Li
2c6a2a1102 [CPU tests] migrate sub_graph test cases to be 2.0 - part 3 (#21386) 2023-12-05 10:55:55 +04:00
Xuejun Zhai
9c94873842 Upgrade CPU func tests to 2.o (#21357)
* [CPU Plugin][Func Test] Upgrade AddConvertToReorderTest to API 2.0

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin][Func Test] Upgrade AlignMatMulInputRanksTest to API 2.0

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin][Func Test] Upgrade GatherAddAvgpool to API 2.0

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin][Func Test] Upgrade InputNoReorderEltwiseBF16 to API 2.0

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin][Func Test] Fix review comments

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

---------

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
2023-12-05 10:24:55 +04:00
Xuejun Zhai
5dda9f333b Upgrade CPU func tests to 2.0 (#21384)
* [CPU Plugin][Func Test] Upgrade NonInputInPlaceTest to API 2.0

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin][Func Test] Upgrade InputOutputTensorReuse to API 2.0

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin][Func Test] Upgrade InputTensorROI to API 2.0

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin][Func Test] Upgrade IntertactionCPUTest to API 2.0

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin][Func Test] Upgrade EdgeWithSameNameInTwoModels to API 2.0

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin][Func Test] Upgrade MHATest to API 2.0

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin][Func Test] Upgrade NgramCPUTest to API 2.0

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin][Func Test] Upgrade ParameterResultCustomBlobTest to API 2.0

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin][Func Test] Upgrade RemoveUselessBF16ConvertCPUTest to API 2.0

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin][Func Test] remove ngraph & opset

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin][Func Test] fix review comments

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin][Func Test] fix snippets mode error

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

---------

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
2023-12-05 09:44:42 +04:00
Yuan Hu
0d05f87004 [CPU] fix issue that reshape node didn't update last second input value (#21369)
* fix didn't udpate last second input issue

Signed-off-by: HU Yuan2 <yuan2.hu@intel.com>

* to match master code

Signed-off-by: HU Yuan2 <yuan2.hu@intel.com>

* fix review comment

use parametrized test case instead of creating new test case

Signed-off-by: HU Yuan2 <yuan2.hu@intel.com>

---------

Signed-off-by: HU Yuan2 <yuan2.hu@intel.com>
2023-12-04 18:23:42 +01:00
Tatiana Savina
94d1d7a033 [DOCS] Add legacy notes pot (#21449)
* add note to pot

* change header
2023-12-04 16:36:03 +01:00
Anastasia Kuporosova
ca87784a29 [PyOV] Missed variable API in Model class (#21434)
* [PyOV] Missed variable API in Model class

* fixes in model docstr and codestyle

* add test

* fix ci

* fix ci
2023-12-04 15:44:23 +01:00
Tingqian Li
fcbb80d372 [CPU] Support chatglm RoPE (#21295) 2023-12-04 13:18:01 +01:00
Pawel Raasz
15ff4e6596 [core]Correct Constant creation from string (#21099)
* Improve Constant creation from string values

* Optimize Constant creation from vector<T>
binary size reduction

* Fix code style

* Add tests to check there is no precision los

* Fix conversion for string -> integral numbers

---------

Co-authored-by: Michal Lukaszewski <michal.lukaszewski@intel.com>
2023-12-04 10:57:47 +01:00
Tatiana Savina
f37cf22db8 add legacy note to mo section (#21432) 2023-12-04 10:19:38 +01:00
Anastasiia Pnevskaia
525c031959 Fixed Trackable import. (#21429) 2023-12-04 12:25:41 +04:00
jmacekx
c759f8df86 [DOCS] update documentation build instruction (#21427) 2023-12-04 08:39:47 +01:00
Roman Kazantsev
35330d5320 [MO] Fix version of MO deprecation (#21438)
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-12-04 10:13:21 +04:00
Sun Xiaoxia
9cca05def8 Only use current thread with TBB when -nstreams=0 (#20975)
* only use current thread when -nstreams=0 with TBB

* add comments

* fix building issue

* fix comments

* only use current thread when -nstreams=0 with TBB

* add comments

* fix building issue

* fix comments
2023-12-04 13:52:52 +08:00
Wilson Seok
e3988cd6a8 [GPU] Fix scatter update axis name (#21398)
* fix scatter update axis name
* Remove _exec_deps control for backedge_from because this is not required after PR-21333
  * Previously, we organized execution order based on dependency for input-output buffer sharing from loop-body
  * With PR-21333, we are not sharing buffer between input and output when loop input has multiple outputs.
  * Therefore, there is no need to adjust exec order.
2023-12-04 13:49:58 +09:00
Wang, Yang
1e2b7c66f7 [AUTO] Update AUTO logic to support state-full model (#21061)
* 1. Update the logic for filtering out the device that supports the stateful model.
2. Enable the function to create stateful model in the test case.

* 1. Enable unit test cases for stateful model support.
2. disable accelerator device(CPU_HELP) if model is stateful.

Signed-off-by: Wang, Yang <yang4.wang@intel.com>

* Update.

* Updated.

* Updated.

* Updated.

---------

Signed-off-by: Wang, Yang <yang4.wang@intel.com>
Co-authored-by: Chen Peter <peter.chen@intel.com>
2023-12-04 10:51:10 +08:00
Piotr Krzemiński
44f7bf7e3f [CPU] Multinomial implementation (#20406)
* [CPU] Temp save commit

* [CPU] Add initial CPU implementation of Multinomial

* [CPU] Add parallel implementation with mock randomuniform

* [CPU] Fix accumulate incorrect iterator provided

* [CPU] Add tests for multinomial

* [CORE] Add lost tests

* [CPU] Add dynamic shape inference and descriptors init

* [CPU] Revamp tests to multiple files

* [CPU/SPEC] Apply suggested changes

* [CPU] Fix test compilation issues, clang fix

* Update multinomial.cpp

* [CPU] Fix Incorrect Primitive Descriptor for multiple combinations

* [CPU] Change params to inputs in testing function

* [CPU] Fix dynamic shape inference tensor access error

* [CPU] Save stable version

* [CPU] Add template execute for different input dtypes

* [CPU] Introduce new method of loading data to tests, fix dynamic shape inference

* [CPU] Improve parralelism

* [CPU] Improve pararrelism - fix indexes

* [CPU] Fix no_replacement tests, fix randomness in tests

* [CPU] Split tests into log and no_log version to avoid rounding when values are close to 0

* [CPU] Add mersenne-twister seed and random_uniform distribution as source for randomness, add debug prints

* [CPU] Apply suggestions from review, fix 4x4 log tests

* [CPU] Force i32 convert format

* [CPU] Fix double to float conversion warning

* [CPU] Remove debugging prints, fix CIs float error

* [CPU] Fix for convert_type in CIs

* Update src/plugins/intel_cpu/src/shape_inference/custom/multinomial.hpp

Co-authored-by: Mateusz Mikolajczyk <mateusz.mikolajczyk@intel.com>

* Update src/plugins/intel_cpu/src/nodes/multinomial.hpp

Co-authored-by: Mateusz Mikolajczyk <mateusz.mikolajczyk@intel.com>

* Update src/plugins/intel_cpu/src/shape_inference/custom/multinomial.hpp

Co-authored-by: Mateusz Mikolajczyk <mateusz.mikolajczyk@intel.com>

* [CPU] Migrate to CPU API 2.0

* [Ref/CPU] Remove support for 1D tensors, use Core Shape Inference

* [CPU] Remove unnecessary symbols

* Update multinomial.cpp

* Update multinomial.cpp

* Update ops.py

* [CPU] Fix const identifier missing after reinterpret cast

* [CPU] Fix Mac cpplint error

* [CPU] Apply recommended changes - 0-seed nondeterminism, casts in testsshape_infer optimization

* [CPU] Apply iterator optimization suggestion

* [CPU] Replace casts with class constructors in tests

* [CPU] Remove unnecessary static_casts to void*

* Update multinomial.cpp

* [CPU] Apply suggestions from review - move template, fix i64 precision, redturn off shape precision for const inputs, set always-execute for const inputs

* [CPU] Relocate tests to shared, remove using namespace from header files

* [CPU] Add definitions for files eaten by clang fix

* [CPU] Fix seed for Mersenne Twister Engine

* [CPU] Try fix incorrect 1x3 for 3 samples test (bf16)

* [CPU] Use only mersenne for seed generation

* [CPU] Relocate test, add debug prints

* [CPU] Add relocated test that got eaten

* [CPU] Remove uniform distribution, replace with division by max value

* Update multinomial.cpp

* Update multinomial.cpp

* [CPU] Add explicit float cast for CIs

* Update multinomial.cpp

* [CPU] Use intel_cpu::bfloat16 to reduce innacuracies

* [CPU] Remove debug caps, all tests pass

* [CPU] Clang fix

* [GPU] Remove GPU 1D test case

* [CPU] Modify tests to add seed=0 case, add ignore statement for this test and add subtask to complete after current release

---------

Co-authored-by: Michal Lukaszewski <michal.lukaszewski@intel.com>
Co-authored-by: Mateusz Mikolajczyk <mateusz.mikolajczyk@intel.com>
2023-12-02 12:46:17 +01:00
Roman Kazantsev
d4c342fc79 [MO] Recommend to use OVC from MO message (#21431)
* [MO] Recommend to use OVC from MO message

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Update tools/mo/openvino/tools/mo/utils/get_ov_update_message.py

Co-authored-by: Sergey Lyalin <sergey.lyalin@intel.com>

* Update tools/mo/openvino/tools/mo/utils/get_ov_update_message.py

Co-authored-by: Sergey Lyalin <sergey.lyalin@intel.com>

* Update tools/mo/openvino/tools/mo/utils/get_ov_update_message.py

---------

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
Co-authored-by: Sergey Lyalin <sergey.lyalin@intel.com>
2023-12-02 11:17:26 +00:00
Sergey Shlyapnikov
009951d969 [GPU] Allow to set empty tensor for inner network of condition primitive (#21415) 2023-12-01 21:21:21 +00:00
Katarzyna Mitrus
0a271c136a [Opset13][Docs] FakeConvert cpp class docstring (#21324)
* Add code docs

* Remove redundant headers from ref

* Remove redundant eval return

* Empty new line style cleanup

---------

Co-authored-by: Michal Lukaszewski <michal.lukaszewski@intel.com>
2023-12-01 20:37:24 +01:00
Maxim Vafin
7d2afa4d38 ConcatFusion: check that replacing input has only 1 consumer (#21425)
* ConcatFusion: check that replacing input has only 1 consumer

* Add test
2023-12-01 16:58:19 +00:00
Mikhail Ryzhov
ba735c9149 [GHA] Updated 2-cores runner name (#21426)
* updated the name

* manual trigger
2023-12-01 16:46:20 +00:00
Przemyslaw Wysocki
8427493446 [PyOV] Limit protobuf version for conditional compilation tests (#21130)
* Initial commit

* Add protobuf version bound

* Revert "Initial commit"

This reverts commit 5fd6b521df.

* Cleanup of accidental commits

* Cleanup of accidental commits

---------

Co-authored-by: Anastasia Kuporosova <anastasia.kuporosova@intel.com>
Co-authored-by: Michal Lukaszewski <michal.lukaszewski@intel.com>
2023-12-01 16:13:12 +00:00
Paul Youngsoo Ahn
734bc400ec [GPU] Fix failures for loop and condition operation (#21333)
* [GPU] union 1D and scalar output dim for subgraph is skipped in condition

* Set friendly name using primitive_id for debugging.

* Do not share memory between internal input and external input when internal input has  backedge in loop

* Set backedge mode to SINGLE when backedge_from_prim has multiple users

* Add condition unit test to check empty inner body

* Fix functional test failures

* Fix unit test failure on dg2

* Follow up code review - rename function
2023-12-01 16:13:20 +01:00
Tomasz Adamowicz
04f2485334 [GNA] Use OV thread_local implementation (#21284)
* [GNA] Use OV thread_local implementation
2023-12-01 14:39:26 +00:00
Tatiana Savina
ad12f114f4 change wording (#21428) 2023-12-01 15:18:56 +01:00
Ekaterina Aidova
bf760b663e PT FE - aten::alias, aten::alias_copy, aten::cross, aten::linalg_cross (#21265)
* [PT FE]: support aten::alias, aten::alias_copy, aten::cross, aten::linalg_cross

* add type alignment

* fix code style
2023-12-01 14:59:03 +01:00
Anastasia Kuporosova
0e642e984b [PyOV] tests refactoring (#21410)
* [PyOV] tests refactoring

* remove ngraoh mentioning

* codestyle

* replace func
2023-12-01 14:53:33 +01:00
Evgenya Nugmanova
055e3d274f Symbolic review leftovers (#21388)
* Correct include pragmas in symbolic transformations

* Allow for more Reshapes to be optimized via symbolic Reshape Optimization
2023-12-01 15:50:47 +04:00
Kelvin Choi
ed0ce165ce [GPU] Support negative indice for static (#20909) 2023-12-01 11:04:50 +00:00
Ekaterina Aidova
d1f72e2d01 add gptq model test in pytorch hub tests (#21399)
* conflict

* refactor test

* fix for case if can not instantiate config
2023-12-01 10:56:05 +00:00
Xuejun Zhai
0e2bde2397 [CPU Plugin][Func Test] Upgrade reshape related to API 2.0 (#21361)
* [CPU Plugin][Func Test] Upgrade reshape related to API 2.0

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin][Func Test] Fix review comments

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin][Func Test] Fix review comments

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

---------

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
2023-12-01 13:53:51 +04:00
Mikhail Ryzhov
27adf58220 [GHA] Switched CPU functional test runner (#21346)
* switched runners to 32gb

* increased onnx timeout
2023-12-01 12:50:06 +04:00
Maxim Vafin
db6aeb7a65 [PT FE] Add torchbenchmark models to GHA tests (#21401)
* [PT FE] Add torchbenchmark models to GHA tests

* Fix teardown

* Fix requirements

* Update tests/model_hub_tests/torch_tests/torchbench_models

* Update tests/model_hub_tests/torch_tests/torchbench_models

* Update tests/model_hub_tests/torch_tests/test_torchbench.py
2023-12-01 09:44:12 +01:00
Roman Kazantsev
9ecebdd202 [Common Frontend] Move ComplexTypeMark into common frontend (#21409)
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-12-01 12:12:19 +04:00
Roman Kazantsev
abfbdd1b96 [Core] Support String Tensors (#21244)
* [Core] Support String Tensors

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Add String Constant implementation

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Fix build issue in tests

* Add cast_vector for Constant of ov::string type

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Fix build issue

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Fix build issue: ambiguous type in GNA

* Fix ambiguous build issue in GNA tests

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Fix code-style

* Fix code-style

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Fix ambiguous build issue in GNA tests

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Fix ambiguous build issue in TF FE tests

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Update openvino.style for naming convention check

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Fix compilation error in core unit tests - need typename

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Add test for new element_type

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Fix code-style

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Update src/inference/src/dev/make_tensor.cpp

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>

* Add support of string Tensors for Constant

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Fix copying string tensor value for Constant

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Complete template methods for Constant

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Improve performance for initialization and destruction of string Tensor for set_shape

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Add check for string value in test

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Remove unused variable

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Update src/inference/src/dev/make_tensor.cpp

* Fix copy_to for ITensor of string type and add tests

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Add tests for Constant of string type and serialization

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Use memset_allocation to switch initialization

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Add additional documentation for host_ptr

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Update src/core/src/op/constant.cpp

* Use OPENVINO_THROW

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Update src/core/include/openvino/op/constant.hpp

* Update src/core/include/openvino/op/constant.hpp

Co-authored-by: Pawel Raasz <pawel.raasz@intel.com>

* Apply code-review feedback: use string_size

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Apply code-review feedback

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Recover evaluate impl for non-string type

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Fix code for creating of string constant for legacy non HostTensor tensor

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Fix build issue

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Apply code-review feedback: simplify copy_to method

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Fix build issue

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Use StringAlignedBuffer to store string Constant values

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Remove not needed methods in StringAlignedBuffer

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Refactor set_shape method

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

---------

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
Co-authored-by: Pawel Raasz <pawel.raasz@intel.com>
2023-12-01 11:17:53 +04:00
Pawel Raasz
7bb542fa70 [shape infer]Use ShapeOf node output type to evaluate bound (#21189)
* Use ShapeOf node output type to evaluate bound
- lower bound is not set to 0 when only upper is above inf
- update test where lower bound was set to 0 previously
- re-factor label evaluation

* Remove `max_et_val` from capture list

* Fix constexpr capture for MSVC

* Restore clear lower bound if upper is infinite

---------

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
2023-12-01 08:16:56 +01:00
Kelvin Choi
4c40716e95 [GPU] Prevent fusing for eltwise which is not broadcastable from input to fused output (#20974) 2023-12-01 16:11:59 +09:00
Pawel Raasz
c608771e03 [core]Migrate get_node_input_partial_shapes to dev API (#21302)
* Migrate `get_node_input_partial_shapes` to dev API
and use it instead deprecated

* Remove deprecated version

* Remove not required header
2023-12-01 06:12:16 +01:00
Eddy Kim
3e2c2c06af [GPU] cldnn::program serialization (#21290)
* cldnn::program serialization

* fixed to set a stream in a outputbuffer

* removed unnecessary comments

* replaced emplace_back with push_back

* updated bool vector serializer

* fixed several bugs

* removed m_model from compiled_model

* fixed streams_test for model caching

* updated mutable_data handling logic

* added a new API SetUpdateDispatchDataFunc

* updated to serialize weights_reorder_param

* added functional tests for dynamic model caching

* renamed to GetUpdateDispatchDataFunc

* added dynamic model caching tests
2023-11-30 20:16:51 -08:00
Maxim Vafin
7ff517466c [PT FE] Fix issue with inf produced by normal distribution (#21403) 2023-12-01 00:46:53 +00:00
Roman Kazantsev
c1cfb00f81 [TF Hub] Fix typo in test file name (#21408)
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-11-30 23:49:01 +00:00
Mikhail Ryzhov
1e959c7473 [GHA] Changed risc-v cache dir 2023-11-30 21:23:57 +01:00
Maxim Vafin
fa7a4f44b5 [PT FE] Update torch to 2.1 in GHA tests (#21391)
* [PT FE] Update torch to 2.1 in GHA tests

* Adjust requirements for natten

* Add upper bound

* Use sys.executable
2023-11-30 17:48:40 +00:00
Kristián Körmöndi
74bf3d4e38 Extend Python API with ScatterNDUpdate-3 (#21325)
Co-authored-by: Anastasia Kuporosova <anastasia.kuporosova@intel.com>
2023-11-30 15:32:45 +00:00
Pavel Esir
d5d9fd11b3 [tests] resolve skipped HF tests: 1st batch (#21305)
* initial

* some corrections for the first batch

* corrected classes for generate, corrected xfail

* leave only models with correct example input

* remove an obsolete line

* Update tests/model_hub_tests/torch_tests/test_hf_transformers.py

Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>

* update musicgen

* cleanup test_hf_transformers.py

* typo fix

* Update tests/model_hub_tests/torch_tests/test_hf_transformers.py

* Update tests/model_hub_tests/torch_tests/test_hf_transformers.py

* move to up: corrected xfail

* revert back accidentally deleted elif

* Update tests/model_hub_tests/torch_tests/test_hf_transformers.py

* Update tests/model_hub_tests/torch_tests/test_hf_transformers.py

---------

Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
2023-11-30 14:37:41 +00:00
Alexandra Sidorova
df03b0437a [Snippets] Refactored work with Buffers (#19644)
[Snippets] BufferManager is not derived from PassPipeline now

[Snippets] Added MemorySolver support

[Snippets] Made as static class

[Snippets] Added one-level inplace support

[Snippets] Added optimization bits

[Snippets] Small cosmetic fixes

[Snippets] Renamed to BufferSolver

[Snippets] Refactored

[Snippets] Fixed IdendifyBuffers

[Snippets] Add inplace multi + identify buffers

[Snippets] Made common pass

[Snippets] Added PassPipeline::get_pass<>()

[Snippets] Added comments, briefs, refactored smth

[Snippets] Fixed win build

[Snippets] Not allow to have the same Buffer ID for multi level Buffers

[Snippets] Moved CleanupRepeatedPtrShifts to common pioeline

[Snippets] Made IdentifyBuffers::ShiftPtrParams

[Snippets] Fixed window sliding mode

[Snippets] Refactored nested clusters

[Snippets] Adde normalized buffer regs

[Snippets] Not allowed to have the same ID for nested Buffers in IdentifyBuffers

[Snippets] Fixed DefineBufferClusters::are_buffer_neighbours::find

[Snippets] Removed useless method from InitLoops

[Snippets] Fixed CC build

[Snippets] Applied Ivan comments

[Snippets] Applied Ivan comment: refactored pass classes

[Snippets] Applied Vladislav comments

[Snippets] Applied Ivan comments 2

[Runtime] Moved MemorySolver to API2.0

[Snippets] Created common buffer allocation pass AllocateBuffers

[Snippets][Tests] Added InplaceEltwise unit test

[Snippets] fixed NormalizeBufferIDs

[Snippets][CPU] Fixed BrgemmBlocking lowered pass: move wsp for AMX to brgemm

[Snippets][CPU][Tests] Covered AMX MHA buffer allocation by unit tests
2023-11-30 17:46:35 +04:00
Andrey Kashchikhin
6ab5ef72d5 [CI] [GHA] Skip failing tests in the Windows workflow (#21349)
* always run tests, enable pr trigger

* skip tests

* provide ticket numbers

* rm pr trigger; rm unused schedule trigger
2023-11-30 15:50:01 +04:00
Anastasiia Pnevskaia
b0b28e3853 Disable memory sharing for GPU. (#21370) 2023-11-30 11:05:25 +00:00
Tomasz Jankowski
a9d2dd0b02 [core] Migrate ShuffleChannels operator to new API (#21340)
* Drop legacy stuff

* Repalce HostTensor with ov::Tensor

* Remove redundant call

* Revert safer axis normalilzation
2023-11-30 11:43:01 +01:00
River Li
ec239b3d5f [Fixing]Fix some scan coverity issues (#21378)
* Fix some scan coverity issues

* Fix an error
2023-11-30 14:39:55 +04:00
Maksim Kutakov
405d97e4a5 [CPU] Add optimized memory management for SDPA KV cache (#21242) 2023-11-30 14:07:43 +04:00
Vitaliy Urusovskij
718b5a60bf Remove legacy API from tests/ov_helpers/ (#21254)
* Remove legacy API from `tests/ov_helpers/`

* Build fix

* `ngraph::Function`->`ov::Model`

* ClangFormat

* Remove extra `#include <ngraph/ngraph.hpp>`

* Clean up headers

* `NGRAPH_CHECK` -> `OPENVINO_ASSERT`

* Refactor includes

* Fix precommit
2023-11-30 12:40:52 +04:00
Evgenya Nugmanova
243898560f Reducing ShapeOf sub-graphs for Flatten-like Reshapes (#21365)
* Extends SharedOpsOptimization with ScatterUpdate support

* Introduces Flatten operation symbolic optimization

* Code Style: tests

* Test fix

* Refactor
2023-11-30 12:21:18 +04:00
Pawel Raasz
51b5bc5ec4 [core]Add IF_TYPE_OF to enable CC for IfTypeOf class (#21240)
* Integrate `IfTypeOf` class with CC
- Add macro to warp class to add support for CC
- Update `ccheader.py` to created PP symbols for template parameter list
- Use new macro in Convert operator

* Correct symbols generation

* Update OV PP macros

* Wrap TestVisitor into namespace{}

* Removed not required macros, update comments

* Update element_visitor.hpp
2023-11-30 11:28:45 +04:00
Pawel Raasz
8ee8f4e112 [core]Migrate Range operator to new API (#21259)
* Migrate Range operator to new API
- remove legacy function an duplicated shape inference
- Minor change range reference implementation

* Move accessing tensors after validation
2023-11-30 11:27:08 +04:00
Tomasz Jankowski
eec370a88b [core] Migrate StridedSlice operator to new API (#21342)
* Drop legacy stuff

* Repalce HostTensor with ov::Tensor
2023-11-30 11:26:22 +04:00
Sofya Balandina
fa1cc89cf3 [sibgraph_dumper] Fix sporadic cache volume growth (#21352) 2023-11-30 11:05:43 +04:00
Maxim Vafin
3cae6e7aea [PT FE] Fix timm model list according to newest version (#21376)
* [PT FE] Fix timm model list according to newest version

* Remove xfail for hf model passed in latest nightly

* Fix code for loading vit_h model

* Restore torchvision
2023-11-30 08:17:21 +04:00
Maxim Vafin
007b6fd82c [PT FE] Add support for GFPGAN model (#21371)
* [PT FE] Add support for GFPGAN model

* Remove logs

* Fix codestyle

* Add support for aten::normal
2023-11-29 23:05:46 +00:00
Roman Kazantsev
cb5377fb1d [TF FE] Correct ArgMinMax translators and add tests (#21364)
* [TF FE] Correct ArgMinMax translators and add tests

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Update tests/layer_tests/tensorflow_tests/test_tf_ArgMinMax.py

---------

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-11-30 00:00:43 +04:00
Maxim Vafin
b3a13af9ef [PT FE] Support aten::softplus (#21367)
* [PT FE] Support aten::softplus

* Fix name
2023-11-29 14:38:31 +00:00
jmacekx
54e61ac9f5 refactor docs build process (#21239) 2023-11-29 15:30:05 +04:00
Xuejun Zhai
a6ea22ad0e [CPU Plugin][Func Test] Upgrade Fuse related to API 2.0 (#21359)
* [CPU Plugin][Func Test] Upgrade Fuse related to API 2.0

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* Update src/plugins/intel_cpu/tests/functional/subgraph_tests/src/fuse_non0_output_port.cpp

Co-authored-by: River Li <river.li@intel.com>

---------

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
Co-authored-by: River Li <river.li@intel.com>
2023-11-29 10:43:10 +00:00
Ekaterina Aidova
2b14ea97fc [PT FE]: support aten:resolve_neg, aten::resolve_conj (#21362)
* [PT FE]: support aten:resolve_neg, aten::resolve_conj

* Update src/frontends/pytorch/src/op_table.cpp
2023-11-29 10:34:46 +00:00
Xuejun Zhai
97588dc118 Xuejun/concat related tests 2.0 (#21334)
* [CPU Plugin][Func Test] Upgrade ConcatConstantInPlaceTest to API 2.0

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin][Func Test] Upgrade ReLuConcatConvSumInPlaceTest to API 2.0

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin][Func Test] Upgrade ConcatReorderInPlaceTest to API 2.0

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin][Func Test] fix enforce_bf16

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* Update concat_conv_sum_inplace.cpp

---------

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
2023-11-29 10:31:11 +00:00
River Li
0ab0d42f2b [CPU Tests] migrate ConcatResizeConcatTest to be 2.0 (#21300)
* [CPU Tests] migrate ConcatResizeConcatTest to be 2.0

* [CPU Tests] migate matmul test cases to be api 2.0

* Update

* Revert "[CPU Tests] migate matmul test cases to be api 2.0"

This reverts commit b5fe09b3fa.

* Remove Node type
2023-11-29 10:23:21 +00:00
Maxim Vafin
258c72555c [PT FE] Support bool in aten::prod (#21351) 2023-11-29 11:07:21 +01:00
Sungeun Kim
07bcb8b6ed This case will check the layout of condition in these conditions. (#21335)
- it re-allocated at primitive_inst::realloc_if_needed().
- it can be skip subgraph.
2023-11-29 09:42:16 +00:00
Xuejun Zhai
c1a28d0942 Upgrade CPU func tests to 2.o (#21344)
* [CPU Plugin][Func Test] Upgrade ConvPoolActivTest to API 2.0

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin][Func Test] Upgrade Conv3dReshapeTest to API 2.0

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin][Func Test] Upgrade ConvsAndSums to API 2.0

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin][Func Test] Upgrade FQScaleshiftWithConstantShiftTest to API 2.0

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin][Func Test] Upgrade FullyConnectedStridedInputsOutputsTest to API 2.0

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin][Func Test] Upgrade FuseScaleShiftAndFakeQuantizeTest to API 2.0

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin][Func Test] Upgrade FuseSplitConcatPairToInterpolateTest to API 2.0

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin][Func Test] remove ngraph namespace

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin][Func Test] fix error

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

---------

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
2023-11-29 13:32:05 +04:00
Nesterov Alexander
1b43b3c566 [ARM CPU] Fix debug fails in acl tbb scheduler (#20842) 2023-11-29 13:06:44 +04:00
Ilya Lavrenov
d553d4cd55 Fixed extensions loading on Windows (#21355) 2023-11-29 12:40:42 +04:00
Maksim Proshin
39ba1ed03f [DOCS] Update reference in quantization_w_accuracy_control.md (#21337)
* Update quantization_w_accuracy_control.md

avoid 404

* Update quantization_w_accuracy_control.md
2023-11-29 09:40:25 +01:00
Maxim Vafin
f3fe6b3f00 [PT FE] Add EDSR models to GHA tests (#21350)
* [PT FE] Add EDSR models to GHA tests

* Apply suggestions from code review
2023-11-28 21:05:33 +00:00
Sofya Balandina
0aa466e094 [apiConformance] Update expected err message for inference_precision (#21156) 2023-11-28 19:56:11 +01:00
Ilya Lavrenov
28208c6c9a Fixed conan RISC-V build (#21280) 2023-11-28 19:02:43 +04:00
Nikolay Shchegolev
c6d78def6e [CPU] Fixed NMS output memory redifinition logic (#21126)
CPU graph always adds Result node for outputs which don't have consumers. If Conversion is inserted between such output and Result this Conversion became consumer and require defined memory.
2023-11-28 13:58:33 +00:00
Edward Shogulin
d3d3ee55ef [CPU] Skip 32 bit tests for i32 Bitwise (#21328) 2023-11-28 17:06:16 +04:00
Roman Kazantsev
7c590bf180 [Hub Tests] Apply Python code formatting (#21286)
* Apply Python code formatting

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Apply Python code formatting

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

---------

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-11-28 16:54:02 +04:00
Andrey Babushkin
a7de95a8a4 Rename AKS runners' labels for consistency (#21282) 2023-11-28 12:13:28 +00:00
Roman Kazantsev
42245fc7c3 [OVC] Apply Python code formatting to OVC (#21339)
* [OVC] Apply Python code formatting to OVC

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Recover init.py file

* Update tools/ovc/openvino/__init__.py

* Update tools/ovc/openvino/__init__.py

---------

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-11-28 12:06:46 +00:00
Pawel Raasz
0905c763dd [core]Migrate ReadValue operator to new API (#21336)
* Migrate ReadValue to new API

* Fix build errors
2023-11-28 13:02:39 +01:00
Xuejun Zhai
409ed190de [CPU Plugin][Func Test] Upgrade FuseMulAddAndEwSimpleTest to API 2.0 (#21331)
Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
2023-11-28 12:06:20 +01:00
Vladimir Paramuzov
7ab79be0f6 [GPU] Stateful LLMs initial support (#21235) 2023-11-28 14:59:54 +04:00
Pawel Raasz
76b1861f86 Remove old API leftovers in Reshape operator (#21298) 2023-11-28 10:47:45 +01:00
Maxim Vafin
f90a4b9d31 Add transformation to fuse Concat sequence (#21310)
* Add transformation to fuse Concat sequence

* Update src/common/transformations/src/transformations/common_optimizations/concat_fusion.cpp
2023-11-28 13:34:27 +04:00
Pawel Raasz
685ac0d0a1 Migrate Reverse operator to new API (#21277) 2023-11-28 09:41:56 +01:00
Tomasz Jankowski
21201833ec [core] Migrate ScatterUpdate operator to new API (#21241)
* Drop legacy stuff

* Repalce HostTensor with ov::Tensor

* Use dedicated function to obtain Tensor data
2023-11-28 12:34:43 +04:00
Tomasz Jankowski
cf58a83094 [core] Migrate ScatterElementsUpdate operator to new API (#21212)
* Remove redundant code

* Repalce HostTensor with ov::Tensor for v12

* Repalce HostTensor with ov::Tensor for v3

* Add Tensors count assertion

* Rename

* Revert axis normalization

* Don't duplicate the code
2023-11-28 12:32:30 +04:00
Katarzyna Mitrus
37bac6ebcd [Opset13][FP8][Spec] FakeConvert op specification (#21039)
* FakeConvert spec init

* Add spec files to the opset docs

* Remove apply_scale attribute and update inputs description

* Experimental op notice

* Update short description

* Update detailed description.

* Add BF16 type to supported inputs

* Update  note about "Fake"

* Add more details

* Add formula of the operation
2023-11-28 09:14:06 +01:00
Alexander Suslov
be5c755c32 migrate to new convert API (#21323) 2023-11-28 11:36:25 +04:00
Ilya Lavrenov
c241405c5e Update docs (#21326) 2023-11-28 11:26:09 +04:00
Xuejun Zhai
441427abc8 [CPU Plugin][Func Test] Upgrade ConvWithZeroPointFuseSubgraphTest to API 2.0 (#21330)
Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
2023-11-28 10:52:09 +04:00
Pawel Raasz
164d101295 [core]Refactor leftovers after migration to new API (#21304)
* Refactor leftovers after migration to new API

* Restore output tensors count check
2023-11-28 10:48:12 +04:00
Wanglei Shen
acecf31642 [CPU][ARM] Enable multi-stream execution (#21009) 2023-11-28 10:41:56 +04:00
Xuejun Zhai
9320fa7c86 [CPU Plugin][Func Test] Upgrade ConvConcatSubgraphTest to API 2.0 (#21301)
* [CPU Plugin][Func Test] Upgrade ConvConcatSubgraphTest to API 2.0

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin][Func Test] Upgrade ConvConcatSubgraphTest, remove ngraph namespace

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

---------

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
2023-11-28 10:39:29 +04:00
Pawel Raasz
53baeacc2e [core]Remove deprecated function from Loop (#21299)
* Migrate leftovers in Loop operator to new API
- use new version of `get_constant_from_source`
- migrate `is_rank_compatible_any_of` to dev API
- Improve rank compatibility checks

* Use new version of `is_rank_compatible_any_of`
instead deprecated to reduce bin-size

* Remove deprecated `is_rank_compatible_any_of`
2023-11-28 10:37:15 +04:00
Roman Lyamin
01b4faf47f [GPU] Enable CPU pinning for compilation tasks executor (#21261) 2023-11-28 09:40:00 +04:00
David Nam
f84d1c531a [GPU] Fix constant dimension in case of node from if-op internal body (#21214)
* [GPU] Fix constant dimension in case of node from if-op internal body

* Add a condition to restrict to case where allow_new_shape_infer is false

* Add a condition to restrict to case where allow_new_shape_infer is false

* Add functional test

* Add a condition to retrict to case where the program is inner program
2023-11-27 15:11:07 -08:00
Artyom Anokhov
80feb465f6 [packaging] Fixed python component naming format for APT (#21321)
* debian.cmake: Updated python naming format, added conflict versions for python-samples

* Updated naming format for RPM python comp as well
2023-11-27 23:27:14 +04:00
Jan Iwaszkiewicz
bc78fd359e [PyOV] Dynamic attributes for Python based operators (#21256) 2023-11-27 16:16:02 +01:00
Maciej Smyk
4804ff8b1e [DOCS] Update of Sample Articles for master (#20957)
* Sample Articles Update

* Update get_started_demos.md

* Update get_started_demos.md

* Update get_started_demos.md

* Update get_started_demos.md

* Update docs/articles_en/learn_openvino/openvino_samples/get_started_demos.md

Co-authored-by: Karol Blaszczak <karol.blaszczak@intel.com>

* Update docs/articles_en/learn_openvino/openvino_samples/get_started_demos.md

Co-authored-by: Karol Blaszczak <karol.blaszczak@intel.com>

* Update docs/articles_en/learn_openvino/openvino_samples/get_started_demos.md

Co-authored-by: Karol Blaszczak <karol.blaszczak@intel.com>

* adding python code

* applying suggested changes

* Apply suggestions from code review

* Update docs/articles_en/learn_openvino/openvino_samples/get_started_demos.md

* Update docs/articles_en/learn_openvino/openvino_samples/get_started_demos.md

* Update docs/articles_en/learn_openvino/openvino_samples/get_started_demos.md

* Update docs/articles_en/learn_openvino/openvino_samples/get_started_demos.md

* Update get_started_demos.md

* fix notes

* fix synching of tabs

---------

Co-authored-by: Karol Blaszczak <karol.blaszczak@intel.com>
Co-authored-by: sgolebiewski-intel <sebastianx.golebiewski@intel.com>
2023-11-27 16:15:31 +01:00
Sun Xiaoxia
0bdd658317 Remove legacy threading code (#21279)
* remove legacy threading code

* fix code style
2023-11-27 18:45:34 +04:00
Alina Kladieva
d722e42052 [GHA] Smart CI for more pipelines (#21307)
* Add Smart CI for more pipelines. Refactor logic for workflow skip

Since different workflows may have different requirements for skipping them, I suggest to move these requirements to parameters instead of hardcoding them

* Use patterns for skipping pipeline for conformance-only

* Remove path filters for Android

* Return mistakenly deleted param

* Propagate params to Python script

* Add missing outputs mapping

* Return push trigger

* Skip CC CPU func when CPU is not affected

* Fix variable name
2023-11-27 18:43:54 +04:00
Andrey Kashchikhin
ca4c276072 [CI] [GHA] Increase precommit timeouts for TF Hub jobs (#21308)
* increase timeouts

* add more
2023-11-27 18:41:11 +04:00
Ivan Tikhonov
57d794c810 ConvertPrecision transformation: handle Assign, ReadValue and Variable (#21266)
* ConvertPresicion transformation: handle Assign, ReadValue and Variable

* revert debug code

* use correct commit for onednn_gpu

* codestyle
2023-11-27 18:34:31 +04:00
Oleg Pipikin
eaa3098920 Refactor ConvReshapeAct (#21219) 2023-11-27 14:33:03 +00:00
Karol Blaszczak
558e713043 [DOCS] fixes lts disclaimer master 2023-11-27 14:58:10 +01:00
Vitaliy Urusovskij
6dd448d9cc Fix COPY_INSTEAD_OF_MOVE and AUTO_CAUSES_COPY (#21267)
* Fix `AUTO_CAUSES_COPY` for hetero compiled_model

* Fix `COPY_INSTEAD_OF_MOVE`

* Fix `AUTO_CAUSES_COPY` in template comp_model
2023-11-27 16:31:32 +04:00
Mateusz Tabaka
b027766b0a Stop constantfold_subgraph on nonconstfoldable ShapeOf (#21171)
* Stop constantfold_subgraph on nonconstfoldable ShapeOf

Ticket: CVS-124628

* pass tensor to Constant constructor

---------

Co-authored-by: Ivan Tikhonov <ivan.tikhonov@intel.com>
2023-11-27 12:30:54 +01:00
River Li
b02ddc5831 [CPU] API 2.0 migration for cpu plugin properties (#20022) 2023-11-27 15:02:41 +04:00
River Li
45d6aa2171 [CPU Tests] migrate FuseTransposeAndReorderTest to API 2.0 (#21297) 2023-11-27 10:18:23 +00:00
Vladislav Golubev
598da6e5c0 [Transformations] Leftovers: FuseU4WeightsAndZeroPoint transformation (#20709)
* util::visit_constant_path

* ConvertU4WeightsZeroPointToScalar: avoid unnecessary insert

* Review comments applied

* codestyle fix
2023-11-27 10:38:05 +01:00
Vladislav Golubev
c50bd2b55f [Snippets] MHA tests: bf16 inputs generation restored (#21250) 2023-11-27 13:20:05 +04:00
Sungeun Kim
1a235ffe79 get layout from get_output_layout in primitive_inst (#21294) 2023-11-27 13:02:02 +04:00
Maxim Vafin
e52f922d35 [PT FE] Unify hub tests, add marks for timm models (#21283)
* Unify hub tests, add marks for timm models

* Fix hf tests
2023-11-27 12:22:13 +04:00
Xuejun Zhai
4fdbb2d4e8 Xuejun/snippet remove inference engine (#21293)
* [CPU Plugin][Snippet] remove InferenceEngine, replace with ov

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin][Snippet] remove ngraph namespace

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

---------

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
2023-11-27 12:00:58 +04:00
Anastasia Kuporosova
815980f290 [PyOV] Replace legacy assert (#21268)
* [PyOV] Replace legacy assert

* codestyle

* apply comments

* Update src/bindings/python/src/pyopenvino/graph/dict_attribute_visitor.cpp
2023-11-27 11:51:01 +04:00
Mateusz Mikolajczyk
ed061d5179 [Opset13][FP8] FakeConvert-13 input validation improvements (#21226)
* Improve shape type infer for FakeConvert-13

* Fix formatting

* Formatting + missing test

* Implement requested changes

* Improve type merge

* Fix formatting

* Add requested type_prop tests

* Implement requested changes

* Fix formatting

* Implement requested changes

* Use template type
2023-11-27 07:38:08 +00:00
Chenhu Wang
6b898fc8d9 [CPU] Interpolate extend to rank 3 input support (#21003) 2023-11-27 07:32:18 +00:00
Ekaterina Aidova
eaae00c2ca [PT FE]: support aten::empty_like (#21258)
* [PT FE]: support aten::empty_like

* Update src/frontends/pytorch/src/op/full.cpp

Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>

---------

Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
2023-11-27 07:15:19 +00:00
Ekaterina Aidova
a5d53aeaef [PT FE]: fix for aten::index_put_ if values.r > indices.r (#21255)
* [PT FE]: fix for aten::index_put_ if values.r > indicies.r

* add more complex test case
2023-11-27 07:01:16 +00:00
Roman Kazantsev
9421f4cf2d [TF FE] Speed up compilation - part 5 (#21288)
* [TF FE] Speed up compilation - part 5

Avoid usage of heavy opsetX header

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Complete constant.hpp template methods for string Tensor

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Revert "Complete constant.hpp template methods for string Tensor"

This reverts commit 8f86ab2e7b.

---------

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-11-27 10:51:18 +04:00
River Li
a6463c1ac6 [Core]lstm test api20 (#21031)
* [Core] lstm api fix

* Fix LSTMCell failure issues

* Solve GNA failures

* Update for comments

* Minor update

* Use new ov::test::utils::makeEltwise

---------

Co-authored-by: Durandin, Pavel <pavel.durandin@intel.com>
2023-11-27 10:25:58 +04:00
Xuejun Zhai
058001eb84 [Coverity Scan Issue] fix cs issues in scaled_attn.cpp (#21270)
* [Coverity Scan Issue] fix cs issues in scaled_attn.cpp

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* Fix review comments

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

---------

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
2023-11-27 10:25:02 +04:00
Wanglei Shen
72cb4e4820 add additional checks for bad cache information in VM (#21059)
* add additional checks for bad cache information in VM

* update implementation
2023-11-27 07:51:44 +08:00
Luo Cheng
91660b1c05 [CPU] Fix ScaledDotProductAttension accuracy problem (#21217) 2023-11-26 14:47:04 +04:00
Pavel Esir
493a338ad2 resolve TODO in efficient compression: return hashing compression back (#21141)
* turn on compression by searching duplicate blobs (by hash) for fp16

* style-fix

* apply comments

* added multimap

* style fix
2023-11-25 08:35:35 +00:00
Tomasz Jankowski
8231d57c38 [core] Migrate ScatterNDUpdate operator to new API (#21231)
* Drop legacy stuff

* Repalce HostTensor with ov::Tensor
2023-11-25 11:33:28 +04:00
Roman Kazantsev
9f87f72ca6 [TF FE] Speed up compilation - part 4 (#21269)
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-11-25 01:06:20 +04:00
Evgeny Kotov
965313ba0b [TF Hub][Perf Tests]Implement performance tests in precommit to compare read_model and convert_model paths (#21023)
* begin

* fixes

* measure time and compare

* fix bug + update precommint models

* cleanup

* add wget to install requirements; add to linux.yml

* fixes + improvements

* output results to html

* remove unneeded code

* fix

* code review fixes

* store downloaded models in cache

* use 1000 runs

* use model paths from tf-hub tests

* use tf hub api to download instead of wget; measure some time stats

* small fixes

* remove unneeded files

* use own list of models

* remove uneeded if

* remove unstable models

* remove unstable models

* fix requirements

* code review fixes

* Update .github/workflows/linux.yml

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>

* fix round_num function

* remove unstable network

* Update tests/model_hub_tests/models_hub_common/test_performance_model.py

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>

* code review fixes

* build fix

* code review fixes

* code review fixes

* code review fixes

* Update tests/model_hub_tests/models_hub_common/test_performance_model.py

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Update tests/model_hub_tests/performance_tests/test_tf_hub_perfomance_model.py

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Update tests/model_hub_tests/performance_tests/test_tf_hub_perfomance_model.py

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Update tests/model_hub_tests/models_hub_common/test_performance_model.py

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>

* code review fixes: use autoflake

* remove unneeded tensorflow_text

* Update .github/workflows/linux.yml

* Update linux.yml

Added TensorFlow_Hub_Performance_Models_Tests to final status check

---------

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
2023-11-24 18:13:44 +04:00
Ilya Lavrenov
e087ed083c Revert "the proxy device with id should be also a proxy device. (#21248)" (#21271)
This reverts commit c491381a0d.
2023-11-24 17:49:37 +04:00
Andrzej Kopytko
758524978b [DOCS] tabs styling (#21272) 2023-11-24 13:11:50 +01:00
Maxim Vafin
fe6ae4fbdd [PT FE] Get input dtype for aten::sum from graph (#21262) 2023-11-24 15:45:42 +04:00
Georgy Krivoruchko
71836a959d [TFLite] Moved tests to a separate file 2023-11-24 13:20:10 +04:00
Georgy Krivoruchko
a8e9989383 [CMAKE] Keep frontend's folder structure for Visual Studio (#21222) 2023-11-24 13:16:10 +04:00
Xuejun Zhai
807b77c38e [Func Test] Upgrade func test of QuantizedConvolutionBatchNorm related to 2.0 (#21053)
* [Func Test] Upgrade func test of QuantizedConvolutionBatchNorm related to 2.0

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [Func Test] fix QuantizedConvolutionBatchNorm test error, caused by error input

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [Func Test] fix format issue

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [Func Test] Fix errors

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [Func Test] Fix format issue

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [Func Test] Fix TransformationTestsF test error

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [Func Test] Fix test error

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [Func Test] Fix review comments

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

---------

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
2023-11-24 13:07:15 +04:00
Katarzyna Mitrus
63e7e2dd3e [Opset13][FP8] FakeConvert evaluate and reference impl (#21034)
* FakeConvert op init

* Update dest types names

* Update op hpp

* Update opset ops number

* Init type_prop tests

* Add attributes tests

* Add op check test

* Update namespace in fc cpp

* Update getters

* Refactor static member

* Make destination_type lower case

* Update type in test

* Move get_valid_types out of class

* Update ops number in opset

* Evaluate init

* Init poc evaluate

* Update types name

* Style update

* FakeConvert eval tests

* Add support for FP16 input

* Remove unused functions

* Use const auto and constexpr

* Create fake_convert reference file and move ref functions

* FakeConvert eval and reference update

* Remove unused is_normal variable

* Add bf16 tests

* Update construtor in tests

* adjust convert helper name

* Update comments

* Make func params as constexpr

* Update types

* Non scalar scale shape tests

* Use autobrodacast_select

* Use single autobroadcast_select

* Check scale_shape size

* Add var to keep scale_shift lambda

* Use lamda only for autobroadcast

* More checks for per channel scale

* Remove union half_t

* Change template to fp16 type for emulate

* Use f8e4m3_min_val as constexpr

* Update unsigned short to uint16_t

* Minor style refactor

* Minor comments update

* Update fake_convert_details namespace to func

* Update apply_conversion return type

* Add doxygen text

* Update supported type assert

* Remove duplicated tests

* Update namespace move to cpp

* Fill init with zeroes instead of reserve

* Use add div mul sub reference for applying scale

* Use autobroadcast_select for applying scale

* Bring back opt broacast cases

* Reuse scale_shift as func

* Adjust s and o var names

* Update multiplication in loop tu accumulate
2023-11-24 09:54:19 +01:00
Katarzyna Mitrus
65c3c7c20a [Opset13] Fix NMSRotated-13 reference sorting across batch (#20669)
* Add sort to test params

* Add more tests, batch, classes, sort

* test_sort_batch

* Fix sorting if sort_result_desc true

* Diable clang for test data

* Reenable type tests

* Fix comment

* Use std tie for values comparison

* Update var names to lhs and rhs

* Apply alignment with nms patch for GPU

---------

Co-authored-by: Michal Lukaszewski <michal.lukaszewski@intel.com>
2023-11-24 09:51:40 +01:00
Wang, Yang
c491381a0d the proxy device with id should be also a proxy device. (#21248) 2023-11-24 12:09:46 +04:00
Maxim Vafin
44310535ff Remove fp32 aligning for aten::round (#21257) 2023-11-24 12:09:34 +04:00
Anastasia Kuporosova
ccfe58cf84 [PyOV] Update imports in py api tests (#21252)
* [PyOV] Update imports in py api tests

* update year and back test_compression_4bit.py

* missed import
2023-11-24 11:16:57 +04:00
Sun Xiaoxia
b7edd5df69 migrate threading related interface from API 1.0 to 2.0 (#21167)
* migrate threading related interface from API 1.0 to 2.0

* fix code style

* fix @ref issue in doc

* change <> to quotation marks

* restore threading related interface API 1.0

* restore the changes of legacy code
2023-11-24 10:52:44 +04:00
Alina Kladieva
cf0c141e12 [GHA] Add GPU stub job to collect statistics (#21260) 2023-11-24 10:49:12 +04:00
rdorrepaal
0ea23ec538 adding resnet_50_prune and quantize_script for ov2023.1 (#21213) 2023-11-24 10:47:34 +04:00
Tomasz Jankowski
0829e8262d [core] Migrate NonZero operator to new API (#21109)
* Drop ngraph remains

* Use ov::Tensor

instaed of ngraph::HostTensor

* Refactor NonZero reference implementation

* Align code

* Refactor NonZero reference implementation

* Reduce binary size

* Reduce binary size

* Use proper type name
2023-11-24 07:00:41 +01:00
Alina Kladieva
613e4f5fac [GHA] Rename overall status check (#21227) 2023-11-23 17:12:58 +01:00
Pawel Raasz
94de12b19d [CI]Correct assertion in PlainTensor::slice (-Wsign-compare) (#21246)
* Correct assertion in PlainTensor member functions
- PlainTensor::size
- PlainTensor::stride

* Correct assertion in PlainTensor::slice
2023-11-23 12:15:56 +01:00
Maxim Vafin
0e08ba1edc [PT FE] Support aten::prod and aten::fmod (#21243) 2023-11-23 11:26:08 +01:00
Sergey Shlyapnikov
e23704ef5e [GPU] Update FC batch blocking for INT4 weights (#21228) 2023-11-23 13:24:14 +04:00
Fang Xu
03d54a579e binding pcore for stream calculation (#19550)
* binding pcore for stream calculation

* remove useless branch

* modify the function of query cache size

* fix compilation error

* use MT2.0 interface

* bind core when there is ecore

* initialize Xbyak::util::Cpu object at the begining of compile_model

* restore the file

* initialize Xbyak::util::Cpu object at the beginning of cpu plugin

* remove unused header

* extract task executor creation into a separate function

---------

Co-authored-by: Wanglei Shen <wanglei.shen@intel.com>
2023-11-23 12:14:36 +08:00
Vitaliy Urusovskij
bd7b6b3358 CPU func/beh tests to API 2.0 (#21236) 2023-11-22 22:51:29 +01:00
Edward Shogulin
9ee5d867d6 [CPU] Bitwise operations: x64 JIT implementation (#20664) 2023-11-22 18:16:12 +01:00
Andrey Babushkin
57425b934f Switch Windows workflow to self-hosted runners in AKS (#20972)
* Switch Windows workflow to self-hosted runners in AKS

* Uncomment 'pull_request' event

* Fix YAML indentation

* Fix YAML indentation again

* trying to pre-create sccache dir

* Fix yaml syntax

* Add sccache blob storage prefix

* sccache directory creation seems unneeded

The issue was in the usage of bsdtar instead of GNU tar - the former
is in C:\Windows\System32, which is the first entry in the PATH

* Fix sccache --zero-stats command for Linux

* [windows] Replace ccache-action with sccache-action sccache install

We don't need to use GitHub Actions cache feature as we have sccache
and Azure Blob Storage

* Switch the rest of the stages to AKS runners

* Hardcode VS Build Tools version

* Revert "Hardcode VS Build Tools version"

This reverts commit ea9ae1fb33.

* Increase timeout for C++ Unit tests

* Increase timeout for particular step

* Further increase of timeout

* Switch Windows Conditional Compilation workflow to AKS runners

* Fix YAML syntax

* Revert "Increase timeout for C++ Unit tests"

This reverts commit e9a00c41ad.

* Revert "Fix YAML syntax"

This reverts commit ecc1b15552.

* Revert "Switch Windows Conditional Compilation workflow to AKS runners"

This reverts commit d5969d58cd.

* Disable PR trigger for Windows workflow

Let's run this in test mode on master branch only for a while
2023-11-22 16:43:14 +00:00
Anastasiia Pnevskaia
823d327476 Fixed verbose param. (#21234) 2023-11-22 17:32:20 +04:00
Helena Kloosterman
309539667a Add hint to install patchelf with pip (#21237) 2023-11-22 16:19:11 +04:00
Mingyu Kim
712c5fbd39 [GPU] Onednn 3.4pc (#21064)
* Update onednn to 3.4pc branch
* [GPU] Add os_yx_is_osv16_isv2 for onednn weight format.
* Add os_y_is_x_osv16_isv4, g_os_yx_is_osv16_isv2

Signed-off-by: hyunback <hyunback.kim@intel.com>
Co-authored-by: hyunback <hyunback.kim@intel.com>
2023-11-22 20:54:20 +09:00
Ilya Lavrenov
5bab612ecc Allow to build and use OpenVINO with Python 3.12 (#21233) 2023-11-22 15:48:09 +04:00
Oleg Pipikin
08fa27762e Refactor ngraph builders 6 (#21133)
* Refactor make_convolution builders

* refactor make_activation builders

* Refactor make_eltwise builder

* Refactor make_embedding_bag_offsets_sum

* Refactor make_embedding_bag_packed_sum

* Refactor make_embedding_segments_sum

* Fix

* Apply comments
2023-11-22 15:47:33 +04:00
Min, Byungil
7f5ba4e074 [GPU] Update space_to_depth to use nGraph shape inference (#21135)
* [GPU] Update space_to_depth to use nGraph shape inference

+ Added calc_output_layouts to use shape_infer
+ Added relevant test-cases for static and dynamic
+ Modified typo of filename

Signed-off-by: Min, Byungil <byungil.min@intel.com>
2023-11-22 20:47:16 +09:00
Georgy Krivoruchko
a0614c4cb8 [TFLite] Initial support of Densify operation
* Added Densify
2023-11-22 15:34:10 +04:00
Maxim Vafin
1a288f0e9a [PT FE] Recognize empty non-frozen lists (#21224)
* [PT FE] Recognize empty non-frozen lists

* Do not produce alias for aten::clone
2023-11-22 11:58:53 +01:00
Pawel Raasz
97381e0b63 Correct assertion in PlainTensor member functions (#21199)
- PlainTensor::size
- PlainTensor::stride
2023-11-22 09:41:53 +01:00
NetPunk
d85e6c34a7 【Hackathon 5th No.96】add paddle unstack op (#20080)
* add paddle mapping

* develop test sampes

* remove redundant code

* revoke code change

* add type mapping

* add test sample

* format code

---------

Co-authored-by: Your Name <you@example.com>
2023-11-22 16:02:31 +08:00
Vitaliy Urusovskij
b66488e4ff Ngraph to ov (#21185) 2023-11-22 09:44:17 +04:00
Anastasia Kuporosova
0137fd7008 [Docs][PyOV] add missing docs (#21201)
* [Docs][PyOV] add missing docs

* more dirs

* one more missed
2023-11-22 01:33:02 +04:00
Vitaliy Urusovskij
242336c97f Refactor functional/plugin/conformance/ and functional/plugin/shared/ (#21221)
* Refactor conformance/ folder

* Refactor functional/plugin/shared/
2023-11-21 17:34:08 +00:00
Vitaliy Urusovskij
bbb06c4f76 Remove InferenceEngine && ngraph from tools/ (#21215) 2023-11-21 21:14:53 +04:00
Ivan Tikhonov
a329611349 Support dynamic shapes in ReadValue/Assign ops and MakeStateful transformation (#20404)
* Support for dynamic shapes in ReadValue/Assign ops and MakeStateful transformation

* fix unit tests

* codestyle

* fix warning

* fix visitors test

* Fix lowLatency transformation, fix functional tests

* fix LowLatency2

* codestyle

* Fix CPU/GNA tests

* fix shape inference of assign operation

* fix python API

* fix mypy error

* Fix read_value operation version in python API for opsets7-13

* Update python API and fix tests

* set the same Varibable obj to Assign/ReadValue in py API, disable fp16 memory tests

* Update shape inference methods of Assign, ReadValue; update tests; fix codestyle

* fix python codestyle

* fix tests

* Resolve review comments

* codestyle

* resolve review comments

* codestyle

* Update ReadValue op in kaldi frontend, fix GNA tests

* fix Assign/ReadValue bindings, fix read_value test

* Apply suggestions from code review

Co-authored-by: cecilia peng <cecilia.peng@intel.com>

* Fix functional tests, add ov::Type support as an argument for read_value py binding

* temporary disable test_query_state_write_buffer fp16 tests

* Fix backward compatibility with the IRs with ReadValue/Assign ops generated via prev versions of OV; fix func tests

* fix python test, support type as str in read_value/assign bindings

* fix model binding

* fix pre-commit tests: variables vector cleanup

* fix integration with cpu changes

* codestyle

* fix warning

* Fix type/shape validation for read_value op

* fix a type_prop test for assign op

---------

Co-authored-by: cecilia peng <cecilia.peng@intel.com>
2023-11-21 20:59:36 +04:00
Vladimir Paramuzov
eb94c80804 [GPU] Enable BroadcastTransition before CommonOptimizations (#21198) 2023-11-21 16:54:04 +01:00
Roman Kazantsev
d1f71ee233 [TF FE] Speed up compilation - part 3 (#21211)
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-11-21 14:44:21 +00:00
Mateusz Mikolajczyk
54a68c8a13 [Opset13][pyAPI] Python API FakeConvert-13 (#21155)
* [Opset13][pyAPI] Python API FakeConvert-13

* Fix typo

* Add experimental warning

* Add missing py opset in docs

* Fix flake

* Apply suggestions from code review

Co-authored-by: Anastasia Kuporosova <anastasia.kuporosova@intel.com>

* Apply suggestions from code review

Co-authored-by: Katarzyna Mitrus <katarzyna.mitrus@intel.com>

* Apply requested changes

---------

Co-authored-by: Anastasia Kuporosova <anastasia.kuporosova@intel.com>
Co-authored-by: Katarzyna Mitrus <katarzyna.mitrus@intel.com>
2023-11-21 14:25:02 +00:00
Irina Efode
4237de6bf1 [CONFORMANCE] Remove old-named conformance exec files (#21128)
* [CONFORMANCE] Remove old-named conformance exec files

* fix_GHA
2023-11-21 17:06:05 +04:00
Sofya Balandina
aaddfb3a00 [op_conformance] Fix not removing of crash for cases with several ops (#21194) 2023-11-21 17:03:20 +04:00
Sofya Balandina
1fd65ce0f9 [apiConformance] Update analyze_confomance_fails.py to use with sw plugins (#21163) 2023-11-21 17:02:17 +04:00
Maciej Smyk
95accde9df [DOCS] README files for Samples + name update for Get Started for master (#21157) 2023-11-21 13:20:25 +01:00
Sebastian Golebiewski
90437f7efa Update reference to Supported Model Formats (#21216) 2023-11-21 13:18:38 +01:00
Sebastian Golebiewski
7150a98d95 Fix math formula in Elu_1 (#21203) 2023-11-21 12:14:25 +01:00
Sebastian Golebiewski
a530a53eee Fixing links in notebooks (#21208) 2023-11-21 12:09:19 +01:00
Tingqian Li
61c5a80fa6 [CPU] General pattern & matcher & RoPE (with EliminateStridedSlice fixed) (#21196) 2023-11-21 10:56:56 +00:00
Vladimir Paramuzov
a6e4d8fc30 [GPU] Cleanup buffer optimization code (#21012) 2023-11-21 14:43:14 +04:00
Oleg Pipikin
6607e5b8c2 Refactor ngraph builders 7 (#21181)
* Refactor make_reduce builder

* Refactor make_comparison builder

* Refactor make_logical builder

* Refactor make_fully_connected

* Refactor make_lstm builder

* Refactor make_gru builder

* Refactor make_rnn builder

* refactor make_augru builder

* Refactor make_gather_nd builders

* Refactor make_dft builder

* Refactor make_rdft builder

* Fix code style

* Fix

---------

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
2023-11-21 13:36:51 +04:00
Oleg Pipikin
165f574d8f Refactor ngraph builders 2 (#21043)
* Deprecate makeBatchToSpace

* Deprecate makeSpaceToBatch

* Remove makeStridedSlice

* Remove and deprecate makeSlice

* Remove and deprecate makeMVN

* Fix
2023-11-21 13:03:39 +04:00
River Li
aaa08d013a [Core]Remove macro CONFIG from core_impl (#21142)
* Remove macro CONFIG from core_impl

* Fix errors

* Solve AutoBatching_Test_DetectionOutput failure issue
2023-11-21 12:51:30 +04:00
Oleg Pipikin
a7edeb53d1 Refactor negative ProposalBehTest (#21190)
Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
2023-11-21 11:28:49 +04:00
Pawel Raasz
5d6d6a2cfe [core]Optimize OV assert macors to reduce CPU plugin binary size (#21180)
* Optimize OV assertions to reduce bin-size of libs

* Migrate assertion leftovers in CPU plugin

* Add NotImplemented::create to support use with macro
OPENVINO_ASSERT_HELPER

* Remove CheckLocInfo struct

---------

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
2023-11-21 07:16:30 +01:00
Wilson Seok
d2dcdf86ba [GPU] Fix issues in dynamic loops newly created by TF FE support (#21060)
* implementation of loop for new tf fe

* fix loop dynamic shape func test case failure

* backedge memory validation for static shape

* update checking user of backedge_to_prim

* avoid opt out of loop body network reorder result

* fix for batch 2 case

* fix batch2 case for loop

* fix build error

* fix missing condition
2023-11-20 16:15:02 -08:00
Kelvin Choi
adbfc53374 [GPU] Add an unittest to check reorder with trucation mode after reshape node not to split (#20783) 2023-11-21 09:00:12 +09:00
Meet Patel
20af42cfd9 Add python bindings for PILLOW interpolation modes (#21188) 2023-11-20 22:39:05 +00:00
Maxim Vafin
570817998d Update reverse infer to allow changing shape if it already partially defined (#21073)
* Update reverse infer to allow changing shape if it already partially defined

* Update tests

* Remove changes in If

---------

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2023-11-20 21:57:43 +00:00
Ilya Lavrenov
0f33a77a27 Fixed compilation after merging 2 conflicting PRs (#21192) 2023-11-20 21:21:54 +04:00
Ilya Lavrenov
21a90f4e78 Smart CI: specializations for preprocessing and LPT (#21186)
* Smart CI: specializations for preprocessing and LPT

* Added PROXY component
2023-11-20 19:08:45 +04:00
Anastasia Kuporosova
56301d8878 [PyOV] add param-result to offline transformation (#21140) 2023-11-20 15:59:02 +01:00
Jan Iwaszkiewicz
0c041d7ebc [PyOV] Adjust opset13 Constant to utilize runtime.op.Constant functionalities (#21046) 2023-11-20 15:29:46 +01:00
Alina Kladieva
23462aea6b [GHA] Fix validation of dependent components in Smart CI config (#21187)
Use new syntax
2023-11-20 15:08:24 +01:00
Vitaliy Urusovskij
b700040e29 Remove legacy API from ov_cpu_unit_tests (#21184)
* Remove `InferenceEngine` usage

* Remove use of `ie_ngraph_utils.hpp`

* Rename `ng_transormations` to `transformations`

* Remove `ngraph` usage

* Misprint
2023-11-20 17:49:56 +04:00
Liu
d9e04c3b9e [ONNX] Extend ONNX Frontend with Function LessOrEqual (#21102)
* Implement less_or_equal in set_1 and set_16

* Create tests for ONNX frontend less_or_equal operator
2023-11-20 17:16:03 +04:00
Ilya Lavrenov
a5e33f10ff Revert "[CPU] Add general pattern serialization & matcher & RoPE (#20729)" (#21182)
This reverts commit a61a9be495.
2023-11-20 16:37:15 +04:00
Ilya Lavrenov
2ee8b29f64 Smart CI: CPU triggers tests for PT and TF FEs (#21183) 2023-11-20 15:35:40 +04:00
Tomasz Jankowski
ffa6e8458d [core] Migrate ShapeOf operator to new API (#21143)
* Drop legacy stuff

* Drop HostTensor

* Remove unused element types support

* Revert "Remove unused element types support"

This reverts commit 2ca8280c56.

* Improve style
2023-11-20 15:06:30 +04:00
Pawel Raasz
af27b6f16a Add checking compatible types for Gathers GroupedGatherElimination (#20979)
* Check Gathers 2nd input type to avoid Concat exception
in GroupedGatherElimination transformation

* Add indices conversion if possible
2023-11-20 14:59:37 +04:00
Evgeny Kotov
ecd1972c24 don't fold ShapeOf in TransposeSinking (#20742)
* add to DisableShapeOfConstantFolding flag; set it in ts_gather; add unit test

* fix ts_general; use check_shape flag in EnableShapeOfConstantFolding

* set EnableShapeOfConstantFolding constructor explicit

---------

Co-authored-by: Ivan Tikhonov <ivan.tikhonov@intel.com>
2023-11-20 14:57:19 +04:00
Alina Kladieva
7931938ea4 [GHA] Alternative way to handle required pipeline checks (#21164) 2023-11-20 11:14:58 +01:00
Roman Kazantsev
bb773137f1 [TF Hub] Move all nightly scope to Kaggle links (#21169)
7 models are skipped since they are not moved there. Now they are not available.

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-11-20 13:33:21 +04:00
Przemyslaw Wysocki
dddc85f68f Add lower bound to sympy (#21127) 2023-11-20 10:17:47 +01:00
Przemyslaw Wysocki
bd5bd56d29 Remove failing mxnet test (#21151) 2023-11-20 10:17:22 +01:00
Zlobin Vladimir
e965bea8fe benchmark_app: allow dla_benchmark for FPGA to override show_available_devices() for --help (#20945)
It's possible now to have in main.py:
parser = parse_args()
import argparse, openvino
core = openvino.Core()
class print_help(argparse.Action):
    def __call__(self, parser, namespace, values, option_string):
        parser.print_help()
        print("\nAvailable target devices:  ", ("  ".join(core.available_devices)))
        sys.exit()
parser.add_argument('-h', '--help', action=print_help, nargs='?', default=argparse.SUPPRESS, help='Show this help message and exit.')
args = parser.parse_args()

The details are in https://github.com/openvinotoolkit/openvino/pull/20098
2023-11-20 13:00:37 +04:00
Roman Kazantsev
ab3452ce59 [TF FE] Speed up compilation - part 2 (#21170)
Avoid use of heavy header

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-11-20 12:51:35 +04:00
Alina Kladieva
f7f8636fe4 [GHA] Workaround for some non-repo components in Smart CI (#21134)
* Workaround for some non-repo components in Smart CI

* Add possibility to add all components as dependent

* Remove extra check

* Add test case for "all" key
2023-11-20 12:44:50 +04:00
Pawel Raasz
43bb86d384 [core]Migrate Power operator to new API (#21150)
* Migrate Power operator to new API

* Refactor ref implementation to reduce bin size
2023-11-20 08:48:38 +01:00
Maksim Kutakov
5203d3483b [CPU] Dynamic shapes support for memory states with zero copy (#20368) 2023-11-20 09:58:38 +04:00
Tingqian Li
a61a9be495 [CPU] Add general pattern serialization & matcher & RoPE (#20729) 2023-11-20 09:50:50 +04:00
Min, Byungil
081f5aad8a [GPU] Fix perf regression from dynamic tensor iterator (#21065)
+ Not to use reference::split. It is very slow.

Signed-off-by: Min, Byungil <byungil.min@intel.com>
2023-11-20 10:03:39 +09:00
Min, Byungil
8181f30a67 [GPU] Fix accuracy issue of blocked format batching on iGPU (#20890)
* [GPU] Fix accuracy issue for blocked format batching on iGPU

+ Bugfix GET_INDEX for batching of b_fs_zyx_fsv16 of target model
+ Updated fetch_data.cl
+ Minor fix of error message

Signed-off-by: Min, Byungil <byungil.min@intel.com>
2023-11-20 09:46:37 +09:00
Maxim Vafin
276153d1ce [PT FE] Support aten::_weight_norm and aten::full with scalar size (#21160)
* Support aten::_weight_norm and aten::full with scalar size

* Add op_table changes

* Add comments
2023-11-17 19:13:15 +00:00
Sebastian Golebiewski
44d56b9dc7 [DOCS] New page design for notebooks (#20996)
New design and new directive for notebooks
2023-11-17 16:34:34 +01:00
Oleg Pipikin
a9dffa8d70 Refactor ngraph builders (#20998)
* Remove makeInputLayer builders

* Refactor makeBroadcast builder

* Deprecated makeCTC builders

* Fix for broadcast builder

* Remove and deprecate makeSplit builder

* fix

* Fix
2023-11-17 16:10:19 +01:00
Maxim Vafin
b2e14f9fad [PT FE] Fix pad value dtype for pooling (#21139)
* [PT FE] Fix pad value dtype for pooling

* Apply suggestions from code review

* Apply suggestions from code review
2023-11-17 16:09:56 +01:00
Oleg Pipikin
71af0eef38 Refactor ngraph builders 4 (#21100)
* Remove and deprecate some ngraph builders
2023-11-17 14:51:56 +00:00
Andrzej Kopytko
d29207e201 [DOCS] update benchmark files 2023-11-17 14:02:43 +01:00
Karol Blaszczak
fa0a6ab9d1 [DOCS] fix npu mention (#21147) 2023-11-17 13:50:05 +01:00
Tatiana Savina
c01fdc9276 [DOCS] Port release docs to master (#21154)
* update links (#21118)

* change install (#21117)

* deprecate deployment manager (#21089)
2023-11-17 13:47:00 +01:00
Georgy Krivoruchko
c71ee333f8 [TFLite] Extended verification of supported files (#21006)
* [TFLite] Fix for crash in case of zero-length file

* Extended verification using FourCC check in the header

* Fix for Linux build

* Fixes for Linux

* Some platforms may miss SizePrefixed... method

* Fixed path preparation
2023-11-17 15:03:31 +04:00
Roman Kazantsev
b380eb06ee [TF FE] Speed up compilation - part 1 (#21144)
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-11-17 10:26:28 +00:00
Luo Cheng
e4311aae46 [CPU] Fix ScaledDotProductAttention build failure on ubuntu18 (#21123) 2023-11-17 10:14:01 +00:00
Maxim Vafin
6bdc1597ed [PT FE] Align types for aten::clamp_max and aten::clamp_min (#21137)
* Align types for aten::clamp_max and aten::clamp_min

* Add tests
2023-11-17 10:26:44 +01:00
Paul Youngsoo Ahn
8b5b7a627b [GPU] Fix loop issues (#21091)
* [GPU] Fix loop issues
* if loop does not run inner body, return zero dimension layout for dynamic dimension layout

* Support dynamic sliced input in inner body in creaet concate mapping

* Modify update_shape to call reset_shape_changed() when inputs of loop are not changed
* Add unit test

* Follow-up codereview
2023-11-17 00:16:58 -08:00
Aleksandr Voron
60730f61a4 [CPU][ARM] Call to_string() method of ov::element::Type in ACL Convert executor (#21136) 2023-11-17 07:02:13 +00:00
Taylor Yeonbok Lee
cc463a7757 [GPU] Skip empty subgraph of If operator (#21087)
* Skip empty subgraph of If operator

* Added test
Applied review comment

* Fix for the following case:
1) body network output has only constant input
2) body network output itself is the constant
2023-11-17 09:39:03 +04:00
Pratham Ingawale
a1416ed68f pytest special test case 3 (#20313)
* pytest:- freeze_placeholder_test.py

* trying with classmethod

---------

Co-authored-by: Przemyslaw Wysocki <przemyslaw.wysocki@intel.com>
2023-11-16 19:48:41 +04:00
Artyom Anokhov
4cf85dbda0 Added 2023.2.0 to APT/YUM conflicts (#21129) 2023-11-16 18:07:51 +04:00
Oleg Pipikin
819feeb56d Refactor NMS shared tests (#20897)
* Refactor MatrixNmsLayerTest

* Refactor MulticlassNmsLayerTest

* Refactor NmsLayerTest

* Apply comments

* Apply comments
2023-11-16 13:57:56 +00:00
Sofya Balandina
b6f1ffceca [apiConformance] Update reports to avoid sw plugins over all devices (#20222) 2023-11-16 17:51:34 +04:00
Sebastian Golebiewski
908fa51742 Fixing versions in Install Openvino (#21124) 2023-11-16 13:38:21 +01:00
Alexander Suslov
2a33f35c43 DOCS Update optimization docs with ov.save_model() instead of ov.serialize() (#20711)
* introduced ov.save_model(...) to the ptq code examples

* replied to comments

* fixed rendering

---------

Co-authored-by: Karol Blaszczak <karol.blaszczak@intel.com>
2023-11-16 13:34:33 +01:00
Irina Efode
d1e1555f2f [CONFORMANCE] Cleaning up (#20835)
* 1. Add Op_conformance_utils lib.
2.rename targets.
3. Remove behavior folder from api conformance
4. Remove ov1.0 from opImplCheck
5. move tests and insts to one file
6. small refactoring for op conformance test names

* align namespaces, remove test_utils from subgraphs_dumper

* update target names

* Remove extra

* Fix the tests without shapes in meta

* fix failed test names

* Add attribute reader

* Fix buils

* Check the registered lib

* try

* add comparator

* Revert "try"

This reverts commit 27eaa4ea0f.

* try to fix win build

* types

* tr

* remove pragma once
2023-11-16 16:27:44 +04:00
Ilya Lavrenov
3fbef0d498 Fixed install rules for case when only ONNX FE is enabled (#21114) 2023-11-16 16:26:05 +04:00
Sebastian Golebiewski
bed6eeb94b [DOCS] final update of relnotes (#21115)
Co-authored-by: Karol Blaszczak <karol.blaszczak@intel.com>
2023-11-16 12:49:48 +01:00
Roman Kazantsev
2928b6bfed [TF Hub] Move pre-commit to Kaggle model links (#21113)
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-11-16 14:24:45 +04:00
Andrzej Kopytko
fa1ca27576 [DOCS] GraphJs refactor (#21110)
* [DOCS]InitGraphChanges

* [DOCS] Benchmark files update

* [DOCS] update files from 0635

* [DOCS] fix

* [DOCS ]fix2
2023-11-16 11:09:39 +01:00
Alexander Suvorov
023f6b8682 Update 2023.2.0 Selector Tool (#21097)
* Update selector tool

* update ov version title
2023-11-16 11:06:28 +01:00
Pawel Raasz
78bbe03ae8 [core]Migrate Convert operator to new API (#20961)
* Migrate Convert operator to new API

* Unify Convert reference for non-LP types

* Correct evaluate when output tensor not allocated

* Correct input type name

* Restore static_cast for bool as char
2023-11-16 09:06:07 +00:00
Ilya Lavrenov
aee4865b2f Try to fix code snippets on macOS (#21111) 2023-11-16 13:05:16 +04:00
Maksim Kutakov
315c916ced [CPU] Postpone throwing error for dnnl memory until it's requested (#20082)
* Postpone throwing excp when dnnl memory has error

* Change test name

* Enable tests

* Fix the exception macro

* Fix after merge
2023-11-16 09:38:04 +01:00
Wang Wangwang
1693ef17f0 [HETERO] Fix split subgraphs with parameter of different affinity (#21026) 2023-11-16 12:37:00 +04:00
Pawel Raasz
e72afbec7e Migrate PReLU operator to new API (#21098) 2023-11-16 12:18:06 +04:00
yanlan song
f78d0950d6 resolve dependency (#21105)
Signed-off-by: fishbell <bell.song@intel.com>
2023-11-16 11:42:42 +04:00
Haiqi Pan
4d685194fe remove similar test cases (#21104) 2023-11-16 06:48:26 +00:00
Oleg Pipikin
76459a316f Refactor ngraph builders 5 (#21101)
* Remove makeGatherElements builder

* Remove makeTile builder

* Remove makeNormalizeL2 builder

* Deprecate makeNms buider

* Remove makeOneHot builder

* Remove makeEinsum
2023-11-16 10:29:48 +04:00
Xuejun Zhai
83ef7d7ff9 [Func Test] Upgrade func test of QuantMatMulTest related to 2.0 (#21103)
Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
2023-11-16 06:29:10 +00:00
Sergey Shlyapnikov
af34891750 [GPU] Add more flexible check if user's buffer is USM Host and can be reused (for iGPUs only) (#21018) 2023-11-16 09:46:10 +04:00
Luo Cheng
0061d0b286 [CPU] ScaledDotProductAttention op support (#20506) 2023-11-16 05:30:30 +00:00
Yaroslav Torziuk
f45dccad15 [GPU] Multinomial-13 (#20616)
* Update random_uniform in multinomial reference implementation to generate values of the same type as the first input

* Add kernel selector for multinomial

* Add multinomial primitive and its instantiation

* Add calc_outut_layout implementation for slice_inst

* Multinomial builder

* Add multinomial kernel

* Add multinomial single layer test class

* Add GPU multinomial tests instantiation
2023-11-15 16:20:43 -08:00
Xuejun Zhai
8eb529ceac [Func Test] Upgrade func test of QuantGroupConvBackpropDataLayerTest related to 2.0 (#21094)
Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
2023-11-15 18:14:25 +00:00
Xuejun Zhai
6755a7e3a8 [Func Test] Upgrade func test of QuantGroupConvLayerTest related to 2.0 (#21092)
Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
2023-11-15 17:28:07 +00:00
Karol Blaszczak
7e5f491459 [DOCS] home-tile-removal (#21096) 2023-11-15 16:21:25 +01:00
Irina Efode
eedc8d814c [IE TESTS ]Checking path of TEMPLATE plugin for OV_PLUGIN_CACHE (#20960)
* [IE TESTS] Change path of TEMPLATE plugin for OV_PLUGIN_CACHE

* fix code style

* partial revert revert

* Update ov_plugin_cache.cpp
2023-11-15 19:19:47 +04:00
Karol Blaszczak
4b078f698d [DOCS] sys req update (#20953) 2023-11-15 16:00:36 +01:00
Przemyslaw Wysocki
2c3535355d [PyOV] Add torchvision to OpenVINO preprocessing converter docs (#20770)
Co-authored-by: Karol Blaszczak <karol.blaszczak@intel.com>
2023-11-15 15:25:36 +01:00
Ivan Novoselov
9e7deba8da [Snippets] Deep copy interface (#20242) 2023-11-15 15:06:12 +01:00
Anastasiia Pnevskaia
d304be0bd7 [OVC] Fixed error in --output_model param. (#20969)
* Fixed error in get_model_name_from_args(), added tests.

* Corrected output_model description.

* Corrected test.
2023-11-15 17:42:14 +04:00
Tomasz Jankowski
3558f09c3d [core] Migrate OneHot operator to new API (#21038)
* Drop ngraph remains

* Use ov::Tensor

instaed of ngraph::HostTensor

* Set output shape
2023-11-15 14:13:14 +01:00
Xuejun Zhai
00d0c0ad0d [Func Test] Upgrade func test of QuantConvBackpropDataLayerTest related to 2.0 (#21082)
Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
2023-11-15 14:12:33 +01:00
Alexandra Sidorova
aef989f585 [CPU][Tests] Fixed linking of specific tests (#21084) 2023-11-15 13:35:16 +01:00
Haiqi Pan
79c9f4ad44 migrate executable_network test case to compiled_model (#19541)
* add get property test case

* add CanCreateTwoExeNetworksAndCheckFunction and pluginDoesNotChangeOriginalNetwork

* tmp

* add canSetInputPrecisionForNetwork and canSetOutputPrecisionForNetwork

* fix code style

* tmp

* Revert "tmp"

This reverts commit ff3f8d56d5.

* tmp

* add CanCompileModelWithEmptyProperties

* remove comment

* add infer request

* add CanLoadNetworkWithCustomLocale

* add CanLoadNetworkWithCustomLocale

* fix error

* remove case in io_tensor.cpp

* fix Unsupported metric key: OPTIMAL_BATCH_SIZE

* Update src/tests/functional/plugin/conformance/test_runner/api_conformance_runner/include/api_conformance_helpers.hpp

Co-authored-by: Chen Peter <peter.chen@intel.com>

* fix batch size

* remove useless code

* remove failed case CanCompileModelWithEmptyProperties, CanLoadNetworkWithCustomLocale and LoadNetworkWithBigDeviceIDThrows to test

* Revert "remove failed case CanCompileModelWithEmptyProperties, CanLoadNetworkWithCustomLocale and LoadNetworkWithBigDeviceIDThrows to test"

This reverts commit 1317d0773c.

* Revert "remove useless code"

This reverts commit b3dd0ffaab.

* Revert "fix batch size"

This reverts commit 2afd673cff.

* Revert "Update src/tests/functional/plugin/conformance/test_runner/api_conformance_runner/include/api_conformance_helpers.hpp"

This reverts commit 9d6030952f.

* Revert "fix Unsupported metric key: OPTIMAL_BATCH_SIZE"

This reverts commit 2de26547ea.

* try to add optimal_batch_size in cpu plugin

* return model when optimal_batch_size not found in apply_auto_batching

* revert cpu plugin

* gna cannot support some model

* update test case name

* skip CanCreateTwoCompiledModelsAndCheckRuntimeModel in gna

* Update src/inference/src/dev/core_impl.cpp

Co-authored-by: Chen Peter <peter.chen@intel.com>

* Update src/inference/src/dev/core_impl.cpp

Co-authored-by: Chen Peter <peter.chen@intel.com>

* replace deviceName.substr(pos + 1) with deviceNameWithoutBatch

* fix bug

* Update src/inference/src/dev/core_impl.cpp

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>

* Update src/tests/functional/plugin/shared/include/behavior/compiled_model/compiled_model_base.hpp

Co-authored-by: River Li <river.li@intel.com>

* Update src/tests/functional/plugin/shared/include/behavior/compiled_model/compiled_model_base.hpp

Co-authored-by: River Li <river.li@intel.com>

* Update src/plugins/intel_gna/tests/functional/shared_tests_instances/skip_tests_config.cpp

Co-authored-by: River Li <river.li@intel.com>

* Update src/plugins/intel_gna/tests/functional/shared_tests_instances/skip_tests_config.cpp

Co-authored-by: River Li <river.li@intel.com>

---------

Co-authored-by: Chen Peter <peter.chen@intel.com>
Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
Co-authored-by: River Li <river.li@intel.com>
2023-11-15 13:27:42 +01:00
Oleg Pipikin
c7765c91f5 Refactor ExperimentalDetectron tests (#20846)
* Refactor ExperimentalDetectronDetectionOutputLayerTest

* Refactor ExperimentalDetectronGenerateProposalsSingleImageLayerTest

* Refactor ExperimentalDetectronPriorGridGeneratorLayerTest

* ExperimentalDetectronROIFeatureExtractorLayerTest

* Refactor ExperimentalDetectronTopKROIsLayerTest

* Apply comments

* Aplly comments
2023-11-15 13:16:37 +01:00
Xuejun Zhai
66a8600564 [CPU Plugin 2.0] replace ie::precision with ov::element (#21041)
* [CPU Plugin 2.0] replace ie::precision with ov::element

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin 2.0] fix MatmulWeightsDecompression.CompareWithRefs test error

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin 2.0] fix compiler error

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin 2.0] fix compiler error

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

* [CPU Plugin 2.0] fix review comment

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>

---------

Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
2023-11-15 12:32:43 +01:00
Wilson Seok
0180078c70 [GPU] Fix permute reorder fusing bfzyx (#20896)
* fix accuracy issue of permute reorder fusing

* add func test

* remove debug code

* use unit test

* simplify condition

* add additionall condition
2023-11-15 09:33:12 +00:00
Siddhant Chauhan
aa1fcbbad1 [ONNX] Extend ONNX Frontend with Function GreaterOrEqual
* ONNX greater_or_equal enabled
2023-11-15 00:34:31 -08:00
Sungeun Kim
5365bfe0a7 [GPU] remove setting threshold manually for dynamic 1d conv (#21028) 2023-11-15 16:54:22 +09:00
Oleg Pipikin
534ec2e9ab Refactor ngraph builders 3 (#21077)
* Remove and deprecate makeSqueezeUnsqueeze

* Remove and deprecate  makeMinMax makeProposal

* Remove makeCumSum makeSelect builders

* Remove makeSpaceToDepth builder

* Remove makeShuffleChannels builder

* Remove makeMatMul builder
2023-11-15 10:41:45 +04:00
Sergey Shlyapnikov
c360de0f07 [GPU] Optimize Condition operation by better integrating its subnetwork primitives with the main network (#21062)
* [GPU] Optimize Condition operation by better integrating its subnetwork primitives with the main network

* Reuse main network's stream in sub-networks
2023-11-15 08:47:36 +04:00
Wang, Yang
859319e2a5 [AUTO] Fix segment fault appeared in the compiled model.get_property() of AUTO (#20777)
* disable CPU_HELP context if it released.

* Enable test case.

* Updated.

* Updated.

* Updated.
2023-11-15 10:20:35 +08:00
Katarzyna Mitrus
afc599563e [Opset13][FP8] Introduce FakeConvert op core (#20930)
* FakeConvert op init

* Update dest types names

* Update op hpp

* Update opset ops number

* Init type_prop tests

* Add attributes tests

* Add op check test

* Update namespace in fc cpp

* Update getters

* Refactor static member

* Make destination_type lower case

* Update type in test

* Move get_valid_types out of class

* Update ops number in opset

* Remove apply_scale attribute

* Additional constructor to make `shift` input optional
2023-11-14 20:22:45 +00:00
Oleksii Khovan
7c027fe19a [GPU] Fix ShapeOf primitive (#20983)
* Determine rank via input layout instead of primitive's member

* Remove unused primitive's member

* fix shape_of() usage - remove unused parameter
2023-11-14 11:09:52 -08:00
Paul Youngsoo Ahn
da2a886477 [GPU] Fix acc issue for LSTMSequence w/ -1 seq_length (#21054)
* [GPU] Fix acc issue for LSTMSequence w/ -1 seq_length
* add output port for multiple outputs of node
* add functional test for lstm_sequence

* Fix CI test failures
2023-11-14 10:47:03 -08:00
River Li
a720b43041 [CPU] CPU plugin API 2.0 migration for IE_THROW and Exception (#21005)
* Replace IE_THROW with OPENVINO_THROW

   1. IE_THROW() is replaced by OPENVINO_THROW
   2. IE_THROW(NOTIMPLEMENT) is replaced by OPENVINO_THROW_NOT_IMPLEMENT
   3. IE_ASSERT is replaced by OPENVINO_ASSERT

* Minor update
2023-11-14 21:50:31 +04:00
Maxim Vafin
369831caef [PT FE] Use system model cache when running torch hub tests locally (#21047)
* Use system model cache when running torch hub tests locally

* Update tests/model_hub_tests/torch_tests/test_torchvision_models.py

* Update tests/model_hub_tests/torch_tests/test_torchvision_models.py
2023-11-14 11:43:06 +01:00
Pawel Raasz
5ef7c02bdf Remove unused function from build (#21057)
if Paddle FE is disabled to avoid build failures `-Werror=unused-function`
2023-11-14 11:27:09 +01:00
Pawel Raasz
c974c9a478 Remove limit for Loop inputs in bindings (#21055) 2023-11-14 11:18:40 +01:00
Vladislav Golubev
b43b9f9d50 [CPU] Weights decompression support for hybrid models (#20973) 2023-11-14 13:27:42 +04:00
Zhang Yi
7cb3bf5610 [CPU] Enable bf16 acdb layout for transpose (#21030) 2023-11-14 10:24:54 +04:00
Piotr Krzemiński
bb3ed2d42e [SPEC] Apply changes from release branch (#20986) 2023-11-14 06:56:06 +01:00
River Li
89494ab412 [CPU] CPU plugin API 2.0 migration for ngraph namespace (#21013)
* [CPU] cleanup misc IE and ngraph

1. InferenceEngine::SizeVector
2. InferenceEngine::parallel_for
3. All ngraph namespace except ngraph::op

* [CPU] clean ngraph opset namespace and header files

* Remove unused header files

1. ngraph/ngraph.hpp
2. ngraph/ops.hpp
3. blob_factory.hpp
3. using namespace ngraph

* Cleanup ie_parallel

* Fix compile error
2023-11-14 00:37:27 +04:00
Alina Kladieva
f0c0bf89e2 Smart CI for docs (#21021)
* Handle Smart CI for docs

* Remove path filters

* Fix quotes

* Fix logic

* Revert unneeded change

* Add md_files_only to components configuration

* Get rid of custom output

* Try to fix condition

* Add manual handling of some docs changes

* Remove helper label
2023-11-14 00:00:51 +04:00
Maksim Kutakov
75acdac5f9 Extend the existing IO binding subgraph tests (#20987) 2023-11-13 15:22:41 +01:00
dependabot[bot]
8b7537a30d Update networkx requirement from <=3.1 to <=3.2.1 in /tools/pot (#20751)
Updates the requirements on [networkx](https://github.com/networkx/networkx) to permit the latest version.
- [Release notes](https://github.com/networkx/networkx/releases)
- [Commits](https://github.com/networkx/networkx/compare/networkx-0.23...networkx-3.2.1)

---
updated-dependencies:
- dependency-name: networkx
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-13 17:44:08 +04:00
dependabot[bot]
03a1ba1f81 Bump pytest-html from 3.2.0 to 4.1.1 in /src/bindings/python (#20948)
Bumps [pytest-html](https://github.com/pytest-dev/pytest-html) from 3.2.0 to 4.1.1.
- [Release notes](https://github.com/pytest-dev/pytest-html/releases)
- [Changelog](https://github.com/pytest-dev/pytest-html/blob/master/docs/changelog.rst)
- [Commits](https://github.com/pytest-dev/pytest-html/compare/v3.2.0...4.1.1)

---
updated-dependencies:
- dependency-name: pytest-html
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-13 17:43:45 +04:00
dependabot[bot]
fd403e552a Bump pytest-html from 3.2.0 to 4.1.1 in /tests (#20949)
Bumps [pytest-html](https://github.com/pytest-dev/pytest-html) from 3.2.0 to 4.1.1.
- [Release notes](https://github.com/pytest-dev/pytest-html/releases)
- [Changelog](https://github.com/pytest-dev/pytest-html/blob/master/docs/changelog.rst)
- [Commits](https://github.com/pytest-dev/pytest-html/compare/v3.2.0...4.1.1)

---
updated-dependencies:
- dependency-name: pytest-html
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-13 17:43:35 +04:00
Roman Kazantsev
75c72157dd [TF Hub] Add yamnet with complex tensors into precommit (#21035)
After fixing ov.Tensor creation for empty numpy array, we are ready to support yamnet

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-11-13 17:42:13 +04:00
Xuejun Zhai
4563f71ffc [Func Test] remove ngraph::helpers::QuantizationGranularity, replaced with ov::test::utils::QuantizationGranularity (#20985)
Signed-off-by: Zhai, Xuejun <xuejun.zhai@intel.com>
Co-authored-by: Chen Peter <peter.chen@intel.com>
2023-11-13 13:29:36 +00:00
River Li
5dd317c733 [CPU] cleanup misc IE and ngraph (#21007)
1. InferenceEngine::SizeVector
2. InferenceEngine::parallel_for
3. All ngraph namespace except ngraph::op
2023-11-13 17:06:59 +04:00
Zlobin Vladimir
f97e7f1c9d setupvars.sh: ignore cd output (#20657)
* `setupvars.sh`: ignore `cd` output

Having `function cd() { builtin cd "$@" && l; }` defined in bash breaks `setupvars.sh`

* Use `builtin cd` to enable `function cd() { builtin cd "$@" && l; }`, remove wrapping `echo $()` because `pwd` already prints
2023-11-13 16:15:30 +04:00
Zlobin Vladimir
0125c89738 Fix --mean_values and --scale_values prohibition to align with C++ (#20910) 2023-11-13 16:15:02 +04:00
hyunback kim
03e48f3c17 [GPU] Fix LCM notebook failure issue for int8 model. (#20944)
Fix to use partial_shape in dynamic case. Not get_dims().

Signed-off-by: hyunback <hyunback.kim@intel.com>
2023-11-13 20:39:02 +09:00
Maciej Smyk
5a04359200 [DOCS] Updating links for master 2023-11-13 12:23:23 +01:00
Zlobin Vladimir
e79e5122f8 benchmark_app: is_file->is_file() (#21016)
Close https://github.com/openvinotoolkit/openvino/issues/21000

Co-authored-by: Andrei Kochin <andrei.kochin@intel.com>
2023-11-13 11:04:14 +00:00
Tomasz Jankowski
70a2736695 [core] Migrate Log operator to new API (#20917)
* Drop ngraph remains

* Use ov::Tensor

instaed of ngraph::HostTensor

* Remove useless code
2023-11-13 11:00:09 +00:00
Roman Kazantsev
7c595f8773 [TF FE] Refactor ops translators to check complex type and speed-up compilation (#21025)
* [TF FE] Refactor AddN translator

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Refactor ArgMin/ArgMax

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Add default check for binary operations

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Refactor Cast translator

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Refactor Const translator

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Refactor Einsum, Elu, and Fill operations

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Refactor MatMul translator

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Refactor Relu6 and Placeholder

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Refactor Round, Square, and unary operation translators

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Update src/frontends/tensorflow_common/src/op/relu_6.cpp

* Update src/frontends/tensorflow_common/src/op/const.cpp

---------

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-11-13 14:29:18 +04:00
Jan Iwaszkiewicz
6650b8750a [PyOV] Support Tensor creation from empty numpy arrays (#20964) 2023-11-13 11:25:58 +01:00
Maksim Kutakov
fb3751717f [Inference] Return state ptr by value (#21011)
* Return state ptr by value

* Fix mock class
2023-11-13 14:24:54 +04:00
Jan Iwaszkiewicz
212a9bc852 [PyOV] Support Constant creation from empty numpy arrays (#20967)
* [PyOV] Support Constant creation from empty numpy arrays

* Return 0 when shape is 0

* Add missing file...
2023-11-13 10:11:12 +00:00
Anastasiia Pnevskaia
5fa53aa715 Input and output order Keras tests. (#20902)
* Input/output order Keras tests.

* Added precommit mark.

* Added xfail.

* Small correction.

* Check input/outputs by names in FW.

* Moved output order tests to Python API group.

* Corrected comments.
2023-11-13 14:01:35 +04:00
Vitaliy Urusovskij
1a5b0b70f9 Remove castOps2Nodes and convert2OutputVector (#21015) 2023-11-13 13:29:53 +04:00
Pawel Raasz
c451a94572 Fix compile warning regarding ABI changes (#20990)
and using std::true_type/false_type
2023-11-13 07:44:54 +01:00
River Li
fef0df6ee1 [CPU] Add deprecation message to extension API (#20970) 2023-11-13 10:37:35 +04:00
Sergey Shlyapnikov
306137f86b [GPU] Make ShapePredictor instance unique for each InferRequest instead of the cldnn::network (#21019) 2023-11-13 08:52:07 +04:00
Paul Youngsoo Ahn
51da30b48d Support LSTMSequence with -1 sequence length (#20935)
* [GPU] Support LSTMSequence w/ -1 seq_length

Co-authored-by:Taylor Yeonbok Lee <taylor.lee@intel.com>
Co-authored-by:Andrew Park <andrew.park@intel.com>

* Fix GetInputInfo to retrieve input pid from LSTMCell

* LSTMCell use ov::PartialShape instead of cldnn::tensor
* implement lstm_elt_inst::calc_output_layouts
* implement lstm_elt_impl::static_canonicalize_shapes

* Add functional tests

* Fix unit test failure

---------

Co-authored-by: Andrew Park <andrew.park@intel.com>
2023-11-11 00:06:08 -08:00
Maxim Vafin
c08e01d6d7 [PT FE] Optimize reverseprop in pytorch frontend (#20989)
* [PT FE] Optimize reverseprop in pytorch frontend

* Add transformation

* Improve readability

---------

Co-authored-by: Alina Kladieva <alina.kladieva@intel.com>
2023-11-10 18:00:04 +01:00
Tatiana Savina
e446dac727 [DOCS] Add content to about ov page (#21010)
* add about ov info

* fix format

* fill ov page
2023-11-10 16:28:09 +01:00
Roman Kazantsev
b64d6be8ba [TF FE] Fix TF1 OD SSD PPN model conversion (#20994)
* [TF FE] Fix TF1 SSD PPN model conversion

It contains a case when one Merge node eliminated different conditional flows.

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Add layer test

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

---------

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-11-10 11:44:28 +00:00
Alina Kladieva
e8d28f7f6d Make conformance wait for Smart CI step (#21014) 2023-11-10 12:10:36 +01:00
Pawel Raasz
641d3ab351 Migrate Constant operator to new API (#20760)
* Migrate Constant operator to new API
- refactor to reduce binary size

* Fix code style

* Fix build issues

* Apply corrections after review:
- Restore mem_size calculation for bit widths >= 8
- Remove element type helpers functions

* Use float cast for floating types except f64
2023-11-10 12:49:08 +04:00
Irina Efode
ebf1874eee [GHA] Check OpImplCheck conformance for template plugin (to make sure that all functions are checked by conformance) (#20712)
* [CONFROMANCE] Fix Template OpImplCheck on Win

* Update windows.yml

* check win

* Update windows.yml

* remove extra changes
2023-11-10 12:39:58 +04:00
Ilya Lavrenov
d4dd169ca3 Added more smart CI conditions (#20999) 2023-11-09 23:40:26 +04:00
Alina Kladieva
51a17ba642 Workaround failing MO unit when Python API unit are skipped (#20997) 2023-11-09 18:07:57 +01:00
Tatiana Savina
8034d1795f change structure (#20988) 2023-11-09 15:03:01 +01:00
Sungeun Kim
b1705e8bd3 [GPU] clean up for extend pad/stride/dilation (#20828)
* clean up for extend pad/stride/dilation
2023-11-09 20:48:34 +09:00
Sungeun Kim
9cc4c25e48 [GPU] print datashape of input for benchmark_app (#20943)
* print datashape of input for benchmark_app
2023-11-09 20:46:50 +09:00
Zhang Yi
09a45bceae [CPU][MLAS]Apply lower bound protection for K stride (#20873) 2023-11-09 15:14:27 +04:00
Aleksandr Voron
3c88a9cf58 [CPU] [ARM] Enable MatMul SLT tests on ARM (#20923) 2023-11-09 15:12:22 +04:00
Alina Kladieva
fa22836cfb Fix no match files change case (#20981) 2023-11-09 12:07:47 +01:00
Ilya Lavrenov
c851d643b3 Fixed smart CI (#20980) 2023-11-09 11:28:32 +01:00
Pawel Raasz
d6852598ce Fix Ubuntu20 build error on relu operator (#20965) 2023-11-09 07:42:06 +00:00
Alina Kladieva
000966660c Smart CI POC (#19825)
* Try using a custom action directly from repo

* Run smart CI under ubuntu-latest

* Set output + add a sample step

* Update linux.yml

* Add components.yml

* Add some conditions

* Just to check if reference to "needs" work in job context

* Update linux.yml

* More example cases

* Dummy change to CPU

* Fix typo

* Fix SAMPLES_AFFECTED variable

* Use more correct dependents key

* Fighting with messy GHA conditions

* No brackets and no double quotes in conditions

* Revert "Dummy change to CPU"

This reverts commit 4eae09e5b5.

* Use refactored action

* Move action implementation to openvino repo

* Extend components.yml config

* Update labeler.yml

* Dummy change to TF FE

* Fix indentation

* Add missing needs

* Add missing records

* Allow missing records for components in validation

* install_openvino_dependencies as a separate step for Python_Unit_Tests

* Improve config validation

* Revert "Dummy change to TF FE"

This reverts commit 01190864d1.

* Dummy change to model hub tests

* Update CPU component config

* Dummy change to Python API

* Dummy change to Python API

* Revert "Dummy change to Python API"

This reverts commit 3fce0bb3fb.

* Dummy change to Python API

* Simplify conditions. Cover "no components changed" case

* Update components.yml

* Update .gitignore

* Revert "Dummy change to Python API"

This reverts commit e57ea9852c.

* Fix dependencies scopes

* Add simple unit tests for smart ci functionality

* Revert "Dummy change to model hub tests"

This reverts commit c3d6837e22.

* Use ghapi module with permissive license

* Cover install_build_dependencies.sh script by labeler

* More labels

* Use ghapi. Apply review comments

* Enable dot files to be matched by labeler

* Warning instead of error in artifacts upload where smart ci is enabled

* Fix master merge

* Fix condition for TF FE common tests

* Fix condition for Pytorch FE tests

* Remove condition for pytorch model tests

* Allow any label as a component

* Refactor tests log handling

* Allow any defined label as a component

* Rearrange config structure. Fill the config with actual data

* Run full scope on changes to non-matching files

* Add missing conditions

---------

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
2023-11-09 11:38:58 +04:00
Tomasz Jankowski
6e073b1165 [core] Migrate SoftSign operator to new API (#20958)
* Align code style

* Use Evaluate in place of switch case

* Use std::transform in place of for loop
2023-11-09 11:10:37 +04:00
Oleg Pipikin
4bde741de4 Refactor StaticShapeLoopLayerTest (#20963) 2023-11-09 11:08:18 +04:00
Vitaliy Urusovskij
bcb38796ce Ngraph helpers/builders cleaning (#20819)
* Delete `getNodeSharedPtr()`

* Remove `makeRoll` ng::builder

* Delete `makeSelect` ng::builder

* Delete `makeDepthToSpace` ng::builder

* Remove `CompareFunctions` and `getConstData` from ng::helpers

* Return `makeSelect` for compatibility with NPU

* Port `QuantizationGranularity`, `MemoryTransformation`

* Restore ng::helpers::QuantGranularity for BWD CMP
2023-11-09 10:51:00 +04:00
Vladimir Paramuzov
8f406067d1 [GPU] Remove binary convolution primitive and all related code (#20889) 2023-11-09 09:54:46 +04:00
Mingyu Kim
319a6584a2 [GPU] Decompose test combination to reduce test time (#20968) 2023-11-09 13:10:08 +09:00
Sergey Lyalin
854158612f Scaled dot product attention (#20492)
* Added experimental ScaledDotProductAttention operation in opset12. Supported in PT FE for aten::scaled_dot_product_attention translation. Decomposed in the common optimizations as functional reference.

* Better ScaledDotProductAttention

- Moved decomposition to the decomposing transformation
- Implemented more ctors for the op
- Renamed is_causal to causal
- Shape/type inference native code instead of using decomposition
- Moved the op from opset12 to opset13
- Added Python wrapper for ScaledDotProductAttention

* Fix test that counts ops in the opsets

* Update src/core/src/op/scaled_dot_product_attention.cpp

Co-authored-by: Katarzyna Mitrus <katarzyna.mitrus@intel.com>

* Update src/core/src/op/scaled_dot_product_attention.cpp

Co-authored-by: Katarzyna Mitrus <katarzyna.mitrus@intel.com>

* Move ScaledDotProductAttentionDecomposition from fusions to decompositions.

* Remove not used legacy shape inference in ScaledDotProductAttention

* Better namespace usage

* Register all nodes in ScaledDotProductDecomposition for correct tracking of nodes and running next mather passes on all new nodes.

* Don't use register_new_node_

* ScaledDotProductAttention specification (with an extra scale argument)

* Code style fix

* Scale input implementation for ScaledDotProductAttention

* Handle attention_mask=0 case in the op spec

* Better description of scale input

* N->M in scale description

* Code style fix, remove debug print.

* Apply suggestions from code review

Co-authored-by: Katarzyna Mitrus <katarzyna.mitrus@intel.com>
Co-authored-by: Mateusz Mikolajczyk <mateusz.mikolajczyk@intel.com>

* Fix for case when is_causal is not passed

* Extended description of ScaledDotProduct op

* Better description in py op wrapper

* Basic shape propagation tests for ScaledDotProductAttention

* Added ScaledDotProductAttention to toc.

* Add op impl check

---------

Co-authored-by: Katarzyna Mitrus <katarzyna.mitrus@intel.com>
Co-authored-by: Mateusz Mikolajczyk <mateusz.mikolajczyk@intel.com>
2023-11-08 20:17:13 +01:00
Alina Kladieva
f627172e5a Add separate label for docs snippets (#20966) 2023-11-08 22:19:35 +04:00
Andrey Kashchikhin
24cd7283e3 make cache space showing optional (#20962) 2023-11-08 17:28:08 +00:00
Mikhail Ryzhov
9616c8f510 corrected timeouts (#20954) 2023-11-08 17:45:53 +01:00
Vladislav Golubev
c2d09b9a15 FuseU4WeightsAndZeroPoint tests: avoid std::vector<std::int8_t> usage (#20918) 2023-11-08 19:54:23 +04:00
Sofya Balandina
25d94bd98b [conformance] Skip empty test cache error (#20924) 2023-11-08 15:50:49 +00:00
Ilya Lavrenov
68e6484ecb Fixed version detection without git (#20951) 2023-11-08 14:30:15 +01:00
Maciej Smyk
fdaa4b5d03 [DOCS] Small fixes in articles for master (#20947)
* Fixes

* Update deployment_intro.md

* Update docs/articles_en/openvino_workflow/deployment_intro.md

Co-authored-by: Sebastian Golebiewski <sebastianx.golebiewski@intel.com>

---------

Co-authored-by: Tatiana Savina <tatiana.savina@intel.com>
Co-authored-by: Sebastian Golebiewski <sebastianx.golebiewski@intel.com>
2023-11-08 13:40:52 +01:00
Oleksii Khovan
d07f272054 [GPU] Fix cum_sum_partial_sum implementation for dimensions >= BLOCK_SIZE (#20855)
- fix cum_sum_partial_sum kernel;
- add unit test and func test for big shapes;
- add test to compare Partial vs Ref performance;
- change kernels' priorities according to performance measurements;
- move common profiling helpers to test_utils.

Ticket: CVS-123590
2023-11-08 11:26:51 +00:00
Oleg Pipikin
588e96bc37 Refactor MemoryLayerTest (#20914)
* Refactor MemoryLayerTest

* Apply comments
2023-11-08 14:43:53 +04:00
Oleg Pipikin
ace986cac0 Refactor GenerateProposalsLayerTest, GridSampleLayerTest (#20772)
* Refactor GenerateProposalsLayerTest

* Refactor GridSampleLayerTest

* Fix

* Apply comments

* Apply comments
2023-11-08 14:06:28 +04:00
Pawel Raasz
b8eea7bf84 [core]Migrate Multiply operator to new API (#20853)
* Migrate Multiply operator to new API

* Add comment explain use of custom multiply

* Update custom multiply comment

Co-authored-by: Tomasz Jankowski <tomasz1.jankowski@intel.com>

---------

Co-authored-by: Tomasz Jankowski <tomasz1.jankowski@intel.com>
2023-11-08 13:53:20 +04:00
Pawel Raasz
6210deba49 [core]Migrate FakeQuantize operator to new API (#20895)
* Migrate FakeQuantize operator to new API

* Minor refactor in FakeQuantize reference
re-use existing functions in `get_inner_stride`
2023-11-08 13:52:21 +04:00
Andrei Gorbachev
87cef53088 [GPU] Refactor (#20938)
* maxmin

* mvn

* normalize_l2 and fix mvn

* prior_box_clustered

* prior_box

* pad

* roi_align

* scatter_update

* select

* shape_of

* shuffle_channels

* space_to_batch

* space_to_depth

* split

* squeeze_unsqueeze

* tile

* transpose

* variadic_split

* scatter_nd_update
2023-11-08 13:42:44 +04:00
Liu
9e7243d67c fix typo (#20906)
Co-authored-by: Michal Lukaszewski <michal.lukaszewski@intel.com>
2023-11-08 13:10:11 +04:00
Ilya Lavrenov
d6cc3d7058 Disable warnings about API 1.0 in GNA, Python API 1.0 (#20933) 2023-11-08 12:45:22 +04:00
Alexander Kozlov
0f260c2ccd [DOC]: Added INT4 weight compression description (#20812)
* Added INT4 information into weight compression doc

* Added GPTQ info. Fixed comments

* Fixed list

* Fixed issues. Updated Gen.AI doc

* Applied comments

* Added additional infor about GPTQ support

* Fixed typos

* Update docs/articles_en/openvino_workflow/gen_ai.md

Co-authored-by: Nico Galoppo <nico.galoppo@intel.com>

* Update docs/articles_en/openvino_workflow/gen_ai.md

Co-authored-by: Nico Galoppo <nico.galoppo@intel.com>

* Update docs/optimization_guide/nncf/code/weight_compression_openvino.py

Co-authored-by: Nico Galoppo <nico.galoppo@intel.com>

* Applied changes

* Update docs/articles_en/openvino_workflow/gen_ai.md

Co-authored-by: Tatiana Savina <tatiana.savina@intel.com>

* Update docs/articles_en/openvino_workflow/gen_ai.md

Co-authored-by: Tatiana Savina <tatiana.savina@intel.com>

* Update docs/articles_en/openvino_workflow/gen_ai.md

Co-authored-by: Tatiana Savina <tatiana.savina@intel.com>

* Update docs/articles_en/openvino_workflow/model_optimization_guide/weight_compression.md

Co-authored-by: Tatiana Savina <tatiana.savina@intel.com>

* Update docs/articles_en/openvino_workflow/model_optimization_guide/weight_compression.md

Co-authored-by: Tatiana Savina <tatiana.savina@intel.com>

* Update docs/articles_en/openvino_workflow/model_optimization_guide/weight_compression.md

Co-authored-by: Tatiana Savina <tatiana.savina@intel.com>

* Update docs/articles_en/openvino_workflow/model_optimization_guide/weight_compression.md

Co-authored-by: Tatiana Savina <tatiana.savina@intel.com>

* Update docs/articles_en/openvino_workflow/model_optimization_guide/weight_compression.md

Co-authored-by: Tatiana Savina <tatiana.savina@intel.com>

* Added table with results

* One more comment

---------

Co-authored-by: Nico Galoppo <nico.galoppo@intel.com>
Co-authored-by: Tatiana Savina <tatiana.savina@intel.com>
2023-11-08 10:17:57 +04:00
Paul Youngsoo Ahn
c42a88a190 Support dynamic tensor_iterator (#20869)
* [GPU] Support dynamic tensoriterator with -1  num_iteration
- remove redundant codes

* [GPU] Refactoring methods for pre_process / post_process for body_network

* Add unit test for dynamic tensoriterator wo trip_count_id

* Follow-up code review
* Set inner network in loading of model cache
* Fix legacy loop unit tests
2023-11-07 15:11:08 -08:00
Roman Kazantsev
c6ca7865fb [TF FE] Fix conversion of TF1 OD models out-of-the-box (#20916)
* [TF FE] Fix conversion of TF1 OD models out-of-the-box

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Add test While with nested If operation

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Update tests/layer_tests/tensorflow_tests/test_tf_While.py

---------

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-11-07 17:44:09 +00:00
Sebastian Golebiewski
ac1fb7b955 Fixing OS list in System Requirements for YUM (#20934) 2023-11-07 17:18:18 +01:00
River Li
a0849edca1 [CPU] migrate cpu plugin api 2.0 (#18124)
* [CPU] CPU plugin migrates to plugin API 2.0

* Fix legacy config/metric issue

* Fix some issue of ov_cpu_func_tests

1. set_tensors_impl segment fault
2. ov::loaded_from_cache unsupported issue

* Resolve some comments

1. ov::loaded_from_cache issue
2. throw_if_cancelled issue
3. import_model issue
4. set_tensor_impl issue
5. batched_inference issue

* Fix dynamic shape inference issue

* Fix build error

* keep original model info in infer_request

* Fix minor error

* cache internal tensors for input/output precision change

* Disable import model test cases with precision changes

* fix precision issue

* Fix issue for import model

* Fix InferRequestCancellationTests exception issue

* Skip InferRequestIOBBlobTest.*secondCallGetInputDoNotReAllocateData due to new plugin api have different behavior

* Fix graph name issue

* Fix ROI issues

* Fix Transpose shape issue

* Skip vie::Version test due to change to ov::Version

* Solve input port name changes issue

* Solve preprocess layout issue

* Fix minor issue

* tidy up code

* Fix conflict after rebase

* Fix Windows build warning

* Add aux tensors for precision change issue

* Fix import/export model issue

* WA single layer name changed by preprocess

* Revert "WA single layer name changed by preprocess"

This reverts commit bc8fcdd43c.

* Skip some legacy tests due to plugin api 2.0 is enabled

1. skip some python legacy tests for plugin api 2.0 some different behaviors
2. skip some smoke tests due to output port name was changed

* Fix 2 build warnings

* Skip some AUTO plugin tests

* Fix property issue caused by AUTO plugin

* Skip PSROIPooling issues

* Follow header files reference policy

* Split out transformation fixing for nop_elimination

* Fix AUTO plugin mismatch issue for get_tensor function

* Fix aux tensor shape issue

* Fix tensor shape issue

* WA python sync inference sample's segmentfault issue

* Fix reshape issue for dynamic inference

* Fixed incorrect tensor name in e2e test

Fixe issue: e2e ONNX_Customized_Cascade_Rcnn_api_2_True_batch_1_device_CPU_precision_FP325den8cnk

* Fix python segmentfault issue of plugin api 2.0

* Fix python segmentfault issue of plugin api 2.0

* Revert "Fix python segmentfault issue of plugin api 2.0"

This reverts commit 6f502e5d86.

* Fix onnx_duplicated_output_name due to empty tensor

Co-authored-by: Bell, Song <bell.song@intel.com>

* Remove redundant code

* Remove python segment fault WA

* Keep rt_info to fix test failure in case of legacy public api

* Fix output port names missing issue

* Adress some reviewers' comments

* Restore OnnxBackendNodeModelTest::test_maxpool_with_argmax_2d_precomputed_pads_cpu after fixing has been merged

* Resolve tensor sharing issue when there are same name output port name

In some case, model has 2 or more same name input/output ports, they aslo have the same
precision and partial_shape. Compiled_model will share the same ov::Descriptor::Tensor pointer
and ov::Tensor between multiple such ports.
Considered solving python segment fault issue to create seperated input/output ports, which also
need handle such tensor shared case, this patch will do it.

* Resolve tensor sharing issue when there are same name output port name

In some case, model has 2 or more same name input/output ports, they aslo have the same
precision and partial_shape. Compiled_model will share the same ov::Descriptor::Tensor pointer
and ov::Tensor between multiple such ports.
Considered solving python segment fault issue to create seperated input/output ports, which also
need handle such tensor shared case, this patch will do it.

* Better method to find shrared tensor desc

* rename with snake_case style

* Remove ngraph header files

* Keep external_ptr naming

* Add OPENVINO_SUPPRESS_DEPRECATED for some legacy code

* Use port's tensor_ptr to replace creating new tensor_ptr

* Resolve some reviewer comments

* Implement ov::IInferRequestInternalWrapper::GetPreProcess to recover python GetPrepProcess tests

* Remove unnecessary header files reference

* Assert the risk of precision change and reorder at the same time

* Modify legacy python test to fit plugin api 2.0 behavior

* Recover smoke_Transpose(2|4|5|6)D/TransposeLayerTest.CompareWithRefs due to fixing is merged

* Fix typo issue

* Address reviewer's comments

* Disable precision coversion

* Fix error when CpuBlockedMemoryDesc

* Remove precision mismatch WA

* WA precision issue for query_model

* Solve precision mismatch between compiled model and graph

* Fixe failure of query_model

* Rebase to new plugin api update

* Recover the test cases of precision mismatch

* Try to fix name changing for graph model

* Remove tets code

* Remove fp64

* Rebase to new plugin api update

* Update for some failure cases

* Fix bert_benchmark failure issue

* Avoid segment fault in arm acl

Legacy public api + cpu plugin api will add convert op by preprocess by default for unsupported precision,
but ACLConvertExecutor cannot support dimension > 6, so this test will be segment fault due to dimension > 6

smoke_TestNumpyBroadcastNgraphEvaluate/BroadcastLayerTest.CompareWithRefs/targetShape=(1.2.3.4.5.6.7.8.9.10)_axesMapping=()_mode=numpy_inShape=(1.2.1.4.1.6.1.8.1.10)_inNPrec=I8_trgDev=CPU
smoke_TestNumpyBroadcastNgraphEvaluate/BroadcastLayerTest.CompareWithRefs/targetShape=(1.2.3.4.5.6.7.8.9.10)_axesMapping=()_mode=numpy_inShape=(1.2.1.4.1.6.1.8.1.10)_inNPrec=U8_trgDev=CPU

* Remove precision change from preprocess to avoid ACL unsupport convert dim > 6

* ACLConvertExecutor cannot support dimension > 6, don't let preprocess to add Convert

* Revert "ACLConvertExecutor cannot support dimension > 6, don't let preprocess to add Convert"

This reverts commit fd7a8b35af.

* Revert "Remove precision change from preprocess to avoid ACL unsupport convert dim > 6"

This reverts commit 3c2d9a5f17.

* Debug

* Debug incorrect precision checking issue

* Debug Eltwise FP64 unsupported issue

* Add logs for precision

* debug log

* Update for new dependent PRs merged

* Fix failure caused by preprocess

Fix below failures due to cannot find ops by name
     smoke_LPT/ReduceMaxTransformation.CompareWithRefImpl/f32_[1,3,10,10]_CPU_f32__256*

* Fix build error

* Fix failure caused by missing code during rebase

* Add debug

* Fix precision unsupport issue

* U16/I16/U64 precision support

* Resolve the issue of f64 reorder

Fix below issue:
Cannot create reorder primitive: unsupported reorder case

* Fix convert multiple child edge issue

* Solve ROI tensor failure issues

* Temporarily disable num_nodes comparison

* Only change convert precision for fp64

* Put convert precision change before reorder to avoid confusion

* Add debug log for transformation

* Fix rebase confilict

* Fix clang issue

* Temporarily disable test_infer_mixed_values python test of bf16

* Solve issue of smoke_ConvertCPULayerTest_BOOL_Dynamic_inputPRC=BF16 choose FP32 primType rather than BP16 primType

* Fix issue of pytorch_tests/test_outer.py

There are 2 output ports, but with the same port name, they should share the same tensor.

* Fix arm cannot find Eltwise executor issue

smoke_SetBlobCPU/SetBlobTest.CompareWithRefs/Type=INPUT_Device=CPU_PrecisionInNet=FP16_PrecisionInNgraph=BOOL
will report below error:
	 [ GENERAL_ERROR ] Supported Eltwise executor is not found
It need change convert precision to avoid such problem.

* Fix memory overwritten issue

* Temporarily skip arm fp16 SetBlobTest

* Fix compile error after rebase

* Restore smoke_IsOp test due to fixing pr merged

* Fix float to bf16 issue in avx2 isa

* solve onnx test xfail issue

* Skip test cases that ARM Eltwise executor FP16 is not supported

smoke_SetBlobCPU/SetBlobTest.CompareWithRefs/Type=INPUT_Device=CPU_PrecisionInNet=FP16_PrecisionInNgraph=BOOL
smoke_SetBlobCPU/SetBlobTest.CompareWithRefs/Type=BOTH_Device=CPU_PrecisionInNet=FP16_PrecisionInNgraph=BOOL

      [ GENERAL_ERROR ] Supported Eltwise executor is not found

* [CPU] improve reorder to support any precision

* Implement ReorderExecutor

* Fix builld error

* Not cache executor due to its primitive has been cached

* Keep convert one time at most

At most insert one convert if needed, if still cannot do reorder it will throw exception rather than insert the second convert
For example, below reorder will not be supported:
   FP64<->I64/U64/U32
   U32<->I64/U64
   U32<->I16/U16
   FP64<->FP64
   BIN<->BIN

* Only do conversion if layout is same

* update for only convert case

* Update for reviewer comments

* update for failure cases

* Address reviewer comments

* Update rebase issue

* minor update

* Solve unsupported precision issue in tranfromation rather than init_edge

* Remove unnecessary convert in init_edge

* Minor changes

* Update Reorder::reorderData

* Solve issue if only coversion without reorder

* Address reviewer comments

* Address reviewer comments

* Keep exception for unsuported precision

* update

* Revert reorder executor implement

* Solve float->bool issue on transformation pipeline

* Solve I64 is not supported issues

* Solve reviewer's comments

* Fixed dynamic top_k node issue

* Skip nhwc and nChw16c test cases for ConvertLayer

* Update for reviewers' comments

* Fix some failures

* Update for several failure cases

* Update for apiConformanceTests failures

* Fix incorrect node name after import model

* update

* update comments

* Solve issue of smoke_MatMul_NoTranspose and smoke_MatMul_BothTranspose

* Fixed AlignMatMulInputRanks scalar issue

* Address reviewers' comments, remove redundant path in graph.cpp

* Remove test_div_uint8_cpu from xfail_issue_58676

* Solve invalid number of nodes for smoke_Snippets_BroadcastSelect

* ConstantResultSubgraphTest of u16/i16/u32/i64/u64

* restore smoke_SetBlobCPU BOOL tests for arm

* [CPU] Fix ARM precision issue

ARM64 ACL prefers fp16 than fp32, API 2.0 requires input/output precision not changes,
then fp32 input will trigger convert node is added to convert fp32 to fp16.

* Solve some ARM64 failures

* Fix arm64 InferRequestVariableStateTest tests out of memory issue

ARM64 will force fp16 precision, which cause states memory can be fp16, so memcpy to state_memory
cannot use float * element_size, else it will be out of memory bound.

* Skip 2 arm64 tests caused by forcing fp16 precision

* Revert "Fix arm64 InferRequestVariableStateTest tests out of memory issue"

This reverts commit 3e12bd48c2.

* Fix python test_get_profiling_info failure issue

---------

Co-authored-by: Bell, Song <bell.song@intel.com>
Co-authored-by: Chen Peter <peter.chen@intel.com>
2023-11-07 15:25:05 +01:00
Sebastian Golebiewski
3f7989a817 [DOCS] Fixing link in Get Started article (#20881)
* Updating Get Started section

Addressing JIRA ticket: 124289

* Update get_started.md
2023-11-07 14:37:24 +01:00
Vitaliy Urusovskij
e3d7dffa83 Remove legacy API from FEs (except ONNX) (#20849)
* Remove `ngraph` from PT FE and FE tests utils

* Remove `ngraph` from Paddle FE

* Remove `InferenceEngine` from some ONNX FE test

* Port `generate_embedding.py` to API2.0

* CLangFormat

* Fix comments
2023-11-07 14:01:39 +01:00
Pawel Raasz
95aef4bf51 [core]Migrate Exp operator to new API (#20893)
* Migrate Exp operator to new API

* Add missing includes
2023-11-07 13:43:13 +01:00
Pawel Raasz
e82283cf85 [core]Migrate Mish operator to new API (#20892)
* Migrate Mish operator to new API

* Remove `visit_attributes` is same as base class

* Refactor Mish reference implementation

* Add cast as function is generic
-mish calculation is floating-point but return type can be integral.
2023-11-07 13:05:39 +01:00
Tomasz Jankowski
e8b6e17429 [core] Migrate Softplus operator to new API (#20900)
* Drop ngraph remains

* Use ov::Tensor

instaed of ngraph::HostTensor
2023-11-07 12:19:34 +01:00
Alina Kladieva
f17f17acc7 Use custom labeler to label changes not matching any pattern (#20888)
Needed for Smart CI (https://github.com/openvinotoolkit/openvino/pull/19825)
2023-11-07 12:16:32 +01:00
Pawel Raasz
368e6bfb8a Fix constant folding in MulMulMulFusion (#20803)
* Fix constant folding in MulMulMulFusion
by add f64 precision in Multiply to perform evaluate for const folding

* Do not transform if input has not supported type
2023-11-07 11:57:29 +01:00
Anastasia Kuporosova
4a0098b26a [PyOV] ngraph linter check update (#20870)
* [PyOV] ngraph linter check update

* Update src/bindings/python/requirements_test.txt

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>

---------

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2023-11-07 10:42:46 +00:00
Aleksandr Voron
681331d3d7 [CPU] Increase RandomUniform test mean and variance thresholds 2023-11-07 14:37:37 +04:00
Aleksandr Voron
c3948ca799 [nGraph Transformations] NMS convert precisions - change sequence of checks (#20795) 2023-11-07 14:34:12 +04:00
Pawel Raasz
cb53ee5db7 [core]Migrate ReLU operator to new API (#20874)
* Migrate ReLU operator to new API

* Optimize ReLU reference implementation

* Correct define const value in ReLU
2023-11-07 11:29:43 +01:00
Ilya Lavrenov
c0381ab08d Updated labeler config (#20913) 2023-11-07 14:05:03 +04:00
Maxim Vafin
cdd342ea49 [PT FE] Add ALIKED to model tests (#20899)
* Add ALIKED to model tests

* Update tests/model_hub_tests/torch_tests/test_aliked.py

* Update tests/model_hub_tests/torch_tests/test_aliked.py
2023-11-07 09:34:26 +01:00
Pawel Raasz
8f30470199 [core]Migrate MatMul operator to new API (#20857)
* Migrate MatMul operator to new API

* Correct get shapes references
2023-11-07 09:12:37 +01:00
Maxim Vafin
e976e7b90c [PT FE] Add tests for Speech-Transformer (#20847)
* Add tests for Speech-Transformer

* Update tests/model_hub_tests/torch_tests/test_speech-transformer.py

* Update tests/model_hub_tests/torch_tests/test_speech-transformer.py
2023-11-07 08:32:22 +01:00
Pawel Raasz
dcdf6750a7 [core]Migrate Sign operator to new API (#20875)
* Migrate Sign operator to new API

* Optimize Sign reference implementation

* Fix code style
2023-11-07 08:31:04 +01:00
Tomasz Jankowski
a304f03852 [core] Migrate Softmax operator to new API (#20894)
* Drop ngraph remains

* Use ov::Tensor

instaed of ngraph::HostTensor
2023-11-07 08:26:58 +01:00
Roman Kazantsev
494a9cf9a9 [TF FE] Refine tests for complex tensors support (#20905)
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-11-07 10:29:45 +04:00
Tomasz Jankowski
5cd9659033 [core] Migrate HSwish operator to new API (#20854)
* Drop ngraph remains

* Use ov::Tensor

instaed of ngraph::HostTensor
2023-11-06 20:56:52 +01:00
Anastasiia Pnevskaia
64c21fd6f9 [MO] Fixed MO fallback unit test. (#20868)
* Fixed MO unit test to import paddle conditionally.

* Replace generate with pytest.mark.parametrize.
2023-11-06 22:13:53 +04:00
Karol Blaszczak
3036a3d249 [DOCS] improving the "conversion" section v2 (#20887)
adjustments to conversion and workflow
2023-11-06 18:17:44 +01:00
Roman Kazantsev
d0eb27bd3b [TF FE] Support Complex Tensors (#20860)
* [TF FE] Support complex tensors

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Align output type for Real and Imag operations

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Update decoding complex types

* Add support for ComplexAbs, FFT and IFFT operations

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Correct axes based on a number of inner-most dimensions

* Add layer tests

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Update supported ops documentation

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Add a comment for ComplexTypeMark

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

---------

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-11-06 16:57:05 +04:00
Pawel Raasz
1083b3b58c [core]Migrate Erf operator to new API (#20867)
* Migrate Erf operator to new API

* Remove `visit_attributes`  is same as base class

* Optimize reference implementation for size
2023-11-06 13:46:03 +01:00
Mikhail Ryzhov
28279013af aligned lin build timeouts (#20885) 2023-11-06 14:07:24 +04:00
Sebastian Golebiewski
a554611644 Updating notebooks (#20865) 2023-11-06 10:08:58 +01:00
Pawel Raasz
7d74dac3ee [core]Migrate GridSample operator to new API (#20852)
* MIgrate GridSample to new API

* Refactor GridSample to reduce binary size
- use function pointer instead std::function (simpler less code size)
- use RoundingGuard instead manual set/restore rounding mode
- move interpolate selection outside main data processing loop
2023-11-06 06:31:02 +01:00
Pawel Raasz
ae343a0178 [core]Migrate FloorMod operator to new API (#20829)
* Migrate FloorMod operator to new API

* Remove `visit_attributes` is same as base class

* Restore FloorMod calculation for signed values
floating-point and integral
2023-11-06 06:26:47 +01:00
Vitaliy Urusovskij
47cdbb9df5 Template plugin folder to API2.0 (#20862)
* Remove unused IE namespace from template plugin

* Remove unused `ngraph::HostTensor`

* Template `ConvolutionLayerTest` to API2.0

* Template `ReshapeLayerTest` to API2.0

* Template `SplitLayerTest` to API2.0

* Remove extra `InferenceEngine::PluginConfigParams`

* CLangFormat
2023-11-04 12:36:16 +04:00
Andrey Kashchikhin
fda1fd9dc1 [CI] [GHA] Add missing setup-python action checkout; use custom action across all pipelines (#20863)
* use unified setup-python actions across all pipelines

* rm triggers
2023-11-04 11:58:01 +04:00
Anastasiia Pnevskaia
cc389c23ca Removed logic of building example_input by shape. (#20859) 2023-11-03 20:45:34 +04:00
Alina Kladieva
86c638a595 Temporarily restrict flake8_builtins version (#20864) 2023-11-03 16:59:47 +01:00
Tomasz Jankowski
09010657e2 [core] Migrate Gelu operator to new API (#20833)
* Drop HostTensor

* Remove useless overwrite method
2023-11-03 12:16:51 +00:00
Sergey Lyalin
1960536e8e Fix GPTQ model conversion after two breaking changes (#20823)
* Fix GPTQ model conversion after two breaking changes

* Code style fix

* Remove redundant check
2023-11-03 13:47:51 +04:00
Tomasz Jankowski
3386b85c08 [core] Migrate Divide operator to new API (#20766)
* Use ov:: namespace

* Drop HostTensor

* Use ov::util::make_tensor_of_max_value

instead of ngraph::get_constant_max_of_type

* Use ov::util::make_tensor_of_min_value instead of

ngraph::get_constant_min_of_type

* Refactor get_constant_min_of_type
2023-11-03 10:35:43 +01:00
Anatoliy Talamanov
f890bf7930 Extend throughput benchmark with device CLI parameter (#20816)
* Extend throughput benchmark CLI parameters

* Added device name as the second CLI parameter with default CPU value

* Update samples/cpp/benchmark/throughput_benchmark/main.cpp

Co-authored-by: Zlobin Vladimir <vladimir.zlobin@intel.com>

* Fix comments to review

* Modified python version
* Modified documentation

* Fix comments to review

* Fixed the comment
* Modified python doc
* Fixed device name handling in python version

* Update main.cpp

* Update throughput_benchmark.py

---------

Co-authored-by: Zlobin Vladimir <vladimir.zlobin@intel.com>
2023-11-03 09:57:04 +01:00
Anatoliy Talamanov
c20d52dc4f Extend sync benchmark CLI parameters (#20844) 2023-11-03 09:51:22 +01:00
Tomasz Jankowski
0effa37811 [core] Migrate HSigmoid operator to new API (#20836)
* Drop ngraph remains

* Use ov::Tensor

instaed of ngraph::HostTensor
2023-11-03 09:10:32 +01:00
Vitaliy Urusovskij
0955faef93 Remove use of convertOps2Nodes() & convert2OutVect() (#20837) 2023-11-03 11:00:33 +04:00
Vitaliy Urusovskij
caa81a0b3c Remove use of legacy ng/runtime/shared_buffer.hpp (#20840) 2023-11-03 09:09:49 +04:00
Andrei Gorbachev
ff7b49c14d add a few tests (#20824) 2023-11-02 16:40:47 +00:00
Pawel Raasz
8e4c4c3510 [core]Drop host tensor support in TensorAccessor (#20831)
* Remove functions`get_tensor_data_as for HostTensor

* Remove HostTensor support in TA

* Update doxy comments

Co-authored-by: Tomasz Jankowski <tomasz1.jankowski@intel.com>

---------

Co-authored-by: Tomasz Jankowski <tomasz1.jankowski@intel.com>
2023-11-02 16:15:52 +00:00
Aleksandr Voron
e8f21eefae [CPU] Add FP16 support to MatrixNms (#20804) 2023-11-02 14:40:32 +00:00
Anastasiia Pnevskaia
3f5f923a70 [DOC] Update list of TF formats imported from memory. (#20834)
* Update list of TF formats.

* Minor correction.

* Added comment.

* Update docs/articles_en/openvino_workflow/model_preparation/Convert_Model_From_TensorFlow.md

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Model changed.

* Update docs/articles_en/openvino_workflow/model_preparation/Convert_Model_From_TensorFlow.md

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>

---------

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2023-11-02 17:31:08 +04:00
Pawel Raasz
f8cd53bb77 [core]Migrate Floor operator to new API (#20830)
* Migrate Floor operator to new API

* Remove `visit_attributes` is same as base class
2023-11-02 12:35:05 +00:00
Anastasiia Pnevskaia
4e70b3b33b Remove WA with double loading of FE. (#20794) 2023-11-02 12:57:24 +04:00
Roman Kazantsev
4a6e6e64c5 [TF FE] Fix conversion of FILM of keras.Model format (#20825)
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-11-02 12:46:57 +04:00
Gorokhov Dmitriy
3ff85ae70a [CPU] Fixed port mismatch in Eltwise fusion graph optimization (#20782) 2023-11-02 11:33:37 +04:00
Vladimir Paramuzov
2afb64b9ea [GPU] Refactor KV cache test (#20802) 2023-11-02 09:54:19 +04:00
Zhang Yi
88c3171742 [CPU] Fix avx2 gather of bfloat16 (#20683) 2023-11-02 09:46:03 +04:00
Andrey Kashchikhin
eea49f3c9e [CI] [GHA] Remove full cloning of the OV repository in the Python unittests job in the Win and Mac workflows (#20810)
* rm full cloning of the OV repo in win and mac workflows

* skip tests on mac

* increase timeout for win C++ tests; skip more mac tests

* rm triggers
2023-11-01 22:20:22 +04:00
Mateusz Tabaka
4084e9acc0 Handle Reshape's special zero in SimplifySecondInputOfReshape (#20785)
* Handle Reshape's special zero in SimplifySecondInputOfReshape

SimplifySecondInputOfReshape detects ShapeOf->Gather->Concat
subgraphs on Reshape's second input and replaces ShapeOf->Gather
with a Constant with zero(s). Currently it works only with Reshapes
that have special_zero set to true, but it can work for Reshapes
with special_zero == false if non-Gather inputs to Concat are Constants
and don't contain any zero.

Ticket: CVS-123434

* fix no default output
2023-11-01 18:02:36 +04:00
Nikolay Shchegolev
e6ff5edc3d [CPU] Empty tensor used with a custom op leads to CPU plugin exception. (#19733) 2023-11-01 15:42:25 +04:00
Andrey Kashchikhin
03f23ae57a [CI] [GHA] Fix openvino.test_utils imports for Mac and Win Python unittests (#20786)
* add platform-agnostic setup python action

* use specific version

* rm debug message, checkout action

* correct path

* add checkout of the action, correct paths

* correct path; enclose into brackets

* transfer linux pipelines to local setup-python action

* transfer pipelines

* use newer version

* account for fedora, add missing cache path

* correct name

* use 3.9 for fedora

* rm python install from fedora

* mv fetch and setup together, set pip_cache_dir

* correct order

* rm triggers

* add missing pythonpaths

* correct path

* add one more pythonpath

* add paths to ov package libs

* Revert "add paths to ov package libs"

This reverts commit a775881f3e.
2023-11-01 12:07:40 +04:00
Surya Siddharth Pemmaraju
bb0e4f8ecf Fixed issue with cat in fx backend (#20744)
* Added fix for cat in torchfx

* Added batch_norm_legit_no_training op

* Fixed coding style

* Fixed clang format

* Addressed PR comments
2023-11-01 08:36:19 +01:00
Roman Kazantsev
26c9c41b8e Revert "[TF FE] Switch off TF1 While support totally (#20774)" (#20800)
This reverts commit 38b6092120.
2023-10-31 22:53:35 +04:00
Andrey Kashchikhin
703e911321 [CI] [GHA] Increase job timeouts (#20797)
* increase job timouts

* increase further
2023-10-31 16:46:52 +00:00
Irina Efode
dd10a520e3 [DO NOT REVIEW OR MERGE] LLM in SubgraphsDumper (#20756) 2023-10-31 16:57:41 +01:00
Sofya Balandina
65f6950f56 [apiConformance][TEMPLATE] Add too get_profiling_info info about ops (#20697) 2023-10-31 16:14:36 +01:00
Irina Efode
8eee1b52ed [IE TESTS] ImportExport reporting + extension of base class (#20765)
* [IE TESTS] ImportExport reporting + extension of base class

* reuse dynamic check
2023-10-31 19:00:36 +04:00
Roman Kazantsev
8d6f56dd12 [TF FE] Fix translators for multiple output operations (#20787)
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-10-31 13:22:09 +00:00
Mateusz Tabaka
48c9598892 Handle Reshape in SplitSqueezeConcatFusion (#20345)
* Handle Reshape in SplitSqueezeConcatFusion

Ticket: CVS-122455

* move check for squeeze/reshape

* add some comments

* review comments

* add use_shapes flag to SplitSqueezeConcatFusion
2023-10-31 17:05:21 +04:00
4355 changed files with 115230 additions and 85213 deletions

View File

@@ -4,7 +4,7 @@ resources:
type: github
endpoint: openvinotoolkit
name: openvinotoolkit/openvino_contrib
ref: releases/2023/2
ref: master
variables:
- group: github

View File

@@ -32,7 +32,7 @@ resources:
type: github
endpoint: openvinotoolkit
name: openvinotoolkit/openvino_contrib
ref: releases/2023/2
ref: master
jobs:
- job: Win

View File

@@ -35,7 +35,7 @@ resources:
type: github
endpoint: openvinotoolkit
name: openvinotoolkit/testdata
ref: releases/2023/2
ref: master
variables:
- group: github

View File

@@ -41,10 +41,7 @@ body:
Any materials related to the task, such as operator specifications,
discussions, guides.
value: |
- [What is OpenVINO?](https://github.com/openvinotoolkit/openvino#what-is-openvino-toolkit)
- [Contribution guide](https://github.com/openvinotoolkit/openvino/blob/master/CONTRIBUTING.md)
- [Blog post on contributing to OpenVINO](https://github.com/openvinotoolkit/openvino/blob/master/CONTRIBUTING.md)
- [User documentation](https://docs.openvino.ai/)
- [Contribution guide - start here!](https://github.com/openvinotoolkit/openvino/blob/master/CONTRIBUTING.md)
validations:
required: true

67
.github/actions/setup_python/action.yml vendored Normal file
View File

@@ -0,0 +1,67 @@
name: 'Setup Python and pip cache'
description: 'Setups Python with the provided version and sets up the pip cache'
inputs:
version:
description: 'Python version to install'
required: true
pip-cache-path:
description: 'Path on share where the pip cache is stored'
required: false
should-setup-pip-paths:
description: 'If the action should setup `PIP_CACHE_DIR` & `PIP_INSTALL_PATH` env variables'
required: false
default: 'false'
self-hosted-runner:
description: 'If the runner is self-hosted'
required: false
default: 'true'
show-cache-info:
description: 'If the action should show the share space occupied by cache'
required: false
default: 'false'
runs:
using: 'composite'
steps:
- if: ${{ runner.os == 'Linux' && inputs.self-hosted-runner == 'true' }}
name: Install 'actions/setup-python@v4' dependencies
shell: bash
run: apt-get update && apt-get install -y ca-certificates software-properties-common
- if: ${{ runner.os == 'Linux' && runner.arch == 'ARM64' }}
name: Setup sudo and python3
shell: bash
run: apt-get update && apt-get install -y sudo python3 # Needed for the deadsnakes action
- if: ${{ runner.os == 'Linux' && runner.arch == 'ARM64' }}
name: Setup Python ${{ inputs.version }}
uses: akashchi/deadsnakes-action@f01521a69eee61eaca3a34440bea3ce838317846
with:
python-version: ${{ inputs.version }}
- if: ${{ runner.os == 'macOS' || runner.os == 'Windows' || (runner.os == 'Linux' && runner.arch != 'ARM64') }}
name: Setup Python ${{ inputs.version }}
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.version }}
env:
PIP_CACHE_DIR: ${{ inputs.self-hosted-runner == 'true' && inputs.pip-cache-path || '' }}
- if: ${{ inputs.should-setup-pip-paths == 'true' }}
name: Setup pip variables (cache and install path)
shell: bash
run: |
PIP_VER=$(python3 -c "import pip; print(pip.__version__)")
echo "Using pip version: ${PIP_VER}"
echo "PIP_CACHE_DIR=${{ inputs.pip-cache-path }}/${PIP_VER}" >> $GITHUB_ENV
echo "PIP_INSTALL_PATH=$(python3 -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])')" >> $GITHUB_ENV
- if: ${{ inputs.show-cache-info == 'true' }}
name: Get pip cache info
shell: bash
run: |
echo "Cache size: "
du -h -d2 ${{ env.PIP_CACHE_DIR }}
echo "Cache info: "
python3 -m pip cache info
continue-on-error: true

99
.github/actions/smart-ci/action.yml vendored Normal file
View File

@@ -0,0 +1,99 @@
name: "Smart CI action"
description: "Returns product components affected by PR or commit"
inputs:
repository:
description: "GitHub repository"
required: true
repo_token:
description: "Token for access to GitHub repository"
required: true
pr:
description: "GitHub PR number. If not set - commit is used"
required: false
commit_sha:
description: "GitHub commit hash. Used if no PR number is set"
required: false
component_pattern:
description: "Pattern to extract component name from PR label. If not set, any label is considered a component name"
required: false
labeler_check_name:
description: "Name of the labeler check"
required: false
default: "triage"
components_config:
description: "Path to components configuration file"
required: false
default: ".github/components.yml"
components_config_schema:
description: "Path to the schema file for components configuration"
required: false
default: ".github/actions/smart-ci/components_schema.yml"
labeler_config:
description: "Path to labeler configuration file"
required: false
default: ".github/labeler.yml"
skip_when_only_listed_labels_set:
description: "Comma-separated list of labels. If PR has only these labels set,
return indicator that CI can be skipped"
required: false
skip_when_only_listed_files_changed:
description: "Comma-separated list of patterns (fnmatch-style). If PR has only matching files changed,
return indicator that CI can be skipped"
required: false
outputs:
all_components:
description: "All components listed in configuration"
value: ${{ steps.smart_ci.outputs.all_components }}
affected_components:
description: "Affected components to run validation for and their validation scope"
value: ${{ steps.smart_ci.outputs.affected_components }}
skip_workflow:
description: "Whether the workflow should be run with Smart CI rules applied or skipped completely"
value: ${{ steps.smart_ci.outputs.skip_workflow }}
runs:
using: "composite"
steps:
- name: Wait for labeler to finish
uses: lewagon/wait-on-check-action@v1.3.1
if: ${{ github.event_name == 'pull_request' }}
with:
ref: ${{ github.event.pull_request.head.sha }}
check-name: ${{ inputs.labeler_check_name }}
repo-token: ${{ inputs.repo_token }}
wait-interval: 10
- name: checkout components file
uses: actions/checkout@v4
with:
sparse-checkout: .github/components.yml
sparse-checkout-cone-mode: false
- name: Install Python dependencies
uses: py-actions/py-dependency-install@v4
with:
path: "${{ github.action_path }}/requirements.txt"
update-setuptools: "false"
update-wheel: "false"
- name: Test functionality
run: |
python ${{ github.action_path }}/smart_ci_test.py
shell: bash
- name: Smart CI
id: smart_ci
run: |
python ${{ github.action_path }}/smart_ci.py \
$([[ -n "${{ inputs.pr }}" ]] && echo '--pr ${{ inputs.pr }}' || echo '-s ${{ inputs.commit_sha }}') \
-r ${{ inputs.repository }} \
-p "${{ inputs.component_pattern }}" \
-c "${{ inputs.components_config }}" \
-m "${{ inputs.components_config_schema }}" \
-l "${{ inputs.labeler_config }}" \
--skip-when-only-listed-labels-set "${{ inputs.skip_when_only_listed_labels_set }}" \
--skip-when-only-listed-files-changed "${{ inputs.skip_when_only_listed_files_changed }}"
shell: bash
env:
GITHUB_TOKEN: ${{ inputs.repo_token }}

View File

@@ -0,0 +1,41 @@
# YAML schema for Smart CI configuration file components.yml (see https://json-schema.org)
definitions:
component_name:
type: string
pattern: "^[a-zA-Z_][a-zA-Z0-9_]*$"
component_data:
type: object # dict
additionalProperties: false
properties:
cmake:
type: array
uniqueItems: true
items:
'$ref': '#/definitions/component_name'
revalidate:
oneOf:
- type: array
uniqueItems: true
items:
'$ref': '#/definitions/component_name'
- type: string
enum: ['all']
build:
oneOf:
- type: array
uniqueItems: true
items:
'$ref': '#/definitions/component_name'
- type: string
enum: ['all']
propertyNames: # Validates component names
'$ref': '#/definitions/component_name'
patternProperties:
".*": # Component (name validated via propertyNames)
'$ref': '#/definitions/component_data'
additionalProperties: false

View File

@@ -0,0 +1,3 @@
ghapi~=1.0.4
pyyaml~=6.0.1
jsonschema~=4.19.1

225
.github/actions/smart-ci/smart_ci.py vendored Normal file
View File

@@ -0,0 +1,225 @@
import os
import re
import argparse
import yaml
import json
import jsonschema
import logging
from pathlib import Path
from ghapi.all import GhApi
from fnmatch import fnmatch
class ComponentConfig:
FullScope = {'build', 'test'}
ScopeKeys = {'build', 'revalidate'}
def __init__(self, config: dict, schema: dict, all_possible_components: set):
self.config = config
self.log = logging.getLogger(self.__class__.__name__)
self.all_defined_components = set(self.config.keys()) # already defined in components.yml
# can be added to components.yml (based on labeler.yml)
self.all_possible_components = all_possible_components.union(self.all_defined_components)
self.validate(schema)
def validate(self, schema: dict) -> None:
"""Validates syntax of configuration file"""
jsonschema.validate(self.config, schema)
for component_name, data in self.config.items():
dependent_components = set()
for key in self.ScopeKeys:
scope = data.get(key)
dependent_components = dependent_components.union(set(scope) if isinstance(scope, list) else set())
invalid_dependents = dependent_components.difference(self.all_possible_components)
if invalid_dependents:
error_msg = f"dependent components of {component_name} are invalid: " \
f"{invalid_dependents} are not listed in components config: {self.all_possible_components}"
raise jsonschema.exceptions.ValidationError(error_msg)
def get_affected_components(self, changed_components_names: set) -> dict:
"""Returns changed components, their dependencies and validation scope for them"""
affected_components = dict()
# If some changed components were not defined in config or no changed components detected at all,
# run full scope for everything (just in case)
changed_not_defined_components = changed_components_names.difference(self.all_defined_components)
if not changed_components_names or changed_not_defined_components:
self.log.info(f"Changed components {changed_not_defined_components} are not defined in smart ci config, "
"run full scope")
affected_components.update({name: self.FullScope for name in self.all_possible_components})
return affected_components
# Else check changed components' dependencies and add them to affected
for name in changed_components_names:
component_scopes = {k: v for k, v in self.config.get(name, dict()).items() if k in self.ScopeKeys}
for key, dependents in component_scopes.items():
if dependents == 'all':
dependents = self.all_possible_components
for dep_name in dependents:
affected_components[dep_name] = affected_components.get(dep_name, set())
scope = self.FullScope if key == 'revalidate' else {key}
affected_components[dep_name] = affected_components[dep_name].union(scope)
if not component_scopes:
self.log.info(f"Changed component '{name}' doesn't have {self.ScopeKeys} keys in components config. "
f"Assuming that it affects everything, the whole scope will be started")
for dep_name in self.all_possible_components:
affected_components[dep_name] = self.FullScope
# If the component was explicitly changed, run full scope for it
affected_components.update({name: self.FullScope for name in changed_components_names})
self.log.info(f"Changed components with dependencies: {affected_components}")
# For non-affected components that are not defined in config - run full scope
affected_components.update({name: self.FullScope for name in self.all_possible_components
if name not in self.all_defined_components})
return affected_components
def get_static_data(self, components_names: set, data_key: str, default: str = None) -> dict:
"""Returns requested generic static data defined for each component"""
data = {name: self.config[name].get(data_key, default) for name in components_names}
return data
def component_name_from_label(label: str, component_pattern: str = None) -> str:
"""Extracts component name from label"""
component = label
if component_pattern:
matches = re.findall(component_pattern, label)
component = matches[0] if matches else None
component = component.replace(' ', '_') if component else None
return component
def get_changed_component_names(pr, all_possible_components: set, component_pattern: str = None) -> set:
"""Returns component names changed in a given PR"""
components = set()
for label in pr.labels:
component = component_name_from_label(label.name, component_pattern)
if component:
components.add(component)
elif label.name in all_possible_components:
# Allow any labels defined explicitly in labeler config as components
# (predefined labels, such as "do not merge", are still ignored)
components.add(label.name)
return components
def parse_args():
parser = argparse.ArgumentParser(description='Returns product components changed in a given PR or commit')
parser.add_argument('--pr', type=int, required=False, help='PR number. If not set, --commit is used')
parser.add_argument('-s', '--commit-sha', required=False, help='Commit SHA. If not set, --pr is used')
parser.add_argument('-r', '--repo', help='GitHub repository')
parser.add_argument('-p', '--pattern', default=None, help='Pattern to extract component name from PR label. '
'If not set, any label is considered a component name')
parser.add_argument('-c', '--components-config', default='.github/components.yml',
help='Path to config file with info about dependencies between components')
parser.add_argument('-m', '--components-config-schema', default='.github/actions/smart-ci/components_schema.yml',
help='Path to the schema file for components config')
parser.add_argument('-l', '--labeler-config', default='.github/labeler.yml',
help='Path to PR labeler config file')
parser.add_argument('--skip-when-only-listed-labels-set',
help="Comma-separated list of labels. If PR has only these labels set, "
"return indicator that CI can be skipped")
parser.add_argument('--skip-when-only-listed-files-changed',
help="Comma-separated list of patterns (fnmatch-style). If PR has only matching files changed, "
"return indicator that CI can be skipped")
args = parser.parse_args()
return args
def init_logger():
logging.basicConfig(level=logging.INFO,
format='%(asctime)s %(name)-15s %(levelname)-8s %(message)s',
datefmt='%m-%d-%Y %H:%M:%S')
def set_github_output(name: str, value: str, github_output_var_name: str = 'GITHUB_OUTPUT'):
"""Sets output variable for a GitHub Action"""
logger = logging.getLogger(__name__)
# In an environment variable "GITHUB_OUTPUT" GHA stores path to a file to write outputs to
with open(os.environ.get(github_output_var_name), 'a+') as file:
logger.info(f"Add {name}={value} to {github_output_var_name}")
print(f'{name}={value}', file=file)
def main():
init_logger()
logger = logging.getLogger(__name__)
args = parse_args()
for arg, value in sorted(vars(args).items()):
logger.info(f"Argument {arg}: {value}")
with open(Path(args.components_config), 'r') as config:
components_config = yaml.safe_load(config)
owner, repository = args.repo.split('/')
gh_api = GhApi(owner=owner, repo=repository, token=os.getenv("GITHUB_TOKEN"))
pr = gh_api.pulls.get(args.pr) if args.pr else None
with open(Path(args.components_config_schema), 'r') as schema_file:
schema = yaml.safe_load(schema_file)
with open(Path(args.labeler_config), 'r') as labeler_file:
labeler_config = yaml.safe_load(labeler_file)
all_possible_components = set()
for label in labeler_config.keys():
component_name = component_name_from_label(label, args.pattern)
all_possible_components.add(component_name if component_name else label)
no_match_files_changed = False
# For now, we don't want to apply smart ci rules for post-commits
is_postcommit = not pr
if is_postcommit:
logger.info(f"The run is a post-commit run, executing full validation scope for all components")
else:
no_match_files_changed = 'no-match-files' in [label.name for label in pr.labels]
if no_match_files_changed:
logger.info(f"There are changed files that don't match any pattern in labeler config, "
f"executing full validation scope for all components")
run_full_scope = is_postcommit or no_match_files_changed
# In post-commits - validate all components regardless of changeset
# In pre-commits - validate only changed components with their dependencies
all_defined_components = components_config.keys()
changed_component_names = set(all_defined_components) if run_full_scope else \
get_changed_component_names(pr, all_possible_components, args.pattern)
logger.info(f"changed_component_names: {changed_component_names}")
cfg = ComponentConfig(components_config, schema, all_possible_components)
affected_components = cfg.get_affected_components(changed_component_names)
skip_workflow = False
if args.pr and not run_full_scope:
if args.skip_when_only_listed_labels_set:
excepted_labels = set(args.skip_when_only_listed_labels_set.split(','))
excepted_labels_only = changed_component_names - excepted_labels == set()
skip_workflow = excepted_labels_only
if not skip_workflow and args.skip_when_only_listed_files_changed:
# To avoid spending extra API requests running step below only if necessary
changed_files = gh_api.pulls.list_files(args.pr)
patterns = set(args.skip_when_only_listed_files_changed.split(','))
matched_files_only = all(any(fnmatch(f.filename, pattern) for pattern in patterns) for f in changed_files)
logger.debug(f"matched files only: {matched_files_only}")
skip_workflow = matched_files_only
if skip_workflow:
logger.info(f"All changes are marked for skip, workflow may be skipped")
set_github_output("skip_workflow", str(skip_workflow))
# Syntactic sugar for easier use in GHA pipeline
affected_components_output = {name: {s: True for s in scope} for name, scope in affected_components.items()}
set_github_output("affected_components", json.dumps(affected_components_output))
if __name__ == '__main__':
main()

View File

@@ -0,0 +1,214 @@
import logging
import sys
import unittest
from smart_ci import ComponentConfig
log = logging.getLogger()
log.level = logging.DEBUG
def log_handler(func):
def wrapper(*args, **kwargs):
stream_handler = logging.StreamHandler(sys.stdout)
log.addHandler(stream_handler)
result = func(*args, **kwargs)
log.removeHandler(stream_handler)
return result
return wrapper
class TestComponentConfig(unittest.TestCase):
def setUp(self):
self.all_possible_components = {'comp1', 'comp2', 'comp3', 'comp4'}
ComponentConfig.ScopeKeys = {'build', 'revalidate', '_scope_1', '_scope_2', '_scope_3'}
@log_handler
def validate(self, config_data: dict, changed_components: set, expected_result: dict):
log.info(f"{self._testMethodName}:")
config = ComponentConfig(config_data, {}, self.all_possible_components)
result = config.get_affected_components(changed_components)
self.assertEqual(expected_result, result)
def test_no_changed_components(self):
config_data = {
'comp1': {'build': {}, 'revalidate': {}},
'comp2': {'build': {}, 'revalidate': {}},
'comp3': {'build': {}, 'revalidate': {}},
'comp4': {'build': {}, 'revalidate': {}},
}
changed_components = set()
expected_result = {
'comp1': ComponentConfig.FullScope,
'comp2': ComponentConfig.FullScope,
'comp3': ComponentConfig.FullScope,
'comp4': ComponentConfig.FullScope,
}
self.validate(config_data, changed_components, expected_result)
def test_all_components_changed(self):
config_data = {
'comp1': {'build': {}, 'revalidate': {}},
'comp2': {'build': {}, 'revalidate': {}},
'comp3': {'build': {}, 'revalidate': {}},
'comp4': {'build': {}, 'revalidate': {}},
}
changed_components = {'comp1', 'comp2', 'comp3', 'comp4'}
expected_result = {
'comp1': ComponentConfig.FullScope,
'comp2': ComponentConfig.FullScope,
'comp3': ComponentConfig.FullScope,
'comp4': ComponentConfig.FullScope,
}
self.validate(config_data, changed_components, expected_result)
def test_changed_component_not_defined(self):
config_data = {
'comp2': {'build': {}, 'revalidate': {}},
'comp3': {'build': {}, 'revalidate': {}},
'comp4': {'build': {}, 'revalidate': {}},
}
changed_components = {'comp1'}
expected_result = {
'comp1': ComponentConfig.FullScope,
'comp2': ComponentConfig.FullScope,
'comp3': ComponentConfig.FullScope,
'comp4': ComponentConfig.FullScope,
}
self.validate(config_data, changed_components, expected_result)
def test_component_changed_no_scope_keys(self):
config_data = {
'comp1': {},
'comp2': {},
'comp3': {},
'comp4': {},
}
changed_components = {'comp1'}
expected_result = {
'comp1': ComponentConfig.FullScope,
'comp2': ComponentConfig.FullScope,
'comp3': ComponentConfig.FullScope,
'comp4': ComponentConfig.FullScope,
}
self.validate(config_data, changed_components, expected_result)
def test_one_component_changed_dependents_empty(self):
config_data = {
'comp1': {'build': {}, 'revalidate': {}},
'comp2': {'build': {}, 'revalidate': {}},
'comp3': {'build': {}, 'revalidate': {}},
'comp4': {'build': {}, 'revalidate': {}},
}
changed_components = {'comp1'}
expected_result = {
'comp1': ComponentConfig.FullScope,
}
self.validate(config_data, changed_components, expected_result)
def test_not_changed_dependent_component(self):
config_data = {
'comp1': {'build': {'comp2'}, 'revalidate': {}},
'comp2': {'build': {}, 'revalidate': {}},
'comp3': {'build': {}, 'revalidate': {}},
'comp4': {'build': {}, 'revalidate': {}},
}
changed_components = {'comp1'}
expected_result = {
'comp1': ComponentConfig.FullScope,
'comp2': {'build'}
}
self.validate(config_data, changed_components, expected_result)
def test_changed_dependent_component(self):
config_data = {
'comp1': {'build': {'comp2'}, 'revalidate': {}},
'comp2': {'build': {}, 'revalidate': {}},
'comp3': {'build': {}, 'revalidate': {}},
'comp4': {'build': {}, 'revalidate': {}},
}
changed_components = {'comp1', 'comp2'}
expected_result = {
'comp1': ComponentConfig.FullScope,
'comp2': ComponentConfig.FullScope
}
self.validate(config_data, changed_components, expected_result)
def test_dependent_component_multiple_parents(self):
config_data = {
'comp1': {'_scope_1': {'comp2'}, 'revalidate': {}},
'comp2': {'build': {}, 'revalidate': {}},
'comp3': {'build': {}, '_scope_2': {'comp2'}, '_scope_3': {'comp2'}},
'comp4': {'build': {}, 'revalidate': {}},
}
changed_components = {'comp1', 'comp3'}
expected_result = {
'comp1': ComponentConfig.FullScope,
'comp2': {'_scope_1', '_scope_2', '_scope_3'},
'comp3': ComponentConfig.FullScope
}
self.validate(config_data, changed_components, expected_result)
def test_dependent_component_empty_scopes(self):
config_data = {
'comp1': {'build': {}, 'revalidate': {'comp2'}},
'comp2': {},
'comp3': {},
'comp4': {},
}
changed_components = {'comp1', 'comp3'}
expected_result = {
'comp1': ComponentConfig.FullScope,
'comp2': ComponentConfig.FullScope,
'comp3': ComponentConfig.FullScope,
'comp4': ComponentConfig.FullScope
}
self.validate(config_data, changed_components, expected_result)
def test_changed_component_empty_dependencies(self):
config_data = {
'comp1': {'build': {}, 'revalidate': {}},
'comp2': {'build': {}, 'revalidate': {}},
'comp3': {'build': {}, 'revalidate': {}},
'comp4': {'build': {}, 'revalidate': {}},
}
changed_components = {'comp1'}
expected_result = {
'comp1': ComponentConfig.FullScope,
}
self.validate(config_data, changed_components, expected_result)
def test_multiple_dependents(self):
config_data = {
'comp1': {'build': {'comp2'}, 'revalidate': {'comp3'}},
'comp2': {'build': {}, 'revalidate': {}},
'comp3': {'build': {'comp4'}, 'revalidate': {}},
'comp4': {'build': {}, 'revalidate': {}},
}
changed_components = {'comp1'}
expected_result = {
'comp1': ComponentConfig.FullScope,
'comp2': {'build'},
'comp3': ComponentConfig.FullScope,
# We don't consider dependencies of dependencies affected, so comp4 is not expected here
}
self.validate(config_data, changed_components, expected_result)
def test_all_as_dependents(self):
config_data = {
'comp1': {'build': 'all', 'revalidate': {}},
'comp2': {'build': {}, 'revalidate': {}},
'comp3': {'build': {}, 'revalidate': {}},
'comp4': {'build': {}, 'revalidate': {}},
}
changed_components = {'comp1'}
expected_result = {
'comp1': ComponentConfig.FullScope,
'comp2': {'build'},
'comp3': {'build'},
'comp4': {'build'},
}
self.validate(config_data, changed_components, expected_result)
if __name__ == '__main__':
unittest.main(verbosity=2)

236
.github/components.yml vendored Normal file
View File

@@ -0,0 +1,236 @@
Core:
revalidate: 'all'
transformations:
revalidate: 'all'
LP_transformations:
revalidate:
- CPU
- GPU
- PyTorch_FE
- TF_FE
- TFL_FE
- ONNX_FE
- PDPD_FE
- POT
preprocessing:
revalidate:
- inference
- GNA
- C_API
- Python_API
inference:
revalidate: 'all'
CPU:
revalidate:
- C_API
- Python_API
- samples
- ONNX_RT
- PyTorch_FE
- TF_FE
- ONNX_FE
build:
- HETERO
- AUTO_BATCH
- TEMPLATE
- IR_FE
GPU:
build:
- HETERO
- AUTO_BATCH
- TEMPLATE
- IR_FE
- PROXY
GNA:
build:
- HETERO
- AUTO_BATCH
- TEMPLATE
- IR_FE
HETERO:
revalidate:
- CPU
- GPU
- GNA
- HETERO
- AUTO_BATCH
- TEMPLATE
- C_API
- Python_API
build:
- IR_FE
AUTO_BATCH:
revalidate:
- CPU
- GPU
- GNA
- HETERO
- AUTO_BATCH
- TEMPLATE
- C_API
- Python_API
build:
- IR_FE
TEMPLATE:
revalidate:
- CPU
- GPU
- GNA
- HETERO
- AUTO_BATCH
- TEMPLATE
- AUTO
- C_API
- Python_API
- NVIDIA
build:
- IR_FE
AUTO:
revalidate:
- TEMPLATE
- AUTO
- C_API
- Python_API
build:
- IR_FE
PROXY:
revalidate:
- inference
- GPU
build: []
IR_FE:
revalidate:
- C_API
- Python_API
- samples
build:
- CPU
ONNX_FE:
revalidate:
- MO
build:
- CPU
- Python_API
PDPD_FE:
revalidate:
- MO
build:
- CPU
- Python_API
TF_FE:
revalidate:
- MO
build:
- CPU
- Python_API
TFL_FE:
revalidate:
- MO
build:
- CPU
- Python_API
PyTorch_FE:
revalidate:
- MO
build:
- CPU
- Python_API
C_API:
build:
- CPU
- HETERO
- AUTO_BATCH
- AUTO
- IR_FE
Python_API:
revalidate:
- samples
- MO
- POT
- tools
build:
- CPU
- HETERO
- AUTO_BATCH
- TEMPLATE
- AUTO
- IR_FE
- ONNX_FE
- PDPD_FE
- TF_FE
- TFL_FE
- PyTorch_FE
samples:
build:
- CPU
- AUTO_BATCH
- AUTO
- IR_FE
- C_API
- Python_API
IE_Tests:
revalidate:
- CPU
- GPU
- GNA
- HETERO
- AUTO_BATCH
- TEMPLATE
- AUTO
- NVIDIA
build:
- IR_FE
MO:
revalidate:
- POT
build:
- Python_API
POT:
build:
- CPU
- Python_API
tools:
build:
- CPU
- Python_API
docs:
revalidate: []
build: []
licensing:
revalidate: []
build: []
NVIDIA:
revalidate: []
build: []
ONNX_RT:
revalidate: []
build: []

39
.github/labeler.yml vendored
View File

@@ -48,12 +48,19 @@
- 'scripts/**/*'
- '.gitmodules'
- '**/setup.py'
- 'conan.lock'
- 'conanfile.txt'
- 'vcpkg.json'
- any: ['thirdparty/**/*',
'!thirdparty/**/CMakeLists.txt']
'category: docs':
- 'docs/**/*'
- '**/*.md'
- any: ['docs/**/*',
'!docs/snippets/**/*']
'category: docs_snippets':
- 'docs/snippets/**/*'
'category: extensions':
- 'src/core/include/openvino/core/extension.hpp'
@@ -65,22 +72,22 @@
'category: GPU':
- 'src/plugins/intel_gpu/**/*'
- 'src/tests/**/gpu/**/*'
- 'thirdparty/ocl/**/*'
'category: HETERO':
- 'src/plugins/hetero/**/*'
'category: PROXY':
- 'src/plugins/proxy/**/*'
'category: IE Tests':
- 'thirdparty/gtest/**/*'
- 'src/frontends/tests/frontend/shared/**/*'
- any: ['src/tests/**/*',
'!src/tests/**/gpu/**/*',
'!src/tests/**/inference_engine/**/*']
- 'src/tests/**/*'
'category: inference':
- 'src/inference/**/*'
- 'src/tests/functional/inference_engine/**/*'
- 'src/cmake/**/*'
'category: IR FE':
- 'src/frontends/ir/**/*'
@@ -91,10 +98,13 @@
'category: MO':
- 'tools/mo/**/*'
- 'tools/ovc/**/*'
- 'tests/layer_tests/mo_python_api_tests/**/*'
- 'tests/layer_tests/ovc_python_api_tests/**/*'
'category: ONNX FE':
- 'src/frontends/onnx/**/*'
- 'thirdparty/onnx/**/*'
- 'tests/layer_tests/onnx_tests/**/*'
'category: packaging':
- 'cmake/**/packaging/**/*'
@@ -103,6 +113,7 @@
'category: PDPD FE':
- 'src/frontends/paddle/**/*'
- 'tests/layer_tests/py_frontend_tests/test_paddle_frontend.py'
'category: POT':
- 'tools/pot/**/*'
@@ -119,6 +130,7 @@
- 'thirdparty/gflags/**/*'
- 'thirdparty/json/**/*'
- 'thirdparty/cnpy/**/*'
- 'tests/samples_tests/smoke_tests/**/*'
'category: TEMPLATE':
- 'src/plugins/template/**/*'
@@ -127,6 +139,10 @@
- 'src/frontends/tensorflow/**/*'
- 'src/frontends/tensorflow_common/**/*'
- 'tests/layer_tests/tensorflow_tests/**/*'
- 'tests/layer_tests/tensorflow2_keras_tests/**/*'
- 'tests/layer_tests/jax_tests/**/*'
- any: ['tests/model_hub_tests/**',
'!tests/model_hub_tests/torch_tests/**/*']
'category: TFL FE':
- 'src/frontends/tensorflow_lite/**/*'
@@ -137,12 +153,21 @@
- 'src/frontends/pytorch/**/*'
- 'tests/layer_tests/pytorch_tests/**/*'
- 'src/bindings/python/src/openvino/frontend/pytorch/**/*'
- 'tests/layer_tests/py_frontend_tests/test_torch_decoder.py'
- 'tests/layer_tests/py_frontend_tests/test_torch_frontend.py'
- any: ['tests/model_hub_tests/**',
'!tests/model_hub_tests/tf_hub_tests/**/*']
'category: tools':
- any: ['tools/**',
'!tools/pot/**/*',
'!tools/mo/**/*']
'!tools/mo/**/*',
'!tools/ovc/**/*']
'category: transformations':
- 'src/common/transformations/**/*'
- 'src/common/offline_transformations/**/*'
'category: licensing':
- 'licensing/**/*'
- 'LICENSE'

View File

@@ -2,23 +2,10 @@ name: Android ARM64 with vcpkg
on:
workflow_dispatch:
pull_request:
paths-ignore:
- '**/docs/**'
- 'docs/**'
- '**/**.md'
- '**.md'
- '**/layer_tests_summary/**'
- '**/conformance/**'
push:
paths-ignore:
- '**/docs/**'
- 'docs/**'
- '**/**.md'
- '**.md'
- '**/layer_tests_summary/**'
- '**/conformance/**'
branches:
- master
- 'releases/**'
concurrency:
# github.ref is not unique in post-commit
@@ -26,8 +13,32 @@ concurrency:
cancel-in-progress: true
jobs:
Smart_CI:
runs-on: ubuntu-latest
outputs:
affected_components: "${{ steps.smart_ci.outputs.affected_components }}"
skip_workflow: "${{ steps.smart_ci.outputs.skip_workflow }}"
steps:
- name: checkout action
uses: actions/checkout@v4
with:
sparse-checkout: .github/actions/smart-ci
- name: Get affected components
id: smart_ci
uses: ./.github/actions/smart-ci
with:
repository: ${{ github.repository }}
pr: ${{ github.event.number }}
commit_sha: ${{ github.sha }}
component_pattern: "category: (.*)"
repo_token: ${{ secrets.GITHUB_TOKEN }}
skip_when_only_listed_labels_set: 'docs'
skip_when_only_listed_files_changed: '*.md,*.rst,*.png,*.jpg,*.svg,*/layer_tests_summary/*,*/conformance/*'
Build:
timeout-minutes: 15
needs: Smart_CI
timeout-minutes: 150
defaults:
run:
shell: bash
@@ -35,7 +46,7 @@ jobs:
container:
image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04
volumes:
- /mount/caches:/mount/caches
- /mount:/mount
options: -e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING
env:
DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input
@@ -52,6 +63,7 @@ jobs:
VCPKG_DEFAULT_BINARY_CACHE: '/mount/caches/ccache/android_arm64/vcpkg_cache'
VCPKG_FORCE_SYSTEM_BINARIES: '1'
SCCACHE_AZURE_KEY_PREFIX: android_arm64
if: "!needs.smart_ci.outputs.skip_workflow"
steps:
- name: Install git
run: apt-get update && apt-get install --assume-yes --no-install-recommends git ca-certificates
@@ -151,10 +163,24 @@ jobs:
-B ${BUILD_DIR}
- name: Clean ccache stats
run: sccache --zero-stats
run: ${SCCACHE_PATH} --zero-stats
- name: Cmake - build
run: cmake --build ${BUILD_DIR} --parallel
- name: Show ccache stats
run: ${SCCACHE_PATH} --show-stats
Overall_Status:
name: ci/gha_overall_status_android
needs: [Smart_CI, Build]
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Check status of all jobs
if: >-
${{
contains(needs.*.result, 'failure') ||
contains(needs.*.result, 'cancelled')
}}
run: exit 1

View File

@@ -4,7 +4,6 @@ on:
env:
DOXY_VER: '1.9.6'
DOXYREST_VER: '2.1.3'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
@@ -26,7 +25,7 @@ jobs:
packages: graphviz texlive liblua5.2-0 libclang1-9 libclang-cpp9
version: 3.0
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
id: cp310
with:
python-version: '3.10'
@@ -40,19 +39,18 @@ jobs:
python3 -m pip install -r docs/requirements.txt
(cd docs/openvino_sphinx_theme && python3 setup.py install)
- name: Download and install doxygen && doxyrest
- name: Download and install doxygen
run: |
# install doxyrest
wget https://github.com/vovkos/doxyrest/releases/download/doxyrest-$DOXYREST_VER/doxyrest-$DOXYREST_VER-linux-amd64.tar.xz
tar -xf doxyrest-$DOXYREST_VER-linux-amd64.tar.xz
echo "$(pwd)/doxyrest-$DOXYREST_VER-linux-amd64/bin/" >> $GITHUB_PATH
# install doxygen
wget https://www.doxygen.nl/files/doxygen-$DOXY_VER.linux.bin.tar.gz
tar -xzf doxygen-$DOXY_VER.linux.bin.tar.gz
echo "$(pwd)/doxygen-$DOXY_VER/bin/" >> $GITHUB_PATH
- name: CMake configure
run: cmake -DENABLE_DOCS=ON -B build
- name: Build docs
run: |
rm -rf build && mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_DOCS=ON -DENABLE_CPP_API=ON
cmake --build . --target sphinx_docs
- name: Cache documentation
id: cache_sphinx_docs
@@ -61,13 +59,6 @@ jobs:
path: build/docs/_build/.doctrees
key: sphinx-docs-cache
- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v2
id: cpu-cores
- name: Build docs
run: cmake --build build --target sphinx_docs --parallel ${{ steps.cpu-cores.outputs.count }}
- name: Archive docs HTML
run: (cd build/docs && zip -r openvino_docs_html.zip _build)
@@ -97,14 +88,13 @@ jobs:
- name: Run Pytest
run: |
pytest --doxygen="./build/docs/doxygen.log" \
--include_pot \
--sphinx="./build/docs/sphinx.log" \
--suppress-warnings="./docs/suppress_warnings.txt" \
--suppress-warnings="./docs/scripts/tests/suppress_warnings.txt" \
--confcutdir="./docs/scripts/tests/" \
--html="./build/docs/_artifacts/doc-generation.html" \
--doxygen-strip="$(pwd)" \
--sphinx-strip="$(pwd)/build/docs/rst" \
--doxygen-xfail="./docs/doxygen-xfail.txt" \
--sphinx-strip="$(pwd)/build/docs/sphinx_source" \
--xfail="./docs/scripts/tests/xfail.txt" \
--self-contained-html ./docs/scripts/tests/test_docs.py
- name: 'Upload test results'

View File

@@ -1,16 +1,17 @@
name: Cleanup PIP caches
on:
workflow_dispatch:
schedule:
# at 00:00 on the 1st day of every month
- cron: '0 0 1 * *'
jobs:
Cleanup_PIP_Caches:
runs-on: aks-linux-2-cores
runs-on: aks-linux-2-cores-8gb
container:
image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04
volumes:
- /mount/caches:/mount/caches
- /mount:/mount
env:
PIP_CACHE_PATH: /mount/caches/pip

View File

@@ -16,7 +16,7 @@ jobs:
steps:
- name: Setup python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10.10'
architecture: 'x64'

141
.github/workflows/coverity.yml vendored Normal file
View File

@@ -0,0 +1,141 @@
name: Coverity (Ubuntu 20.04, Python 3.11)
on:
workflow_dispatch:
schedule:
# run daily at 00:00
- cron: '0 0 * * *'
concurrency:
# github.ref is not unique in post-commit
group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-linux-coverity
cancel-in-progress: true
env:
PIP_CACHE_PATH: /mount/caches/pip/linux
PYTHON_VERSION: '3.11'
jobs:
Build:
timeout-minutes: 150
defaults:
run:
shell: bash
runs-on: aks-linux-16-cores-32gb
container:
image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04
volumes:
- /mount/caches:/mount/caches
options: -e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING
env:
DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input
CMAKE_BUILD_TYPE: 'Release'
CMAKE_GENERATOR: 'Ninja Multi-Config'
CMAKE_CXX_COMPILER_LAUNCHER: sccache
CMAKE_C_COMPILER_LAUNCHER: sccache
GITHUB_WORKSPACE: '/__w/openvino/openvino'
OPENVINO_REPO: /__w/openvino/openvino/openvino
OPENVINO_CONTRIB_REPO: /__w/openvino/openvino/openvino_contrib
BUILD_DIR: /__w/openvino/openvino/openvino_build
SCCACHE_AZURE_KEY_PREFIX: coverity_ubuntu20_x86_64
COVERITY_TOOL_DIR: /__w/openvino/openvino/coverity_tool
steps:
- name: Install git
run: |
apt-get update
apt-get install --assume-yes --no-install-recommends git ca-certificates
- name: Clone OpenVINO
uses: actions/checkout@v4
with:
path: ${{ env.OPENVINO_REPO }}
submodules: 'true'
- name: Clone OpenVINO Contrib
uses: actions/checkout@v4
with:
repository: 'openvinotoolkit/openvino_contrib'
path: ${{ env.OPENVINO_CONTRIB_REPO }}
submodules: 'true'
ref: 'master'
#
# Dependencies
#
- name: Install build dependencies
run: |
bash ${OPENVINO_REPO}/install_build_dependencies.sh
# default-jdk - Java API
apt install --assume-yes --no-install-recommends default-jdk
- name: Install sccache
uses: mozilla-actions/sccache-action@v0.0.3
with:
version: "v0.5.4"
- name: Setup Python ${{ env.PYTHON_VERSION }}
uses: ./openvino/.github/actions/setup_python
with:
version: ${{ env.PYTHON_VERSION }}
pip-cache-path: ${{ env.PIP_CACHE_PATH }}
should-setup-pip-paths: 'true'
self-hosted-runner: 'true'
#
# Build
#
- name: CMake configure - OpenVINO
run: |
cmake \
-G "${{ env.CMAKE_GENERATOR }}" \
-DENABLE_CPPLINT=OFF \
-DENABLE_STRICT_DEPENDENCIES=OFF \
-DENABLE_SYSTEM_TBB=ON \
-DENABLE_SYSTEM_OPENCL=ON \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCPACK_GENERATOR=TGZ \
-DBUILD_nvidia_plugin=OFF \
-DOPENVINO_EXTRA_MODULES=${OPENVINO_CONTRIB_REPO}/modules \
-DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CMAKE_CXX_COMPILER_LAUNCHER }} \
-DCMAKE_C_COMPILER_LAUNCHER=${{ env.CMAKE_C_COMPILER_LAUNCHER }} \
-S ${OPENVINO_REPO} \
-B ${BUILD_DIR}
- name: Clean sccache stats
run: ${SCCACHE_PATH} --zero-stats
- name: Install Coverity tool
run: |
rm -rf ${COVERITY_TOOL_DIR} && mkdir -p ${COVERITY_TOOL_DIR}
pushd ${COVERITY_TOOL_DIR}
wget https://scan.coverity.com/download/linux64 --progress=bar:force:noscroll --post-data "token=${{ secrets.COVERITY_TOKEN }}&project=openvino" -O coverity_tool.tgz
tar xvf coverity_tool.tgz && rm coverity_tool.tgz
popd
- name: Cmake build - OpenVINO with Coverity
run: |
${COVERITY_TOOL_DIR}/cov-analysis*/bin/cov-build --dir ${BUILD_DIR}/cov-int \
cmake --build ${BUILD_DIR} --parallel --config ${{ env.CMAKE_BUILD_TYPE }}
- name: Show sccache stats
run: ${SCCACHE_PATH} --show-stats
- name: Pack Artefacts
run: |
pushd ${BUILD_DIR}
tar -C ${BUILD_DIR} -czvf openvino.tgz cov-int
popd
- name: Submit artefacts
run: |
apt-get update && apt-get install -y curl
pushd ${BUILD_DIR}
curl --form token=${{ secrets.COVERITY_TOKEN }} \
--form email=${{ secrets.COVERITY_USER }} \
--form file=@openvino.tgz \
--form version="${{ github.sha }}" \
--form description="https://github.com/openvinotoolkit/openvino/runs/${{ github.run_number }}" \
https://scan.coverity.com/builds?project=openvino
popd

View File

@@ -2,21 +2,7 @@ name: Fedora (RHEL), Python 3.9
on:
workflow_dispatch:
pull_request:
paths-ignore:
- '**/docs/**'
- 'docs/**'
- '**/**.md'
- '**.md'
- '**/layer_tests_summary/**'
- '**/conformance/**'
push:
paths-ignore:
- '**/docs/**'
- 'docs/**'
- '**/**.md'
- '**.md'
- '**/layer_tests_summary/**'
- '**/conformance/**'
branches:
- master
- 'releases/**'
@@ -27,7 +13,31 @@ concurrency:
cancel-in-progress: true
jobs:
Smart_CI:
runs-on: ubuntu-latest
outputs:
affected_components: "${{ steps.smart_ci.outputs.affected_components }}"
skip_workflow: "${{ steps.smart_ci.outputs.skip_workflow }}"
steps:
- name: checkout action
uses: actions/checkout@v4
with:
sparse-checkout: .github/actions/smart-ci
- name: Get affected components
id: smart_ci
uses: ./.github/actions/smart-ci
with:
repository: ${{ github.repository }}
pr: ${{ github.event.number }}
commit_sha: ${{ github.sha }}
component_pattern: "category: (.*)"
repo_token: ${{ secrets.GITHUB_TOKEN }}
skip_when_only_listed_labels_set: 'docs'
skip_when_only_listed_files_changed: '*.md,*.rst,*.png,*.jpg,*.svg,*/layer_tests_summary/*,*/conformance/*'
Build:
needs: Smart_CI
timeout-minutes: 150
defaults:
run:
@@ -36,7 +46,7 @@ jobs:
container:
image: fedora:33
volumes:
- /mount/caches:/mount/caches
- /mount:/mount
options: -e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING
env:
CMAKE_BUILD_TYPE: 'Release'
@@ -49,6 +59,7 @@ jobs:
INSTALL_TEST_DIR: /__w/openvino/openvino/tests_install
BUILD_DIR: /__w/openvino/openvino/openvino_build
SCCACHE_AZURE_KEY_PREFIX: fedora33_x86_64_Release
if: "!needs.smart_ci.outputs.skip_workflow"
steps:
- name: Install git
run: yum update -y && yum install -y git
@@ -179,7 +190,7 @@ jobs:
RPM_Packages:
needs: Build
timeout-minutes: 5
timeout-minutes: 10
defaults:
run:
shell: bash
@@ -191,7 +202,7 @@ jobs:
steps:
- name: Download OpenVINO RPM packages
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: openvino_rpm_packages
path: ${{ env.RPM_PACKAGES_DIR }}
@@ -231,3 +242,17 @@ jobs:
python3 -c 'from openvino.frontend import FrontEndManager; assert len(FrontEndManager().get_available_front_ends()) == 6'
benchmark_app --help
ovc --help
Overall_Status:
name: ci/gha_overall_status_fedora
needs: [Smart_CI, Build, RPM_Packages]
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Check status of all jobs
if: >-
${{
contains(needs.*.result, 'failure') ||
contains(needs.*.result, 'cancelled')
}}
run: exit 1

View File

@@ -0,0 +1,124 @@
name: CPU functional tests
on:
workflow_call:
inputs:
runner:
description: 'Machine on which the tests would run'
type: string
required: true
image:
description: 'Docker image in which the tests would run'
type: string
required: false
default: null
jobs:
CPU_Functional_Tests:
name: CPU functional tests
timeout-minutes: 25
runs-on: ${{ inputs.runner }}
container:
image: ${{ inputs.image }}
defaults:
run:
shell: bash
env:
DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input
INSTALL_DIR: ${{ github.workspace }}/install
INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests
PARALLEL_TEST_SCRIPT: ${{ github.workspace }}/install/tests/functional_test_utils/layer_tests_summary/run_parallel.py
PARALLEL_TEST_CACHE: ${{ github.workspace }}/install/tests/test_cache.lst
steps:
- name: Download OpenVINO package
uses: actions/download-artifact@v4
with:
name: openvino_package
path: ${{ env.INSTALL_DIR }}
- name: Download OpenVINO tests package
uses: actions/download-artifact@v4
with:
name: openvino_tests
path: ${{ env.INSTALL_TEST_DIR }}
# Needed as ${{ github.workspace }} is not working correctly when using Docker
- name: Setup Variables
run: |
echo "INSTALL_DIR=$GITHUB_WORKSPACE/install" >> "$GITHUB_ENV"
echo "INSTALL_TEST_DIR=$GITHUB_WORKSPACE/install/tests" >> "$GITHUB_ENV"
echo "PARALLEL_TEST_SCRIPT=$GITHUB_WORKSPACE/install/tests/functional_test_utils/layer_tests_summary/run_parallel.py" >> "$GITHUB_ENV"
echo "PARALLEL_TEST_CACHE=$GITHUB_WORKSPACE/install/tests/test_cache.lst" >> "$GITHUB_ENV"
- name: Extract OpenVINO packages
run: |
pushd $INSTALL_DIR
tar -xzf openvino_package.tar.gz -C $INSTALL_DIR
popd
pushd $INSTALL_TEST_DIR
tar -xzf openvino_tests.tar.gz -C $INSTALL_DIR
popd
- name: Install OpenVINO dependencies (Linux)
if: runner.os == 'Linux'
run: $INSTALL_DIR/install_dependencies/install_openvino_dependencies.sh -c=core -c=dev -c=gpu -y
- name: Fetch setup_python action
uses: actions/checkout@v4
with:
sparse-checkout: |
.github/actions/setup_python/action.yml
sparse-checkout-cone-mode: false
path: 'openvino'
- name: Setup Python 3.11
uses: ./openvino/.github/actions/setup_python
with:
version: '3.11'
should-setup-pip-paths: 'false'
self-hosted-runner: ${{ runner.os == 'Linux' }}
- name: Install python dependencies for run_parallel.py
run: python3 -m pip install -r ${INSTALL_TEST_DIR}/functional_test_utils/layer_tests_summary/requirements.txt
- name: Restore tests execution time
uses: actions/cache/restore@v3
with:
path: ${{ env.PARALLEL_TEST_CACHE }}
key: ${{ runner.os }}-${{ runner.arch }}-tests-functional-cpu-stamp-${{ github.sha }}
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-tests-functional-cpu-stamp
- name: Intel CPU plugin func tests (parallel)
run: |
# Needed as the Linux CC does not require setupvars to work
if [[ -f "${INSTALL_DIR}/setupvars.sh" ]]; then
source ${INSTALL_DIR}/setupvars.sh
fi
python3 ${PARALLEL_TEST_SCRIPT} -e ${INSTALL_TEST_DIR}/ov_cpu_func_tests -c ${PARALLEL_TEST_CACHE} -w ${INSTALL_TEST_DIR} -s suite -rf 0 -- --gtest_print_time=1 --gtest_filter=*smoke*
timeout-minutes: 20
- name: Save tests execution time
uses: actions/cache/save@v3
if: github.ref_name == 'master'
with:
path: ${{ env.PARALLEL_TEST_CACHE }}
key: ${{ runner.os }}-${{ runner.arch }}-tests-functional-cpu-stamp-${{ github.sha }}
- name: Upload Test Results
uses: actions/upload-artifact@v3
if: ${{ !cancelled() }}
with:
name: test-results-functional-cpu
path: |
${{ env.INSTALL_TEST_DIR }}/temp/*.log
${{ env.INSTALL_TEST_DIR }}/logs/*.log
${{ env.INSTALL_TEST_DIR }}/logs/failed/*.log
${{ env.INSTALL_TEST_DIR }}/logs/crashed/*.log
${{ env.INSTALL_TEST_DIR }}/logs/hanged/*.log
${{ env.INSTALL_TEST_DIR }}/logs/interapted/*.log
${{ env.INSTALL_TEST_DIR }}/logs/hash_table.csv
${{ env.PARALLEL_TEST_CACHE }}
if-no-files-found: 'error'

279
.github/workflows/job_cxx_unit_tests.yml vendored Normal file
View File

@@ -0,0 +1,279 @@
name: Samples
on:
workflow_call:
inputs:
runner:
description: 'Machine on which the tests would run'
type: string
required: true
image:
description: 'Docker image in which the tests would run'
type: string
required: false
default: null
affected-components:
description: 'Components that are affected by changes in the commit defined by the Smart CI Action'
type: string
required: true
jobs:
CXX_Unit_Tests:
name: C++ unit tests
timeout-minutes: 30
runs-on: ${{ inputs.runner }}
container:
image: ${{ inputs.image }}
defaults:
run:
shell: bash
env:
DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input
INSTALL_DIR: ${{ github.workspace }}/install
INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests
steps:
- name: Download OpenVINO package
uses: actions/download-artifact@v4
with:
name: openvino_package
path: ${{ env.INSTALL_DIR }}
- name: Download OpenVINO tests package
uses: actions/download-artifact@v4
with:
name: openvino_tests
path: ${{ env.INSTALL_TEST_DIR }}
# Needed as ${{ github.workspace }} is not working correctly when using Docker
- name: Setup Variables
run: |
echo "INSTALL_DIR=$GITHUB_WORKSPACE/install" >> "$GITHUB_ENV"
echo "INSTALL_TEST_DIR=$GITHUB_WORKSPACE/install/tests" >> "$GITHUB_ENV"
- name: Extract OpenVINO packages
run: |
pushd $INSTALL_DIR
tar -xzf openvino_package.tar.gz -C $INSTALL_DIR
popd
pushd $INSTALL_TEST_DIR
tar -xzf openvino_tests.tar.gz -C $INSTALL_DIR
popd
- name: Install OpenVINO dependencies (Linux)
if: runner.os == 'Linux'
run: $INSTALL_DIR/install_dependencies/install_openvino_dependencies.sh -c=core -c=dev -c=gpu -y
#
# Tests
#
- name: OpenVINO Core Unit Tests
if: fromJSON(inputs.affected-components).Core.test
run: |
source ${INSTALL_DIR}/setupvars.sh
${INSTALL_TEST_DIR}/ov_core_unit_tests --gtest_print_time=1 --gtest_filter=-*IE_GPU* \
--gtest_output=xml:${INSTALL_TEST_DIR}/TEST-OVCoreUT.xml
- name: OpenVINO Inference Functional Tests
if: fromJSON(inputs.affected-components).inference.test
run: |
source ${INSTALL_DIR}/setupvars.sh
${INSTALL_TEST_DIR}/ov_inference_functional_tests --gtest_print_time=1 \
--gtest_output=xml:${INSTALL_TEST_DIR}/TEST-InferenceFunc.xml
- name: OpenVINO Inference Unit Tests
if: fromJSON(inputs.affected-components).inference.test
run: |
source ${INSTALL_DIR}/setupvars.sh
${INSTALL_TEST_DIR}/ov_inference_unit_tests --gtest_print_time=1 \
--gtest_output=xml:${INSTALL_TEST_DIR}/TEST-InferenceUnit.xml
- name: Low Precision Transformations Tests
if: fromJSON(inputs.affected-components).LP_transformations.test
run: |
source ${INSTALL_DIR}/setupvars.sh
${INSTALL_TEST_DIR}/ov_lp_transformations_tests --gtest_print_time=1 \
--gtest_output=xml:${INSTALL_TEST_DIR}/TEST-LpTransformations.xml
- name: OpenVINO Conditional compilation tests
if: fromJSON(inputs.affected-components).Core.test
run: |
source ${INSTALL_DIR}/setupvars.sh
${INSTALL_TEST_DIR}/ov_conditional_compilation_tests --gtest_print_time=1 \
--gtest_output=xml:${INSTALL_TEST_DIR}/TEST-ConditionalCompilation.xml
- name: IR frontend tests
if: fromJSON(inputs.affected-components).IR_FE.test
run: |
source ${INSTALL_DIR}/setupvars.sh
${INSTALL_TEST_DIR}/ov_ir_frontend_tests --gtest_print_time=1 \
--gtest_output=xml:${INSTALL_TEST_DIR}/TEST-IRFrontend.xml
- name: PaddlePaddle frontend tests
run: |
source ${INSTALL_DIR}/setupvars.sh
${INSTALL_TEST_DIR}/paddle_tests --gtest_print_time=1 \
--gtest_output=xml:${INSTALL_TEST_DIR}/TEST-PaddleTests.xml
- name: ONNX frontend tests
if: ${{ fromJSON(inputs.affected-components).ONNX_FE.test && runner.arch != 'ARM64' }} # Ticket for macOS ARM64: 122663, for Linux ARM64: 126280
run: |
source ${INSTALL_DIR}/setupvars.sh
${INSTALL_TEST_DIR}/ov_onnx_frontend_tests --gtest_print_time=1 \
--gtest_filter=-*IE_GPU* \
--gtest_output=xml:${INSTALL_TEST_DIR}/TEST-ONNXFrontend.xml
- name: TensorFlow Common frontend tests
if: fromJSON(inputs.affected-components).TF_FE.test ||
fromJSON(inputs.affected-components).TFL_FE.test &&
(runner.os != 'macOS' && runner.arch != 'ARM64')
run: |
source ${INSTALL_DIR}/setupvars.sh
${INSTALL_TEST_DIR}/ov_tensorflow_common_tests --gtest_print_time=1 \
--gtest_output=xml:${INSTALL_TEST_DIR}/TEST-TensorFlowCommonFrontend.xml
- name: TensorFlow frontend tests
if: fromJSON(inputs.affected-components).TF_FE.test
run: |
source ${INSTALL_DIR}/setupvars.sh
${INSTALL_TEST_DIR}/ov_tensorflow_frontend_tests --gtest_print_time=1 \
--gtest_output=xml:${INSTALL_TEST_DIR}/TEST-TensorFlowFrontend.xml
- name: TensorFlow Lite frontend tests
if: fromJSON(inputs.affected-components).TFL_FE.test
run: |
source ${INSTALL_DIR}/setupvars.sh
${INSTALL_TEST_DIR}/ov_tensorflow_lite_frontend_tests --gtest_print_time=1 \
--gtest_output=xml:${INSTALL_TEST_DIR}/TEST-TensorFlowLiteFrontend.xml
- name: Transformations func tests
if: ${{ fromJSON(inputs.affected-components).transformations.test && runner.arch != 'ARM64' }} # Ticket: 126281
run: |
source ${INSTALL_DIR}/setupvars.sh
${INSTALL_TEST_DIR}/ov_transformations_tests --gtest_print_time=1 \
--gtest_output=xml:${INSTALL_TEST_DIR}/TEST-Transformations.xml
- name: Legacy Transformations func tests
if: fromJSON(inputs.affected-components).GNA.test &&
(runner.os != 'macOS' && runner.arch != 'ARM64')
run: |
source ${INSTALL_DIR}/setupvars.sh
${INSTALL_TEST_DIR}/ov_legacy_transformations_tests --gtest_print_time=1 \
--gtest_output=xml:${INSTALL_TEST_DIR}/TEST-LegacyTransformations.xml
- name: Inference Engine 1.0 unit tests
if: fromJSON(inputs.affected-components).GNA.test &&
(runner.os != 'macOS' && runner.arch != 'ARM64')
run: |
source ${INSTALL_DIR}/setupvars.sh
${INSTALL_TEST_DIR}/InferenceEngineUnitTests --gtest_print_time=1 \
--gtest_output=xml:${INSTALL_TEST_DIR}/TEST-InferenceEngineUnitTests.xml
- name: Common test utils tests
run: |
source ${INSTALL_DIR}/setupvars.sh
${INSTALL_TEST_DIR}/ov_util_tests --gtest_print_time=1 \
--gtest_output=xml:${INSTALL_TEST_DIR}/TEST-CommonUtilTests.xml
- name: Snippets func tests
if: fromJSON(inputs.affected-components).CPU.test
run: |
source ${INSTALL_DIR}/setupvars.sh
${INSTALL_TEST_DIR}/ov_snippets_func_tests --gtest_print_time=1 \
--gtest_output=xml:${INSTALL_TEST_DIR}/TEST-SnippetsFuncTests.xml
- name: CPU plugin unit tests
if: fromJSON(inputs.affected-components).CPU.test
run: |
source ${INSTALL_DIR}/setupvars.sh
${INSTALL_TEST_DIR}/ov_cpu_unit_tests --gtest_print_time=1 \
--gtest_output=xml:${INSTALL_TEST_DIR}/TEST-CPUUnitTests.xml
- name: ov_subgraphs_dumper_tests tests
run: |
source ${INSTALL_DIR}/setupvars.sh
${INSTALL_TEST_DIR}/ov_subgraphs_dumper_tests --gtest_print_time=1 \
--gtest_output=xml:${INSTALL_TEST_DIR}/TEST-ov_subgraphs_dumper_tests.xml
- name: Template OpImpl tests
run: |
source ${INSTALL_DIR}/setupvars.sh
${INSTALL_TEST_DIR}/ov_op_conformance_tests --gtest_print_time=1 --device=TEMPLATE --gtest_filter=*OpImpl*\
--gtest_output=xml:${INSTALL_TEST_DIR}/TEST-OpImplTests.xml
- name: AUTO unit tests
if: fromJSON(inputs.affected-components).AUTO.test
run: |
source ${INSTALL_DIR}/setupvars.sh
${INSTALL_TEST_DIR}/ov_auto_unit_tests --gtest_print_time=1 \
--gtest_output=xml:${INSTALL_TEST_DIR}/TEST-ov_auto_unit_tests.xml
- name: AUTO func Tests
if: fromJSON(inputs.affected-components).AUTO.test
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/ov_auto_func_tests --gtest_print_time=1 \
--gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-ov_auto_func_tests.xml
- name: Template plugin func tests
if: fromJSON(inputs.affected-components).TEMPLATE.test
run: |
source ${INSTALL_DIR}/setupvars.sh
${INSTALL_TEST_DIR}/ov_template_func_tests --gtest_print_time=1 \
--gtest_filter=*smoke* \
--gtest_output=xml:${INSTALL_TEST_DIR}/TEST-TemplateFuncTests.xml
- name: Inference Engine C API tests
if: fromJSON(inputs.affected-components).C_API.test
run: |
source ${INSTALL_DIR}/setupvars.sh
${INSTALL_TEST_DIR}/InferenceEngineCAPITests --gtest_print_time=1 \
--gtest_output=xml:${INSTALL_TEST_DIR}/TEST-InferenceEngineCAPITests.xml
- name: OpenVINO C API tests
if: fromJSON(inputs.affected-components).C_API.test
run: |
source ${INSTALL_DIR}/setupvars.sh
${INSTALL_TEST_DIR}/ov_capi_test --gtest_print_time=1 \
--gtest_output=xml:${INSTALL_TEST_DIR}/TEST-OpenVINOCAPITests.xml
- name: AutoBatch unit tests
if: fromJSON(inputs.affected-components).AUTO_BATCH.test
run: |
source ${INSTALL_DIR}/setupvars.sh
${INSTALL_TEST_DIR}/ov_auto_batch_unit_tests --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-ov_auto_batch_unit_tests.xml
- name: AutoBatch func tests
if: fromJSON(inputs.affected-components).AUTO_BATCH.test
run: |
source ${INSTALL_DIR}/setupvars.sh
${INSTALL_TEST_DIR}/ov_auto_batch_func_tests --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-ov_auto_batch_func_tests.xml
- name: Proxy Plugin func tests
if: fromJSON(inputs.affected-components).PROXY.test
run: |
source ${INSTALL_DIR}/setupvars.sh
${INSTALL_TEST_DIR}/ov_proxy_plugin_tests --gtest_print_time=1 --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-OVProxyTests.xml
- name: Hetero unit tests
if: fromJSON(inputs.affected-components).HETERO.test
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/ov_hetero_unit_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-OVHeteroUnitTests.xml
- name: Hetero func tests
if: fromJSON(inputs.affected-components).HETERO.test
run: |
source ${INSTALL_DIR}/setupvars.sh
${INSTALL_TEST_DIR}/ov_hetero_func_tests --gtest_print_time=1 --gtest_output=xml:${INSTALL_TEST_DIR}/TEST-OVHeteroFuncTests.xml
- name: Upload Test Results
uses: actions/upload-artifact@v3
if: ${{ !cancelled() }}
with:
name: test-results-cpp
path: ${{ env.INSTALL_TEST_DIR }}/TEST*.xml
if-no-files-found: 'warn'

View File

@@ -0,0 +1,83 @@
name: Debian Packages
on:
workflow_call:
inputs:
runner:
description: 'Machine on which the tests would run'
type: string
required: true
image:
description: 'Docker image in which the tests would run'
type: string
required: false
default: null
jobs:
Debian_Packages:
name: Debian Packages
runs-on: ${{ inputs.runner }}
container:
image: ${{ inputs.image }}
defaults:
run:
shell: bash
env:
DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input
DEBIAN_PACKAGES_DIR: ${{ github.workspace }}/packages
steps:
- name: Download OpenVINO debian packages
uses: actions/download-artifact@v4
with:
name: openvino_debian_packages
path: ${{ env.DEBIAN_PACKAGES_DIR }}
# Needed as ${{ github.workspace }} is not working correctly when using Docker
- name: Setup Variables
run: echo "DEBIAN_PACKAGES_DIR=$GITHUB_WORKSPACE/packages" >> "$GITHUB_ENV"
- name: Install debian packages & check conflicts
run: |
apt-get update -y
if [[ "${{ runner.arch }}" == "X64" ]]; then
# Install debian packages from previous release
apt-get install --no-install-recommends -y gnupg wget ca-certificates
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
echo "deb https://apt.repos.intel.com/openvino/2023 ubuntu20 main" | tee /etc/apt/sources.list.d/intel-openvino-2023.list
apt-get update -y
apt-get install -y openvino
fi
# install our local one and make sure the conflicts are resolved
apt-get install --no-install-recommends -y dpkg-dev
dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
echo "deb [trusted=yes] file:${DEBIAN_PACKAGES_DIR} ./" | tee /etc/apt/sources.list.d/openvino-local.list
apt-get update -y
apt-get install openvino -y
working-directory: ${{ env.DEBIAN_PACKAGES_DIR }}
- name: Test debian packages
run: |
/usr/share/openvino/samples/cpp/build_samples.sh
/usr/share/openvino/samples/c/build_samples.sh
[[ "${{ runner.arch }}" == "X64" ]] && path_by_arch="intel64" || path_by_arch="aarch64"
~/openvino_cpp_samples_build/$path_by_arch/Release/hello_query_device
python3 /usr/share/openvino/samples/python/hello_query_device/hello_query_device.py
python3 -c 'from openvino import Core; Core().get_property("CPU", "AVAILABLE_DEVICES")'
if [[ "${{ runner.arch }}" == "X64" ]]; then
python3 -c 'from openvino import Core; Core().get_property("GPU", "AVAILABLE_DEVICES")'
fi
python3 -c 'from openvino import Core; Core().get_property("AUTO", "SUPPORTED_METRICS")'
python3 -c 'from openvino import Core; Core().get_property("MULTI", "SUPPORTED_METRICS")'
python3 -c 'from openvino import Core; Core().get_property("HETERO", "SUPPORTED_METRICS")'
python3 -c 'from openvino import Core; Core().get_property("BATCH", "SUPPORTED_METRICS")'
python3 -c 'from openvino.frontend import FrontEndManager; assert len(FrontEndManager().get_available_front_ends()) == 6'
benchmark_app --help
ovc --help

157
.github/workflows/job_onnx_runtime.yml vendored Normal file
View File

@@ -0,0 +1,157 @@
name: ONNX Runtime Integration
on:
workflow_call:
inputs:
runner:
description: 'Machine on which the tests would run'
type: string
required: true
container:
description: 'JSON to be converted to the value of the "container" configuration for the job'
type: string
required: false
default: '{"image": null}'
sccache-azure-key-prefix:
description: 'Key prefix for the cache folder on the Azure'
type: string
required: true
jobs:
ONNX_Runtime:
name: ONNX Runtime Integration
timeout-minutes: 60
runs-on: ${{ inputs.runner }}
container: ${{ fromJSON(inputs.container) }}
defaults:
run:
shell: bash
env:
DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input
OPENVINO_REPO: ${{ github.workspace }}/openvino
INSTALL_DIR: ${{ github.workspace }}/install
CMAKE_GENERATOR: 'Ninja Multi-Config'
CMAKE_CXX_COMPILER_LAUNCHER: sccache
CMAKE_C_COMPILER_LAUNCHER: sccache
SCCACHE_AZURE_KEY_PREFIX: ${{ inputs.sccache-azure-key-prefix }}
ONNX_RUNTIME_REPO: ${{ github.workspace }}/onnxruntime
ONNX_RUNTIME_UTILS: ${{ github.workspace }}/install/onnxruntime
ONNX_RUNTIME_BUILD_DIR: ${{ github.workspace }}/onnxruntime/build
steps:
- name: Download OpenVINO package
uses: actions/download-artifact@v4
with:
name: openvino_package
path: ${{ env.INSTALL_DIR }}
# Needed as ${{ github.workspace }} is not working correctly when using Docker
- name: Setup Variables
run: |
echo "OPENVINO_REPO=$GITHUB_WORKSPACE/openvino" >> "$GITHUB_ENV"
echo "INSTALL_DIR=$GITHUB_WORKSPACE/install" >> "$GITHUB_ENV"
echo "ONNX_RUNTIME_REPO=$GITHUB_WORKSPACE/onnxruntime" >> "$GITHUB_ENV"
echo "ONNX_RUNTIME_UTILS=$GITHUB_WORKSPACE/install/onnxruntime" >> "$GITHUB_ENV"
echo "ONNX_RUNTIME_BUILD_DIR=$GITHUB_WORKSPACE/onnxruntime/build" >> "$GITHUB_ENV"
- name: Fetch install_build_dependencies.sh and setup_python action
uses: actions/checkout@v4
with:
sparse-checkout: |
install_build_dependencies.sh
.github/actions/setup_python/action.yml
sparse-checkout-cone-mode: false
path: 'openvino'
- name: Install git
run: |
apt-get update
apt-get install --assume-yes --no-install-recommends git ca-certificates
- name: Setup Python ${{ env.PYTHON_VERSION }}
uses: ./openvino/.github/actions/setup_python
with:
version: '3.11'
should-setup-pip-paths: 'false'
- name: Extract OpenVINO package
run: |
pushd ${INSTALL_DIR}
tar -xzf openvino_package.tar.gz -C ${INSTALL_DIR}
popd
- name: Install OpenVINO dependencies
run: ${INSTALL_DIR}/install_dependencies/install_openvino_dependencies.sh -c=core -c=dev -y
- name: Clone ONNX Runtime
run: |
branch=`tr -s '\n ' < ${ONNX_RUNTIME_UTILS}/version`
git clone --branch $branch --single-branch --recursive https://github.com/microsoft/onnxruntime.git ${ONNX_RUNTIME_REPO}
#
# Tests
#
- name: Install Build Dependencies
run: bash ${OPENVINO_REPO}/install_build_dependencies.sh
- name: Install sccache
uses: mozilla-actions/sccache-action@v0.0.3
with:
version: "v0.5.4"
- name: Build Lin ONNX Runtime
run: |
source ${INSTALL_DIR}/setupvars.sh
${ONNX_RUNTIME_REPO}/build.sh \
--config RelWithDebInfo \
--use_openvino CPU_FP32 \
--build_shared_lib \
--parallel \
--skip_tests \
--compile_no_warning_as_error \
--build_dir ${ONNX_RUNTIME_BUILD_DIR}
env:
CXXFLAGS: "-Wno-error=deprecated-declarations"
- name: Show sccache stats
run: ${SCCACHE_PATH} --show-stats
- name: Run onnxruntime_test_all
if: ${{ runner.arch != 'ARM64' }} # Ticket: 126277
run: |
source ${INSTALL_DIR}/setupvars.sh
skip_tests=$(tr -s '\n ' ':' < ${ONNX_RUNTIME_UTILS}/skip_tests)
./onnxruntime_test_all --gtest_filter=-$skip_tests
working-directory: ${{ env.ONNX_RUNTIME_BUILD_DIR }}/RelWithDebInfo/RelWithDebInfo
- name: Run onnxruntime_shared_lib_test
run: |
source ${INSTALL_DIR}/setupvars.sh
./onnxruntime_shared_lib_test --gtest_filter=-CApiTest.test_custom_op_openvino_wrapper_library
working-directory: ${{ env.ONNX_RUNTIME_BUILD_DIR }}/RelWithDebInfo/RelWithDebInfo
- name: Run onnxruntime_global_thread_pools_test
run: |
source ${INSTALL_DIR}/setupvars.sh
./onnxruntime_global_thread_pools_test
working-directory: ${{ env.ONNX_RUNTIME_BUILD_DIR }}/RelWithDebInfo/RelWithDebInfo
- name: Run onnxruntime_api_tests_without_env
run: |
source ${INSTALL_DIR}/setupvars.sh
./onnxruntime_api_tests_without_env
working-directory: ${{ env.ONNX_RUNTIME_BUILD_DIR }}/RelWithDebInfo/RelWithDebInfo
- name: Run pytorch-converted tests
run: |
source ${INSTALL_DIR}/setupvars.sh
./onnx_test_runner "${ONNX_RUNTIME_REPO}/cmake/external/onnx/onnx/backend/test/data/pytorch-converted"
working-directory: ${{ env.ONNX_RUNTIME_BUILD_DIR }}/RelWithDebInfo/RelWithDebInfo
- name: Run pytorch-operator tests
run: |
source ${INSTALL_DIR}/setupvars.sh
./onnx_test_runner "${ONNX_RUNTIME_REPO}/cmake/external/onnx/onnx/backend/test/data/pytorch-operator"
working-directory: ${{ env.ONNX_RUNTIME_BUILD_DIR }}/RelWithDebInfo/RelWithDebInfo

View File

@@ -0,0 +1,323 @@
name: Python unit tests
on:
workflow_call:
inputs:
runner:
description: 'Machine on which the tests would run'
type: string
required: true
container:
description: 'JSON to be converted to the value of the "container" configuration for the job'
type: string
required: false
default: '{"image": null}'
affected-components:
description: 'Components that are affected by changes in the commit defined by the Smart CI Action'
type: string
required: true
env:
PIP_CACHE_PATH: /mount/caches/pip/linux
PYTHON_VERSION: '3.11'
jobs:
Python_Unit_Tests:
name: Python unit tests
timeout-minutes: 60
runs-on: ${{ inputs.runner }}
container: ${{ fromJSON(inputs.container) }}
defaults:
run:
shell: bash
env:
DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input
OPENVINO_REPO: ${{ github.workspace }}/openvino
INSTALL_DIR: ${{ github.workspace }}/install
INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests
LAYER_TESTS_INSTALL_DIR: ${{ github.workspace }}/install/tests/layer_tests
steps:
- name: Download OpenVINO package
uses: actions/download-artifact@v4
with:
name: openvino_package
path: ${{ env.INSTALL_DIR }}
- name: Download OpenVINO tests package
uses: actions/download-artifact@v4
with:
name: openvino_tests
path: ${{ env.INSTALL_TEST_DIR }}
# Needed as ${{ github.workspace }} is not working correctly when using Docker
- name: Setup Variables
run: |
echo "OPENVINO_REPO=$GITHUB_WORKSPACE/openvino" >> "$GITHUB_ENV"
echo "INSTALL_DIR=$GITHUB_WORKSPACE/install" >> "$GITHUB_ENV"
echo "INSTALL_TEST_DIR=$GITHUB_WORKSPACE/install/tests" >> "$GITHUB_ENV"
echo "LAYER_TESTS_INSTALL_DIR=$GITHUB_WORKSPACE/install/tests/layer_tests" >> "$GITHUB_ENV"
- name: Extract OpenVINO packages
run: |
pushd $INSTALL_DIR
tar -xzf openvino_package.tar.gz -C $INSTALL_DIR
popd
pushd $INSTALL_TEST_DIR
tar -xzf openvino_tests.tar.gz -C $INSTALL_DIR
popd
- name: Install OpenVINO dependencies (Linux)
if: runner.os == 'Linux'
run: $INSTALL_DIR/install_dependencies/install_openvino_dependencies.sh -c=core -c=dev -y
- name: Fetch setup_python action
uses: actions/checkout@v4
with:
sparse-checkout: |
.github/actions/setup_python/action.yml
sparse-checkout-cone-mode: false
path: 'openvino'
- name: Setup Python ${{ env.PYTHON_VERSION }}
uses: ./openvino/.github/actions/setup_python
with:
version: ${{ env.PYTHON_VERSION }}
pip-cache-path: ${{ runner.os == 'Linux' && env.PIP_CACHE_PATH || '' }}
should-setup-pip-paths: ${{ runner.os == 'Linux' }}
self-hosted-runner: ${{ runner.os == 'Linux' }}
#
# Tests
#
- name: Install OpenVINO Python wheels
run: |
# Install the core OV wheel
python3 -m pip install ${INSTALL_DIR}/tools/openvino-*.whl
extras_to_install="caffe,kaldi,onnx,tensorflow2,pytorch"
if [[ "${{ runner.arch }}" != "ARM64" ]]; then
extras_to_install="mxnet,$extras_to_install"
fi
# Find and install OV dev wheel
pushd ${INSTALL_DIR}/tools
ov_dev_wheel_name=$(find . -name 'openvino_dev*.whl')
python3 -m pip install $ov_dev_wheel_name[$extras_to_install]
popd
- name: Install Python API tests dependencies
run: |
# To enable pytest parallel features
python3 -m pip install pytest-xdist[psutil]
# For torchvision to OpenVINO preprocessing converter
python3 -m pip install -r ${INSTALL_TEST_DIR}/python/preprocess/torchvision/requirements.txt
# TODO: replace with Python API tests requirements
python3 -m pip install -r ${INSTALL_TEST_DIR}/mo/requirements_dev.txt
#
# Tests
#
- name: Python API 1.0 Tests
# if: fromJSON(inputs.affected-components).Python_API.test # Ticket: 127101
run: |
python3 -m pytest -s ${INSTALL_TEST_DIR}/pyngraph \
--junitxml=${INSTALL_TEST_DIR}/TEST-Pyngraph.xml \
--ignore=${INSTALL_TEST_DIR}/pyngraph/tests_compatibility/test_onnx/test_zoo_models.py \
--ignore=${INSTALL_TEST_DIR}/pyngraph/tests_compatibility/test_onnx/test_backend.py
- name: Python API 2.0 Tests
# if: ${{ fromJSON(inputs.affected-components).Python_API.test && runner.arch != 'ARM64' }} # Ticket: 126380, 127101
run: |
# for 'template' extension
export LD_LIBRARY_PATH=${INSTALL_TEST_DIR}:$LD_LIBRARY_PATH
python3 -m pytest -sv ${INSTALL_TEST_DIR}/pyopenvino \
--junitxml=${INSTALL_TEST_DIR}/TEST-Pyngraph.xml \
--ignore=${INSTALL_TEST_DIR}/pyopenvino/tests/test_utils/test_utils.py
- name: Model Optimizer unit tests
if: fromJSON(inputs.affected-components).MO.test
run: |
skip_filter=''
if [[ "${{ runner.os }}" != "Linux" ]] && [[ "${{ runner.arch }} != "ARM64" ]] || [[ "${{ runner.os }} != "macOS" ]]; then
# required for MxNet
apt-get install -y libgomp1 libquadmath0
else
# Skips under Ticket: 122666
skip_filter='--ignore-glob=**/mo/unit_tests/mo/front/mxnet/**'
fi
python3 -m pytest -s ${INSTALL_TEST_DIR}/mo/unit_tests \
--junitxml=${INSTALL_TEST_DIR}/TEST-ModelOptimizer.xml \
"$skip_filter"
- name: Python ONNX operators tests
if: fromJSON(inputs.affected-components).Python_API.test ||
fromJSON(inputs.affected-components).ONNX_FE.test && runner.os != 'macOS' # Ticket: 123325
run: |
# Skip test_onnx/test_zoo_models and test_onnx/test_backend due to long execution time - ONNX Model Zoo tests are run separately
python3 -m pytest -sv ${INSTALL_TEST_DIR}/onnx -k 'not cuda' \
--junitxml=${INSTALL_TEST_DIR}/TEST-onnx_frontend.xml \
--ignore=${INSTALL_TEST_DIR}/onnx/test_python/test_zoo_models.py
- name: OVC unit tests
if: fromJSON(inputs.affected-components).MO.test
run: python3 -m pytest -s ${INSTALL_TEST_DIR}/ovc/unit_tests --junitxml=${INSTALL_TEST_DIR}/TEST-OpenVinoConversion.xml
- name: Install Python Layer tests dependencies
run: |
# layer test requirements
python3 -m pip install -r ${LAYER_TESTS_INSTALL_DIR}/requirements.txt
- name: MO Python API Tests
if: fromJSON(inputs.affected-components).MO.test
run: |
# Import 'test_utils' installed in '<package_test>/tests/python/openvino'
export LD_LIBRARY_PATH=${PIP_INSTALL_PATH}/openvino/libs:$LD_LIBRARY_PATH
export PYTHONPATH=${INSTALL_TEST_DIR}/python
if [[ "${{ runner.os }}" == "Linux" ]] && [[ "${{ runner.arch }}" == "ARM64" ]]; then
# Find gomp lib
GOMP_LIB=$(find "${PIP_INSTALL_PATH}/torch/lib/../../torch.libs/" -name '*libgomp-*so*')
export LD_PRELOAD=${GOMP_LIB}
fi
python3 -m pytest ${LAYER_TESTS_INSTALL_DIR}/mo_python_api_tests --junitxml=${INSTALL_TEST_DIR}/TEST-test_mo_convert.xml
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP16
- name: OVC Python API Tests
if: fromJSON(inputs.affected-components).MO.test
run: |
# Import 'test_utils' installed in '<package_test>/tests/python/openvino'
export PYTHONPATH=${INSTALL_TEST_DIR}/python
export LD_LIBRARY_PATH=${PIP_INSTALL_PATH}/openvino/libs:$LD_LIBRARY_PATH
if [[ "${{ runner.os }}" == "Linux" ]] && [[ "${{ runner.arch }}" == "ARM64" ]]; then
# Find gomp lib
GOMP_LIB=$(find "${PIP_INSTALL_PATH}/torch/lib/../../torch.libs/" -name '*libgomp-*so*')
export LD_PRELOAD=${GOMP_LIB}
fi
python3 -m pytest ${LAYER_TESTS_INSTALL_DIR}/ovc_python_api_tests --junitxml=${INSTALL_TEST_DIR}/TEST-test_ovc_convert.xml
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP16
- name: Python Frontend tests
if: fromJSON(inputs.affected-components).PyTorch_FE.test ||
fromJSON(inputs.affected-components).PDPD_FE.test
run: |
# to allow 'libtest_builtin_extensions.so' to find 'libopenvino_onnx_frontend.so'
export LD_LIBRARY_PATH=${PIP_INSTALL_PATH}/openvino/libs:$LD_LIBRARY_PATH
python3 -m pytest ${LAYER_TESTS_INSTALL_DIR}/py_frontend_tests --junitxml=${INSTALL_TEST_DIR}/TEST-test_py_fontend.xml
- name: PyTorch Layer Tests
if: ${{ fromJSON(inputs.affected-components).PyTorch_FE.test && runner.arch != 'ARM64' }} # Ticket: 126287
run: python3 -m pytest ${LAYER_TESTS_INSTALL_DIR}/pytorch_tests -n logical -m precommit --junitxml=${INSTALL_TEST_DIR}/TEST-pytorch.xml
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP32
- name: PyTorch torch.compile TORCHFX Layer Tests
if: ${{ fromJSON(inputs.affected-components).PyTorch_FE.test && runner.os != 'macOS' }}
run: |
python3 -m pytest ${LAYER_TESTS_INSTALL_DIR}/pytorch_tests -m precommit_fx_backend --junitxml=${INSTALL_TEST_DIR}/TEST-pytorch.xml
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP32
PYTORCH_TRACING_MODE: TORCHFX
- name: PyTorch torch.compile TORCHSCRIPT Layer Tests
if: ${{ fromJSON(inputs.affected-components).PyTorch_FE.test && runner.os != 'macOS' }}
run: |
python3 -m pytest ${LAYER_TESTS_INSTALL_DIR}/pytorch_tests -m precommit_ts_backend --junitxml=${INSTALL_TEST_DIR}/TEST-pytorch.xml
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP32
PYTORCH_TRACING_MODE: TORCHSCRIPT
- name: ONNX Layer Tests
if: fromJSON(inputs.affected-components).ONNX_FE.test
run: |
# requires 'unit_tests' from 'tools/mo'
export PYTHONPATH=${INSTALL_TEST_DIR}/mo:$PYTHONPATH
python3 -m pytest ${LAYER_TESTS_INSTALL_DIR}/onnx_tests -m "not launch_only_if_manually_specified and precommit" --junitxml=${INSTALL_TEST_DIR}/TEST-onnx.xml
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP16
- name: TensorFlow 1 Layer Tests - TF FE
if: fromJSON(inputs.affected-components).TF_FE.test
run: |
# requires 'unit_tests' from 'mo'
export PYTHONPATH=${INSTALL_TEST_DIR}/mo
python3 -m pytest ${LAYER_TESTS_INSTALL_DIR}/tensorflow_tests/ --use_new_frontend -m precommit_tf_fe --junitxml=${INSTALL_TEST_DIR}/TEST-tf_fe.xml
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP16
- name: TensorFlow 2 Layer Tests - TF FE
if: fromJSON(inputs.affected-components).TF_FE.test && runner.os != 'macOS' # Ticket: 123322
run: |
# requires 'unit_tests' from 'mo'
export PYTHONPATH=${INSTALL_TEST_DIR}/mo
python3 -m pytest ${LAYER_TESTS_INSTALL_DIR}/tensorflow2_keras_tests/ --use_new_frontend -m precommit_tf_fe --junitxml=${INSTALL_TEST_DIR}/TEST-tf2_fe.xml
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP16
- name: JAX Layer Tests - TF FE
if: ${{ fromJSON(inputs.affected-components).TF_FE.test && runner.arch != 'ARM64' }}
run: python3 -m pytest ${LAYER_TESTS_INSTALL_DIR}/jax_tests/ -m precommit --junitxml=${INSTALL_TEST_DIR}/TEST-jax.xml
env:
TEST_DEVICE: CPU
- name: TensorFlow 1 Layer Tests - Legacy FE
if: fromJSON(inputs.affected-components).TF_FE.test
run: python3 -m pytest ${LAYER_TESTS_INSTALL_DIR}/tensorflow_tests/test_tf_Roll.py --ir_version=10 --junitxml=${INSTALL_TEST_DIR}/TEST-tf_Roll.xml
- name: TensorFlow 2 Layer Tests - Legacy FE
if: fromJSON(inputs.affected-components).TF_FE.test
run: python3 -m pytest ${LAYER_TESTS_INSTALL_DIR}/tensorflow2_keras_tests/test_tf2_keras_activation.py --ir_version=11 -k "sigmoid" --junitxml=${INSTALL_TEST_DIR}/TEST-tf2_Activation.xml
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP16
- name: TensorFlow Lite Layer Tests - TFL FE
if: fromJSON(inputs.affected-components).TFL_FE.test
run: python3 -m pytest ${LAYER_TESTS_INSTALL_DIR}/tensorflow_lite_tests/ --junitxml=${INSTALL_TEST_DIR}/TEST-tfl_fe.xml
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP16
- name: Clone API snippets
if: runner.os != 'macOS'
uses: actions/checkout@v4
with:
sparse-checkout: openvino/docs/snippets
path: ${{ env.OPENVINO_REPO }}
submodules: 'false'
- name: Docs Python snippets
if: runner.os != 'macOS'
run: |
# to find 'snippets' module in docs
export PYTHONPATH=${OPENVINO_REPO}/docs
# for 'template' extension
export LD_LIBRARY_PATH=${INSTALL_TEST_DIR}:$LD_LIBRARY_PATH
python3 ${OPENVINO_REPO}/docs/snippets/main.py
- name: Upload Test Results
uses: actions/upload-artifact@v3
if: ${{ !cancelled() }}
with:
name: test-results-python
path: |
${{ env.INSTALL_TEST_DIR }}/TEST*.html
${{ env.INSTALL_TEST_DIR }}/TEST*.xml
if-no-files-found: 'warn'

View File

@@ -0,0 +1,132 @@
name: PyTorch Models tests
on:
workflow_call:
inputs:
runner:
description: 'Machine on which the tests would run'
type: string
required: true
container:
description: 'JSON to be converted to the value of the "container" configuration for the job'
type: string
required: false
default: '{"image": null}'
event:
description: 'Event that triggered the workflow. E.g., "schedule" for nightly runs'
type: string
required: true
jobs:
PyTorch_Models_Tests:
name: PyTorch Models tests
timeout-minutes: ${{ inputs.event == 'schedule' && 400 || 30 }}
runs-on: ${{ inputs.runner }}
container: ${{ fromJSON(inputs.container) }}
defaults:
run:
shell: bash
env:
DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input
OPENVINO_REPO: ${{ github.workspace }}/openvino
INSTALL_DIR: ${{ github.workspace }}/install
INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests
MODEL_HUB_TESTS_INSTALL_DIR: ${{ github.workspace }}/install/tests/model_hub_tests
steps:
- name: Check sudo
if: ${{ runner.os == 'Linux' }}
run: if [ "$(id -u)" -eq 0 ]; then apt update && apt --assume-yes install sudo; fi
- name: Download OpenVINO package
uses: actions/download-artifact@v4
with:
name: openvino_package
path: ${{ env.INSTALL_DIR }}
- name: Download OpenVINO tests package
uses: actions/download-artifact@v4
with:
name: openvino_tests
path: ${{ env.INSTALL_TEST_DIR }}
# Needed as ${{ github.workspace }} is not working correctly when using Docker
- name: Setup Variables
run: |
echo "OPENVINO_REPO=$GITHUB_WORKSPACE/openvino" >> "$GITHUB_ENV"
echo "INSTALL_DIR=$GITHUB_WORKSPACE/install" >> "$GITHUB_ENV"
echo "INSTALL_TEST_DIR=$GITHUB_WORKSPACE/install/tests" >> "$GITHUB_ENV"
echo "MODEL_HUB_TESTS_INSTALL_DIR=$GITHUB_WORKSPACE/install/tests/model_hub_tests" >> "$GITHUB_ENV"
- name: Extract OpenVINO packages
run: |
pushd ${INSTALL_DIR}
tar -xzf openvino_package.tar.gz -C ${INSTALL_DIR}
popd
pushd ${INSTALL_TEST_DIR}
tar -xzf openvino_tests.tar.gz -C ${INSTALL_DIR}
popd
- name: Fetch setup_python action
uses: actions/checkout@v4
with:
sparse-checkout: |
.github/actions/setup_python/action.yml
sparse-checkout-cone-mode: false
path: 'openvino'
- name: Install dependencies
if: ${{ runner.os == 'Linux' }}
run: |
# install git (required to build pip deps from the sources)
# install 'g++' to build 'detectron2' and 'natten' wheels
sudo apt-get install --assume-yes --no-install-recommends g++ git ca-certificates
- name: Setup Python 3.11
uses: ./openvino/.github/actions/setup_python
with:
version: '3.11'
should-setup-pip-paths: 'false'
self-hosted-runner: ${{ contains(inputs.runner, 'aks') }}
- name: Install OpenVINO Python wheels
run: python3 -m pip install ${INSTALL_DIR}/tools/openvino-*
- name: Install PyTorch tests requirements
run: |
python3 -m pip install -r ${MODEL_HUB_TESTS_INSTALL_DIR}/torch_tests/requirements.txt
python3 -m pip install -r ${MODEL_HUB_TESTS_INSTALL_DIR}/torch_tests/requirements_secondary.txt
echo "Available storage:"
df -h
env:
CPLUS_INCLUDE_PATH: ${{ env.Python_ROOT_DIR }}/include/python${{ env.PYTHON_VERSION }}
- name: PyTorch Models Tests
run: |
export PYTHONPATH=${MODEL_HUB_TESTS_INSTALL_DIR}:$PYTHONPATH
python3 -m pytest ${MODEL_HUB_TESTS_INSTALL_DIR}/torch_tests -m ${TYPE} --html=${INSTALL_TEST_DIR}/TEST-torch_model_tests.html --self-contained-html -v
env:
TYPE: ${{ inputs.event == 'schedule' && 'nightly' || 'precommit'}}
TEST_DEVICE: CPU
USE_SYSTEM_CACHE: False
OP_REPORT_FILE: ${{ env.INSTALL_TEST_DIR }}/TEST-torch_unsupported_ops.log
- name: Reformat unsupported ops file
if: '!cancelled()'
run: |
python3 ${MODEL_HUB_TESTS_INSTALL_DIR}/torch_tests/scripts/process_op_report.py ${INSTALL_TEST_DIR}/TEST-torch_unsupported_ops.log
- name: Available storage after tests
run: |
echo "Available storage:"
df -h
- name: Upload Test Results
uses: actions/upload-artifact@v3
if: ${{ !cancelled() }}
with:
name: test-results-torch-models
path: |
${{ env.INSTALL_TEST_DIR }}/TEST-torch*
if-no-files-found: 'error'

132
.github/workflows/job_samples_tests.yml vendored Normal file
View File

@@ -0,0 +1,132 @@
name: Samples
on:
workflow_call:
inputs:
runner:
description: 'Machine on which the tests would run'
type: string
required: true
image:
description: 'Docker image in which the tests would run'
type: string
required: false
default: null
affected-components:
description: 'Components that are affected by changes in the commit defined by the Smart CI Action'
type: string
required: true
jobs:
Samples:
runs-on: ${{ inputs.runner }}
container:
image: ${{ inputs.image }}
defaults:
run:
shell: bash
env:
DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input
INSTALL_DIR: ${{ github.workspace }}/install
INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests
BUILD_DIR: ${{ github.workspace }}/build
steps:
- name: Download OpenVINO package
uses: actions/download-artifact@v4
with:
name: openvino_package
path: ${{ env.INSTALL_DIR }}
- name: Download OpenVINO tests package
uses: actions/download-artifact@v4
with:
name: openvino_tests
path: ${{ env.INSTALL_TEST_DIR }}
# Needed as ${{ github.workspace }} is not working correctly when using Docker
- name: Setup Variables
run: |
echo "INSTALL_DIR=$GITHUB_WORKSPACE/install" >> "$GITHUB_ENV"
echo "INSTALL_TEST_DIR=$GITHUB_WORKSPACE/install/tests" >> "$GITHUB_ENV"
echo "BUILD_DIR=$GITHUB_WORKSPACE/build" >> "$GITHUB_ENV"
- name: Extract OpenVINO packages
run: |
pushd $INSTALL_DIR
tar -xzf openvino_package.tar.gz -C $INSTALL_DIR
popd
pushd $INSTALL_TEST_DIR
tar -xzf openvino_tests.tar.gz -C $INSTALL_DIR
popd
- name: Install OpenVINO dependencies (Linux)
if: runner.os == 'Linux'
run: $INSTALL_DIR/install_dependencies/install_openvino_dependencies.sh -c=core -c=dev -y
- name: Install OpenVINO dependencies (mac)
if: runner.os == 'macOS'
run: brew install coreutils
- name: Fetch setup_python action
uses: actions/checkout@v4
with:
sparse-checkout: |
.github/actions/setup_python/action.yml
sparse-checkout-cone-mode: false
path: 'openvino'
- name: Setup Python 3.11
uses: ./openvino/.github/actions/setup_python
with:
version: '3.11'
should-setup-pip-paths: 'false'
self-hosted-runner: ${{ runner.os == 'Linux' }}
- name: Build cpp samples - GCC
run: $INSTALL_DIR/samples/cpp/build_samples.sh -i $INSTALL_DIR -b $BUILD_DIR/cpp_samples
env:
CMAKE_COMPILE_WARNING_AS_ERROR: 'ON'
- name: Build cpp samples - Clang
if: runner.os == 'Linux'
run: |
apt-get install -y clang
$INSTALL_DIR/samples/cpp/build_samples.sh -i $INSTALL_DIR -b $BUILD_DIR/cpp_samples_clang
env:
CMAKE_COMPILE_WARNING_AS_ERROR: 'ON'
CC: clang
CXX: clang++
- name: Build c samples
run: $INSTALL_DIR/samples/c/build_samples.sh -i $INSTALL_DIR -b $BUILD_DIR/c_samples
env:
CMAKE_COMPILE_WARNING_AS_ERROR: 'ON'
#
# Tests
#
- name: Samples tests
if: fromJSON(inputs.affected-components).samples.test
run: |
export WORKSPACE=$INSTALL_DIR
export IE_APP_PATH=$INSTALL_DIR/samples_bin
export IE_APP_PYTHON_PATH=$INSTALL_DIR/samples/python
export SHARE=$INSTALL_TEST_DIR/smoke_tests/samples_smoke_tests_data
python3 -m pip install --ignore-installed PyYAML -r $INSTALL_TEST_DIR/smoke_tests/requirements.txt
export LD_LIBRARY_PATH=${IE_APP_PATH}:$LD_LIBRARY_PATH
source ${INSTALL_DIR}/setupvars.sh
python3 -m pytest -sv $INSTALL_TEST_DIR/smoke_tests \
--env_conf $INSTALL_TEST_DIR/smoke_tests/env_config.yml \
--junitxml=$INSTALL_TEST_DIR/TEST-SamplesSmokeTests.xml
- name: Upload Test Results
uses: actions/upload-artifact@v3
if: ${{ !cancelled() }}
with:
name: test-results-samples
path: ${{ env.INSTALL_TEST_DIR }}/TEST*.xml
if-no-files-found: 'warn'

View File

@@ -0,0 +1,113 @@
name: TensorFlow Hub Models tests
on:
workflow_call:
inputs:
runner:
description: 'Machine on which the tests would run'
type: string
required: true
container:
description: 'JSON to be converted to the value of the "container" configuration for the job'
type: string
required: false
default: '{"image": null}'
event:
description: 'Event that triggered the workflow. E.g., "schedule" for nightly runs'
type: string
required: true
jobs:
TensorFlow_Hub_Models_Tests:
name: TensorFlow Hub Models tests
timeout-minutes: ${{ inputs.event == 'schedule' && 400 || 25 }}
runs-on: ${{ inputs.runner }}
container: ${{ fromJSON(inputs.container) }}
defaults:
run:
shell: bash
env:
DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input
OPENVINO_REPO: ${{ github.workspace }}/openvino
INSTALL_DIR: ${{ github.workspace }}/install
INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests
MODEL_HUB_TESTS_INSTALL_DIR: ${{ github.workspace }}/install/tests/model_hub_tests
steps:
- name: Check sudo
if: ${{ runner.os == 'Linux' }}
run: if [ "$(id -u)" -eq 0 ]; then apt update && apt --assume-yes install sudo; fi
- name: Download OpenVINO package
uses: actions/download-artifact@v4
with:
name: openvino_package
path: ${{ env.INSTALL_DIR }}
- name: Download OpenVINO tests package
uses: actions/download-artifact@v4
with:
name: openvino_tests
path: ${{ env.INSTALL_TEST_DIR }}
# Needed as ${{ github.workspace }} is not working correctly when using Docker
- name: Setup Variables
run: |
echo "OPENVINO_REPO=$GITHUB_WORKSPACE/openvino" >> "$GITHUB_ENV"
echo "INSTALL_DIR=$GITHUB_WORKSPACE/install" >> "$GITHUB_ENV"
echo "INSTALL_TEST_DIR=$GITHUB_WORKSPACE/install/tests" >> "$GITHUB_ENV"
echo "MODEL_HUB_TESTS_INSTALL_DIR=$GITHUB_WORKSPACE/install/tests/model_hub_tests" >> "$GITHUB_ENV"
- name: Extract OpenVINO packages
run: |
pushd ${INSTALL_DIR}
tar -xzf openvino_package.tar.gz -C ${INSTALL_DIR}
popd
pushd ${INSTALL_TEST_DIR}
tar -xzf openvino_tests.tar.gz -C ${INSTALL_DIR}
popd
- name: Fetch setup_python action
uses: actions/checkout@v4
with:
sparse-checkout: |
.github/actions/setup_python/action.yml
sparse-checkout-cone-mode: false
path: 'openvino'
- name: Install dependencies
if: ${{ runner.os == 'Linux' }}
run: |
# install git (required to build pip deps from the sources)
sudo apt-get install --assume-yes --no-install-recommends g++ git ca-certificates
- name: Setup Python 3.11
uses: ./openvino/.github/actions/setup_python
with:
version: '3.11'
should-setup-pip-paths: 'false'
self-hosted-runner: ${{ contains(inputs.runner, 'aks') }}
- name: Install OpenVINO Python wheels
run: python3 -m pip install ${INSTALL_DIR}/tools/openvino-*
- name: Install TF Hub tests requirements
run: python3 -m pip install -r ${MODEL_HUB_TESTS_INSTALL_DIR}/tf_hub_tests/requirements.txt
- name: TensorFlow Hub Tests - TF FE
run: |
export PYTHONPATH=${MODEL_HUB_TESTS_INSTALL_DIR}:$PYTHONPATH
python3 -m pytest ${MODEL_HUB_TESTS_INSTALL_DIR}/tf_hub_tests/ -m ${TYPE} --html=${INSTALL_TEST_DIR}/TEST-tf_hub_tf_fe.html --self-contained-html -v
env:
TYPE: ${{ inputs.event == 'schedule' && 'nightly' || 'precommit'}}
TEST_DEVICE: CPU
- name: Upload Test Results
uses: actions/upload-artifact@v3
if: ${{ !cancelled() }}
with:
name: test-results-tensorflow-hub-models
path: |
${{ env.INSTALL_TEST_DIR }}/TEST*.html
if-no-files-found: 'error'

View File

@@ -9,8 +9,10 @@ jobs:
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
- uses: akladiev/labeler@v4.3.1
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: '.github/labeler.yml'
sync-labels: 'true'
dot: 'true'
non-matching-label: 'no-match-files'

File diff suppressed because it is too large Load Diff

361
.github/workflows/linux_arm64.yml vendored Normal file
View File

@@ -0,0 +1,361 @@
name: Linux ARM64 (Ubuntu 20.04, Python 3.11)
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
- 'releases/**'
concurrency:
# github.ref is not unique in post-commit
group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-linux-arm
cancel-in-progress: true
env:
PIP_CACHE_PATH: /mount/caches/pip/linux
PYTHON_VERSION: '3.11'
jobs:
Smart_CI:
runs-on: ubuntu-latest
outputs:
affected_components: "${{ steps.smart_ci.outputs.affected_components }}"
steps:
- name: checkout action
uses: actions/checkout@v4
with:
sparse-checkout: .github/actions/smart-ci
- name: Get affected components
id: smart_ci
uses: ./.github/actions/smart-ci
with:
repository: ${{ github.repository }}
pr: ${{ github.event.number }}
commit_sha: ${{ github.sha }}
component_pattern: "category: (.*)"
repo_token: ${{ secrets.GITHUB_TOKEN }}
- name: Show affected components
run: |
echo "${{ toJSON(steps.smart_ci.outputs.affected_components) }}"
shell: bash
Build:
needs: Smart_CI
timeout-minutes: 150
defaults:
run:
shell: bash
runs-on: 'aks-linux-16-cores-arm'
container:
image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04
volumes:
- /mount:/mount
options: -e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING
env:
DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input
CMAKE_BUILD_TYPE: 'Release'
CMAKE_GENERATOR: 'Ninja Multi-Config'
CMAKE_CXX_COMPILER_LAUNCHER: sccache
CMAKE_C_COMPILER_LAUNCHER: sccache
GITHUB_WORKSPACE: '/__w/openvino/openvino'
OPENVINO_REPO: /__w/openvino/openvino/openvino
OPENVINO_CONTRIB_REPO: /__w/openvino/openvino/openvino_contrib
INSTALL_DIR: /__w/openvino/openvino/openvino_install
INSTALL_TEST_DIR: /__w/openvino/openvino/tests_install
DEVELOPER_PACKAGE_DIR: /__w/openvino/openvino/developer_package_install
BUILD_DIR: /__w/openvino/openvino/openvino_build
SCCACHE_AZURE_KEY_PREFIX: 'ubuntu20_aarch64_Release'
ONNX_RUNTIME_UTILS: /__w/openvino/openvino/openvino/.ci/azure/ci_utils/onnxruntime
if: "!fromJSON(needs.smart_ci.outputs.affected_components).docs_only"
steps:
- name: Install git
run: apt-get update && apt-get install --assume-yes --no-install-recommends git ca-certificates
- name: Clone OpenVINO
uses: actions/checkout@v4
with:
path: ${{ env.OPENVINO_REPO }}
submodules: 'true'
- name: Clone OpenVINO Contrib
uses: actions/checkout@v4
with:
repository: 'openvinotoolkit/openvino_contrib'
path: ${{ env.OPENVINO_CONTRIB_REPO }}
submodules: 'true'
ref: 'master'
#
# Print system info
#
- name: System info
uses: ./openvino/.github/actions/system_info
#
# Dependencies
#
- name: Install build dependencies
run: |
bash ${OPENVINO_REPO}/install_build_dependencies.sh
# default-jdk - Java API
apt install --assume-yes --no-install-recommends default-jdk
- name: Install sccache
uses: mozilla-actions/sccache-action@v0.0.3
with:
version: "v0.5.4"
- name: Setup Python ${{ env.PYTHON_VERSION }}
uses: ./openvino/.github/actions/setup_python
with:
version: ${{ env.PYTHON_VERSION }}
pip-cache-path: ${{ env.PIP_CACHE_PATH }}
should-setup-pip-paths: 'true'
show-cache-info: 'true'
- name: Install python dependencies
run: |
# For Python API: build and wheel packaging
python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/wheel/requirements-dev.txt
python3 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/src/compatibility/openvino/requirements-dev.txt
# For running ONNX frontend unit tests
python3 -m pip install --force-reinstall -r ${OPENVINO_REPO}/src/frontends/onnx/tests/requirements.txt
# For running TensorFlow frontend unit tests
python3 -m pip install -r ${OPENVINO_REPO}/src/frontends/tensorflow/tests/requirements.txt
# For running TensorFlow Lite frontend unit tests
python3 -m pip install -r ${OPENVINO_REPO}/src/frontends/tensorflow_lite/tests/requirements.txt
# For running Paddle frontend unit tests
python3 -m pip install -r ${OPENVINO_REPO}/src/frontends/paddle/tests/requirements.txt
#
# Build
#
- name: CMake configure - OpenVINO
run: |
cmake \
-G "${{ env.CMAKE_GENERATOR }}" \
-DENABLE_CPPLINT=OFF \
-DENABLE_NCC_STYLE=OFF \
-DENABLE_TESTS=ON \
-DENABLE_STRICT_DEPENDENCIES=OFF \
-DENABLE_SYSTEM_TBB=OFF \
-DENABLE_SYSTEM_OPENCL=ON \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCPACK_GENERATOR=TGZ \
-DCMAKE_COMPILE_WARNING_AS_ERROR=ON \
-DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CMAKE_CXX_COMPILER_LAUNCHER }} \
-DCMAKE_C_COMPILER_LAUNCHER=${{ env.CMAKE_C_COMPILER_LAUNCHER }} \
-S ${OPENVINO_REPO} \
-B ${BUILD_DIR}
- name: Clean sccache stats
run: ${SCCACHE_PATH} --zero-stats
- name: Cmake build - OpenVINO
run: cmake --build ${BUILD_DIR} --parallel --config ${{ env.CMAKE_BUILD_TYPE }}
- name: Show sccache stats
run: ${SCCACHE_PATH} --show-stats
- name: Cmake install - OpenVINO
run: |
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -P ${BUILD_DIR}/cmake_install.cmake
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_TEST_DIR} -DCOMPONENT=tests -P ${BUILD_DIR}/cmake_install.cmake
cmake -DCMAKE_INSTALL_PREFIX=${DEVELOPER_PACKAGE_DIR} -DCOMPONENT=developer_package -P ${BUILD_DIR}/cmake_install.cmake
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -DCOMPONENT=python_wheels -P ${BUILD_DIR}/cmake_install.cmake
- name: Pack Artifacts
run: |
# Add the ONNX Runtime version and skip tests list to the archive to use in the ONNX Runtime Job
# w/o the need to checkout repository
cp -R ${ONNX_RUNTIME_UTILS} ${INSTALL_DIR}
pushd ${INSTALL_DIR}
tar -czvf ${BUILD_DIR}/openvino_package.tar.gz *
popd
pushd ${DEVELOPER_PACKAGE_DIR}
tar -czvf ${BUILD_DIR}/openvino_developer_package.tar.gz *
popd
pushd ${INSTALL_TEST_DIR}
tar -czvf ${BUILD_DIR}/openvino_tests.tar.gz *
popd
- name: Build Debian packages
if: ${{ 'false' }}
run: |
/usr/bin/python3.8 -m pip install -U pip
/usr/bin/python3.8 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/wheel/requirements-dev.txt
/usr/bin/python3.8 -m pip install -r ${OPENVINO_REPO}/src/bindings/python/src/compatibility/openvino/requirements-dev.txt
cmake -UPYTHON* \
-DENABLE_PYTHON_PACKAGING=ON \
-DENABLE_TESTS=OFF \
-DPython3_EXECUTABLE=/usr/bin/python3.8 \
-DCPACK_GENERATOR=DEB \
${BUILD_DIR}
cmake --build ${BUILD_DIR} --parallel --config ${{ env.CMAKE_BUILD_TYPE }} --target package
- name: Cmake & Build - OpenVINO Contrib
run: |
cmake \
-DBUILD_nvidia_plugin=OFF \
-DCUSTOM_OPERATIONS="calculate_grid;complex_mul;fft;grid_sample;sparse_conv;sparse_conv_transpose" \
-DOPENVINO_EXTRA_MODULES=${OPENVINO_CONTRIB_REPO}/modules \
-S ${OPENVINO_REPO} \
-B ${BUILD_DIR}
cmake --build ${BUILD_DIR} --parallel --config ${{ env.CMAKE_BUILD_TYPE }}
#
# Upload build artifacts
#
- name: Upload openvino package
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: openvino_package
path: ${{ env.BUILD_DIR }}/openvino_package.tar.gz
if-no-files-found: 'error'
- name: Upload openvino developer package
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: openvino_developer_package
path: ${{ env.BUILD_DIR }}/openvino_developer_package.tar.gz
if-no-files-found: 'error'
- name: Upload openvino debian packages
if: ${{ 'false' }}
uses: actions/upload-artifact@v3
with:
name: openvino_debian_packages
path: ${{ env.BUILD_DIR }}/*.deb
if-no-files-found: 'error'
- name: Upload openvino tests package
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: openvino_tests
path: ${{ env.BUILD_DIR }}/openvino_tests.tar.gz
if-no-files-found: 'error'
Debian_Packages:
name: Debian Packages
needs: Build
if: ${{ 'false' }}
uses: ./.github/workflows/job_debian_packages.yml
with:
runner: 'aks-linux-16-cores-arm'
image: 'openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04'
Samples:
needs: [ Build, Smart_CI ]
if: fromJSON(needs.smart_ci.outputs.affected_components).samples
uses: ./.github/workflows/job_samples_tests.yml
with:
runner: 'aks-linux-16-cores-arm'
image: 'openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04'
affected-components: ${{ needs.smart_ci.outputs.affected_components }}
ONNX_Runtime:
name: ONNX Runtime Integration
if: fromJSON(needs.smart_ci.outputs.affected_components).ONNX_RT
needs: [ Build, Smart_CI ]
uses: ./.github/workflows/job_onnx_runtime.yml
with:
runner: 'aks-linux-16-cores-arm'
container: '{"image": "openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04", "volumes": ["/mount:/mount"], "options": "-e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING"}'
sccache-azure-key-prefix: 'ubuntu20_aarch64_onnxruntime'
CXX_Unit_Tests:
name: C++ unit tests
needs: [ Build, Smart_CI ]
uses: ./.github/workflows/job_cxx_unit_tests.yml
with:
runner: 'aks-linux-16-cores-arm'
image: 'openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04'
affected-components: ${{ needs.smart_ci.outputs.affected_components }}
Python_Unit_Tests:
name: Python unit tests
needs: [ Build, Smart_CI ]
uses: ./.github/workflows/job_python_unit_tests.yml
with:
runner: 'aks-linux-16-cores-arm'
container: '{"image": "openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04", "volumes": ["/mount:/mount"]}'
affected-components: ${{ needs.smart_ci.outputs.affected_components }}
CPU_Functional_Tests:
name: CPU functional tests
if: fromJSON(needs.smart_ci.outputs.affected_components).CPU.test
needs: [ Build, Smart_CI ]
uses: ./.github/workflows/job_cpu_functional_tests.yml
with:
runner: 'aks-linux-16-cores-arm'
image: 'openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04'
TensorFlow_Hub_Models_Tests:
name: TensorFlow Hub Models tests
if: ${{ 'false' }} # TODO: Enable once the dependencies are ready for arm (no tensorflow-text available for arm from PyPI)
# if: fromJSON(needs.smart_ci.outputs.affected_components).TF_FE.test ||
# fromJSON(needs.smart_ci.outputs.affected_components).TFL_FE.test
needs: [ Build, Smart_CI ]
uses: ./.github/workflows/job_tensorflow_hub_models_tests.yml
with:
runner: 'aks-linux-16-cores-arm'
container: '{"image": "openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04"}'
event: ${{ github.event_name }}
TensorFlow_Hub_Performance_Models_Tests:
name: TensorFlow Hub Performance Models tests
if: ${{ 'false' }} # TODO: Enable once the dependencies are ready for arm (no tensorflow-text available for arm from PyPI)
# if: fromJSON(needs.smart_ci.outputs.affected_components).TF_FE.test ||
# fromJSON(needs.smart_ci.outputs.affected_components).TFL_FE.test
needs: [ Build, Smart_CI ]
uses: ./.github/workflows/job_tensorflow_hub_performance_models_tests.yml
with:
runner: 'aks-linux-16-cores-arm'
container: '{"image": "openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04"}'
event: ${{ github.event_name }}
PyTorch_Models_Tests:
name: PyTorch Models tests
if: ${{ 'false' }} # TODO: Enable once the dependencies are ready for arm (no tensorflow-text available for arm from PyPI)
# if: fromJSON(needs.smart_ci.outputs.affected_components).PyTorch_FE.test
needs: [ Build, Smart_CI ]
uses: ./.github/workflows/job_pytorch_models_tests.yml
with:
runner: 'aks-linux-16-cores-arm'
container: '{"image": "openvinogithubactions.azurecr.io/dockerhub/ubuntu:20.04"}'
event: ${{ github.event_name }}
Overall_Status:
name: ci/gha_overall_status_linux_arm64
needs: [Smart_CI, Build, Debian_Packages, Samples, ONNX_Runtime, CXX_Unit_Tests, Python_Unit_Tests, CPU_Functional_Tests,
TensorFlow_Hub_Models_Tests, TensorFlow_Hub_Performance_Models_Tests, PyTorch_Models_Tests]
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Check status of all jobs
if: >-
${{
contains(needs.*.result, 'failure') ||
contains(needs.*.result, 'cancelled')
}}
run: exit 1

View File

@@ -2,23 +2,10 @@ name: Linux Static CC (Ubuntu 22.04, Python 3.11, Clang)
on:
workflow_dispatch:
pull_request:
paths-ignore:
- '**/docs/**'
- 'docs/**'
- '**/**.md'
- '**.md'
- '**/layer_tests_summary/**'
- '**/conformance/**'
push:
paths-ignore:
- '**/docs/**'
- 'docs/**'
- '**/**.md'
- '**.md'
- '**/layer_tests_summary/**'
- '**/conformance/**'
branches:
- master
- 'releases/**'
concurrency:
# github.ref is not unique in post-commit
@@ -30,7 +17,31 @@ env:
PYTHON_VERSION: '3.11'
jobs:
Smart_CI:
runs-on: ubuntu-latest
outputs:
affected_components: "${{ steps.smart_ci.outputs.affected_components }}"
skip_workflow: "${{ steps.smart_ci.outputs.skip_workflow }}"
steps:
- name: checkout action
uses: actions/checkout@v4
with:
sparse-checkout: .github/actions/smart-ci
- name: Get affected components
id: smart_ci
uses: ./.github/actions/smart-ci
with:
repository: ${{ github.repository }}
pr: ${{ github.event.number }}
commit_sha: ${{ github.sha }}
component_pattern: "category: (.*)"
repo_token: ${{ secrets.GITHUB_TOKEN }}
skip_when_only_listed_labels_set: 'docs'
skip_when_only_listed_files_changed: '*.md,*.rst,*.png,*.jpg,*.svg,*/layer_tests_summary/*,*/conformance/*'
Build:
needs: Smart_CI
timeout-minutes: 150
defaults:
run:
@@ -39,7 +50,7 @@ jobs:
container:
image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:22.04
volumes:
- /mount/caches:/mount/caches
- /mount:/mount
options: -e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING
env:
DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input
@@ -50,10 +61,12 @@ jobs:
GITHUB_WORKSPACE: '/__w/openvino/openvino'
OPENVINO_REPO: /__w/openvino/openvino/openvino
INSTALL_DIR: /__w/openvino/openvino/openvino_install
INSTALL_TEST_DIR: /__w/openvino/openvino/tests_install
BUILD_DIR: /__w/openvino/openvino/openvino_build
SELECTIVE_BUILD_STAT_DIR: /__w/openvino/openvino/selective_build_stat
MODELS_PATH: /__w/openvino/openvino/testdata
SCCACHE_AZURE_KEY_PREFIX: ubuntu22_x86_64_itt_clang_Release
if: "!needs.smart_ci.outputs.skip_workflow"
steps:
- name: Install git
@@ -73,7 +86,7 @@ jobs:
repository: 'openvinotoolkit/testdata'
path: ${{ env.MODELS_PATH }}
lfs: 'true'
ref: 'releases/2023/2'
ref: 'master'
#
# Print system info
@@ -100,15 +113,13 @@ jobs:
with:
version: "v0.5.4"
- uses: actions/setup-python@v4
- name: Setup Python ${{ env.PYTHON_VERSION }}
uses: ./openvino/.github/actions/setup_python
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Setup pip cache dir
run: |
PIP_VER=$(python3 -c "import pip; print(pip.__version__)")
echo "Using pip version: ${PIP_VER}"
echo "PIP_CACHE_DIR=${PIP_CACHE_PATH}/${PIP_VER}" >> $GITHUB_ENV
version: ${{ env.PYTHON_VERSION }}
pip-cache-path: ${{ env.PIP_CACHE_PATH }}
should-setup-pip-paths: 'true'
self-hosted-runner: 'true'
- name: Install python dependencies
run: |
@@ -154,7 +165,9 @@ jobs:
run: ${SCCACHE_PATH} --show-stats
- name: Cmake install - OpenVINO
run: cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -P ${BUILD_DIR}/cmake_install.cmake
run: |
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} -P ${BUILD_DIR}/cmake_install.cmake
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_TEST_DIR} -DCOMPONENT=tests -P ${BUILD_DIR}/cmake_install.cmake
- name: Build C++ samples - OpenVINO build tree
run: |
@@ -180,13 +193,26 @@ jobs:
tar -czvf ${BUILD_DIR}/openvino_selective_build_stat.tar.gz *
popd
pushd ${OPENVINO_REPO}
tar -czvf ${BUILD_DIR}/openvino_tests.tar.gz \
bin/intel64/Release/ov_cpu_func_tests \
src/tests/test_utils/functional_test_utils/layer_tests_summary/* \
scripts/install_dependencies/*
pushd ${INSTALL_DIR}
tar -czvf ${BUILD_DIR}/openvino_package.tar.gz \
install_dependencies/install_openvino_dependencies.sh
popd
pushd ${INSTALL_TEST_DIR}
tar -czvf ${BUILD_DIR}/openvino_tests.tar.gz \
tests/ov_cpu_func_tests \
tests/libtemplate_extension.so \
tests/functional_test_utils/layer_tests_summary/*
popd
- name: Upload openvino package
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: openvino_package
path: ${{ env.BUILD_DIR }}/openvino_package.tar.gz
if-no-files-found: 'error'
- name: Upload selective build statistics package
if: ${{ always() }}
uses: actions/upload-artifact@v3
@@ -214,7 +240,7 @@ jobs:
container:
image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:22.04
volumes:
- /mount/caches:/mount/caches
- /mount:/mount
options: -e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING
env:
DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input
@@ -243,10 +269,10 @@ jobs:
repository: 'openvinotoolkit/testdata'
path: ${{ env.MODELS_PATH }}
lfs: 'true'
ref: 'releases/2023/2'
ref: 'master'
- name: Download selective build statistics package
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: openvino_selective_build_stat
path: ${{ env.SELECTIVE_BUILD_STAT_DIR }}
@@ -301,65 +327,23 @@ jobs:
CPU_Functional_Tests:
name: CPU functional tests
needs: Build
timeout-minutes: 25
defaults:
run:
shell: bash
runs-on: aks-linux-8-cores-16gb
container:
image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:22.04
env:
DEBIAN_FRONTEND: noninteractive # to prevent apt-get from waiting user input
INSTALL_TEST_DIR: /__w/openvino/openvino/install/tests
PARALLEL_TEST_SCRIPT: /__w/openvino/openvino/install/tests/src/tests/test_utils/functional_test_utils/layer_tests_summary/run_parallel.py
PARALLEL_TEST_CACHE: /__w/openvino/openvino/install/tests/test_cache.lst
if: fromJSON(needs.smart_ci.outputs.affected_components).CPU.test
needs: [ Build, Smart_CI ]
uses: ./.github/workflows/job_cpu_functional_tests.yml
with:
runner: 'aks-linux-8-cores-32gb'
image: 'openvinogithubactions.azurecr.io/dockerhub/ubuntu:22.04'
Overall_Status:
name: ci/gha_overall_status_linux_cc
needs: [Smart_CI, Build, CC_Build, CPU_Functional_Tests]
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Download OpenVINO tests package
uses: actions/download-artifact@v3
with:
name: openvino_tests
path: ${{ env.INSTALL_TEST_DIR }}
- name: Extract OpenVINO tests package
run: tar -xvzf ${INSTALL_TEST_DIR}/openvino_tests.tar.gz -C ${INSTALL_TEST_DIR}
- name: Install OpenVINO dependencies
run: bash ${INSTALL_TEST_DIR}/scripts/install_dependencies/install_openvino_dependencies.sh -c=core -c=gpu -y
- name: Install 'actions/setup-python@v4' dependencies
run: apt-get install -y libssl3
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install python dependencies for run_parallel.py
run: python3 -m pip install -r ${INSTALL_TEST_DIR}/src/tests/test_utils/functional_test_utils/layer_tests_summary/requirements.txt
- name: Restore tests execution time
uses: actions/cache/restore@v3
with:
path: ${{ env.PARALLEL_TEST_CACHE }}
key: ${{ runner.os }}-tests-functional-cpu-stamp-${{ github.sha }}
restore-keys: |
${{ runner.os }}-tests-functional-cpu-stamp
- name: Intel CPU plugin func tests (parallel)
run: python3 ${PARALLEL_TEST_SCRIPT} -e ${INSTALL_TEST_DIR}/bin/intel64/Release/ov_cpu_func_tests -c ${PARALLEL_TEST_CACHE} -w ${INSTALL_TEST_DIR} -s suite -rf 0 -- --gtest_print_time=1 --gtest_filter=*smoke*
timeout-minutes: 20
- name: Upload Test Results
uses: actions/upload-artifact@v3
if: ${{ !cancelled() }}
with:
name: test-results-functional-cpu
path: |
${{ env.INSTALL_TEST_DIR }}/TEST*.xml
${{ env.INSTALL_TEST_DIR }}/logs/failed/*.log
${{ env.INSTALL_TEST_DIR }}/logs/crashed/*.log
${{ env.INSTALL_TEST_DIR }}/logs/hanged/*.log
${{ env.INSTALL_TEST_DIR }}/logs/interapted/*.log
${{ env.INSTALL_TEST_DIR }}/logs/disabled_tests.log
if-no-files-found: 'error'
- name: Check status of all jobs
if: >-
${{
contains(needs.*.result, 'failure') ||
contains(needs.*.result, 'cancelled')
}}
run: exit 1

View File

@@ -5,21 +5,7 @@ on:
- cron: '0 0 * * 3,6'
workflow_dispatch:
pull_request:
paths-ignore:
- '**/docs/**'
- 'docs/**'
- '**/**.md'
- '**.md'
- '**/layer_tests_summary/**'
- '**/conformance/**'
push:
paths-ignore:
- '**/docs/**'
- 'docs/**'
- '**/**.md'
- '**.md'
- '**/layer_tests_summary/**'
- '**/conformance/**'
branches:
- master
- 'releases/**'
@@ -30,8 +16,32 @@ concurrency:
cancel-in-progress: true
jobs:
Smart_CI:
runs-on: ubuntu-latest
outputs:
affected_components: "${{ steps.smart_ci.outputs.affected_components }}"
skip_workflow: "${{ steps.smart_ci.outputs.skip_workflow }}"
steps:
- name: checkout action
uses: actions/checkout@v4
with:
sparse-checkout: .github/actions/smart-ci
- name: Get affected components
id: smart_ci
uses: ./.github/actions/smart-ci
with:
repository: ${{ github.repository }}
pr: ${{ github.event.number }}
commit_sha: ${{ github.sha }}
component_pattern: "category: (.*)"
repo_token: ${{ secrets.GITHUB_TOKEN }}
skip_when_only_listed_labels_set: 'docs'
skip_when_only_listed_files_changed: '*.md,*.rst,*.png,*.jpg,*.svg,*/layer_tests_summary/*,*/conformance/*'
Build:
timeout-minutes: 30
needs: Smart_CI
timeout-minutes: 150
defaults:
run:
shell: bash
@@ -39,7 +49,7 @@ jobs:
container:
image: openvinogithubactions.azurecr.io/dockerhub/ubuntu:22.04
volumes:
- /mount/caches:/mount/caches
- /mount:/mount
env:
CMAKE_BUILD_TYPE: 'Release'
CMAKE_GENERATOR: 'Ninja'
@@ -48,10 +58,11 @@ jobs:
OPENVINO_REPO: /__w/openvino/openvino/openvino
OPENVINO_BUILD_DIR: /__w/openvino/openvino/openvino_build
INSTALL_DIR: /__w/openvino/openvino/openvino_install
CONAN_USER_HOME: /mount/caches/ccache/ubuntu22_riscv64_Release/.conan
CCACHE_DIR: /mount/caches/ccache/ubuntu22_riscv64_Release
CONAN_USER_HOME: /mount/caches/ccache/ubuntu22_riscv64_master_release/.conan
CCACHE_DIR: /mount/caches/ccache/ubuntu22_riscv64_master_release
CCACHE_TEMPDIR: /__w/openvino/openvino/ccache_temp
CCACHE_MAXSIZE: 50G
if: "!needs.smart_ci.outputs.skip_workflow"
steps:
- name: Install git
run: apt-get update && apt-get install --assume-yes --no-install-recommends git ca-certificates
@@ -195,3 +206,17 @@ jobs:
source ${OPENVINO_BUILD_DIR}/dependencies/deactivate_conanbuild.sh
env:
CMAKE_TOOLCHAIN_FILE: ${{ env.OPENVINO_BUILD_DIR }}/dependencies/conan_toolchain.cmake
Overall_Status:
name: ci/gha_overall_status_linux_riscv
needs: [Smart_CI, Build]
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Check status of all jobs
if: >-
${{
contains(needs.*.result, 'failure') ||
contains(needs.*.result, 'cancelled')
}}
run: exit 1

View File

@@ -33,27 +33,41 @@ env:
PYTHON_VERSION: '3.11'
jobs:
Smart_CI:
runs-on: ubuntu-latest
outputs:
affected_components: "${{ steps.smart_ci.outputs.affected_components }}"
skip_workflow: "${{ steps.smart_ci.outputs.skip_workflow }}"
steps:
- name: checkout action
uses: actions/checkout@v4
with:
sparse-checkout: .github/actions/smart-ci
- name: Get affected components
id: smart_ci
uses: ./.github/actions/smart-ci
with:
repository: ${{ github.repository }}
pr: ${{ github.event.number }}
commit_sha: ${{ github.sha }}
component_pattern: "category: (.*)"
repo_token: ${{ secrets.GITHUB_TOKEN }}
skip_when_only_listed_labels_set: 'docs'
skip_when_only_listed_files_changed: '*.md,*.rst,*.png,*.jpg,*.svg'
Build:
needs: Smart_CI
timeout-minutes: 150
defaults:
run:
shell: bash
strategy:
max-parallel: 2
fail-fast: false
matrix:
include:
- arhitecture: 'x86_64'
machine: 'macos-13-large'
macos_deployment_target: '10.12'
- arhitecture: 'arm64'
machine: 'macos-13-xlarge'
macos_deployment_target: '11.0'
runs-on: ${{ matrix.machine }}
runs-on: 'macos-13-large'
env:
CMAKE_BUILD_TYPE: 'Release'
CMAKE_GENERATOR: 'Ninja Multi-Config'
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos_deployment_target }}
MACOSX_DEPLOYMENT_TARGET: '10.12'
CMAKE_CXX_COMPILER_LAUNCHER: ccache
CMAKE_C_COMPILER_LAUNCHER: ccache
OPENVINO_REPO: ${{ github.workspace }}/openvino
@@ -88,9 +102,12 @@ jobs:
- name: Install build dependencies
run: brew install coreutils ninja scons
- uses: actions/setup-python@v4
- name: Setup Python ${{ env.PYTHON_VERSION }}
uses: ./openvino/.github/actions/setup_python
with:
python-version: ${{ env.PYTHON_VERSION }}
version: ${{ env.PYTHON_VERSION }}
should-setup-pip-paths: 'false'
self-hosted-runner: 'false'
- name: Install python dependencies
run: |
@@ -122,9 +139,9 @@ jobs:
# github.ref_name is 'ref/PR_#' in case of the PR, and 'branch_name' when executed on push
save: ${{ github.ref_name == 'master' && 'true' || 'false' }}
verbose: 2
key: ${{ runner.os }}-${{ matrix.arhitecture }}-main
key: ${{ runner.os }}-${{ runner.arch }}-main
restore-keys: |
${{ runner.os }}-${{ matrix.arhitecture }}-main
${{ runner.os }}-${{ runner.arch }}-main
- name: CMake configure
run: |
@@ -181,7 +198,7 @@ jobs:
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: openvino_package_${{ matrix.arhitecture }}
name: openvino_package
path: ${{ env.BUILD_DIR }}/openvino_package.tar.gz
if-no-files-found: 'error'
@@ -189,625 +206,39 @@ jobs:
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: openvino_tests_${{ matrix.arhitecture }}
name: openvino_tests
path: ${{ env.BUILD_DIR }}/openvino_tests.tar.gz
if-no-files-found: 'error'
Samples:
needs: Build
timeout-minutes: 5
defaults:
run:
shell: bash
strategy:
max-parallel: 2
fail-fast: false
matrix:
include:
- arhitecture: 'x86_64'
machine: 'macos-13'
- arhitecture: 'arm64'
machine: 'macos-13-xlarge'
runs-on: ${{ matrix.machine }}
env:
INSTALL_DIR: ${{ github.workspace }}/install
INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests
BUILD_DIR: ${{ github.workspace }}/build
steps:
#
# Initialize OpenVINO
#
- name: Download OpenVINO package
uses: actions/download-artifact@v3
with:
name: openvino_package_${{ matrix.arhitecture }}
path: ${{ env.INSTALL_DIR }}
- name: Download OpenVINO tests package
uses: actions/download-artifact@v3
with:
name: openvino_tests_${{ matrix.arhitecture }}
path: ${{ env.INSTALL_TEST_DIR }}
- name: Extract OpenVINO packages
run: |
pushd ${INSTALL_DIR}
tar -xzf openvino_package.tar.gz -C ${INSTALL_DIR}
popd
pushd ${INSTALL_TEST_DIR}
tar -xzf openvino_tests.tar.gz -C ${INSTALL_DIR}
popd
- name: Install dependencies
run: brew install coreutils
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Build cpp samples
run: ${INSTALL_DIR}/samples/cpp/build_samples.sh -i ${INSTALL_DIR} -b ${BUILD_DIR}/cpp_samples
env:
CMAKE_COMPILE_WARNING_AS_ERROR: 'ON'
- name: Build c samples
run: ${INSTALL_DIR}/samples/c/build_samples.sh -i ${INSTALL_DIR} -b ${BUILD_DIR}/c_samples
env:
CMAKE_COMPILE_WARNING_AS_ERROR: 'ON'
#
# Tests
#
- name: Samples tests
run: |
export WORKSPACE=${INSTALL_DIR}
export IE_APP_PATH=${INSTALL_DIR}/samples_bin
export IE_APP_PYTHON_PATH=${INSTALL_DIR}/samples/python
export SHARE=${INSTALL_TEST_DIR}/smoke_tests/samples_smoke_tests_data
python3 -m pip install --ignore-installed PyYAML -r ${INSTALL_TEST_DIR}/smoke_tests/requirements.txt
source ${INSTALL_DIR}/setupvars.sh
python3 -m pytest -sv ${INSTALL_TEST_DIR}/smoke_tests \
--env_conf ${INSTALL_TEST_DIR}/smoke_tests/env_config.yml \
--junitxml=${INSTALL_TEST_DIR}/TEST-SamplesSmokeTests.xml
- name: Upload Test Results
uses: actions/upload-artifact@v3
if: ${{ !cancelled() }}
with:
name: test-results-samples-${{ matrix.arhitecture }}
path: ${{ env.INSTALL_TEST_DIR }}/TEST*.xml
if-no-files-found: 'error'
needs: [ Build, Smart_CI ]
if: fromJSON(needs.smart_ci.outputs.affected_components).samples
uses: ./.github/workflows/job_samples_tests.yml
with:
runner: 'macos-13'
affected-components: ${{ needs.smart_ci.outputs.affected_components }}
CXX_Unit_Tests:
name: C++ Unit tests
needs: Build
timeout-minutes: 20
defaults:
run:
shell: bash
strategy:
max-parallel: 2
fail-fast: false
matrix:
include:
- arhitecture: 'x86_64'
machine: 'macos-13'
- arhitecture: 'arm64'
machine: 'macos-13-xlarge'
runs-on: ${{ matrix.machine }}
env:
INSTALL_DIR: ${{ github.workspace }}/install
INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests
steps:
#
# Dependencies
#
- name: Download OpenVINO package
uses: actions/download-artifact@v3
with:
name: openvino_package_${{ matrix.arhitecture }}
path: ${{ env.INSTALL_DIR }}
- name: Download OpenVINO tests package
uses: actions/download-artifact@v3
with:
name: openvino_tests_${{ matrix.arhitecture }}
path: ${{ env.INSTALL_TEST_DIR }}
- name: Extract OpenVINO packages
run: |
pushd ${{ env.INSTALL_DIR }}
tar -xzf openvino_package.tar.gz -C ${{ env.INSTALL_DIR }} && rm openvino_package.tar.gz || exit 1
popd
pushd ${{ env.INSTALL_TEST_DIR }}
tar -xzf openvino_tests.tar.gz -C ${{ env.INSTALL_DIR }} && rm openvino_tests.tar.gz || exit 1
popd
#
# Tests
#
- name: OpenVINO Core Unit Tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/ov_core_unit_tests --gtest_print_time=1 --gtest_filter=-*IE_GPU* \
--gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-NGraphUT.xml
- name: OpenVINO Inference Functional Tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/ov_inference_functional_tests --gtest_print_time=1 \
--gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-InferenceFunc.xml
- name: OpenVINO Inference Unit Tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/ov_inference_unit_tests --gtest_print_time=1 \
--gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-InferenceUnit.xml
- name: Low Precision Transformations Tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
# Skips under Ticket: 122660
skip_filter=${{ matrix.arhitecture == 'arm64' && '--gtest_filter=-*smoke_LPT/FoldFakeQuantizeInTransformations.CompareFunctions*' || '' }}
${{ env.INSTALL_TEST_DIR }}/ov_lp_transformations_tests --gtest_print_time=1 "$skip_filter" \
--gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-LpTransformations.xml
- name: OpenVINO Conditional compilation tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/ov_conditional_compilation_tests --gtest_print_time=1 \
--gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-ConditionalCompilation.xml
- name: IR frontend tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/ov_ir_frontend_tests --gtest_print_time=1 \
--gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-IRFrontend.xml
- name: PaddlePaddle frontend tests
if: ${{ 'false' }}
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/paddle_tests --gtest_print_time=1 --gtest_filter=*smoke* \
--gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-PaddleTests.xml
- name: ONNX frontend tests
if: ${{ matrix.arhitecture == 'x86_64' }} # Ticket for ARM64: 122663
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/ov_onnx_frontend_tests --gtest_print_time=1 --gtest_filter=-*IE_GPU* \
--gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-ONNXFrontend.xml
- name: TensorFlow Common tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/ov_tensorflow_common_tests --gtest_print_time=1 \
--gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-TensorFlowCommonFrontend.xml
- name: TensorFlow frontend tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
# Skips under Ticket: 122666
skip_filter=${{ matrix.arhitecture == 'arm64' && '--gtest_filter=-*CompileModelsTests.ModelWithSplitConvConcat*:*NgramCompilation*' || '' }}
${{ env.INSTALL_TEST_DIR }}/ov_tensorflow_frontend_tests --gtest_print_time=1 "$skip_filter" \
--gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-TensorFlowFrontend.xml
- name: TensorFlow Lite frontend tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/ov_tensorflow_lite_frontend_tests --gtest_print_time=1 \
--gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-TensorFlowLiteFrontend.xml
- name: Transformations func tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
# Skips under Ticket: 122668
skip_filter=${{ matrix.arhitecture == 'arm64' && '--gtest_filter=-*TransformationTestsF.CompressQuantizeWeights*:*TransformationTests/CompressQuantizeWeightsTests.FusionTest*' || '' }}
${{ env.INSTALL_TEST_DIR }}/ov_transformations_tests --gtest_print_time=1 "$skip_filter" \
--gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-Transformations.xml
- name: Common test utils tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/ov_util_tests --gtest_print_time=1 \
--gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-commonUtilsTests.xml
- name: Snippets func tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/ov_snippets_func_tests --gtest_print_time=1 \
--gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-SnippetsFuncTests.xml
- name: CPU plugin unit tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/ov_cpu_unit_tests --gtest_print_time=1 \
--gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-CPUUnitTests.xml
- name: SubgraphsDumper tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/subgraphsDumperTests --gtest_print_time=1 \
--gtest_output=xml:${INSTALL_TEST_DIR}/TEST-SubgraphsDumperTests.xml
- name: Template OpImpl tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/conformanceTests --gtest_print_time=1 --device=TEMPLATE --gtest_filter="*OpImpl*" \
--gtest_output=xml:${INSTALL_TEST_DIR}/TEST-TemplateOpImplTests.xml
- name: AUTO unit tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/ov_auto_unit_tests --gtest_print_time=1 \
--gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-ov_auto_unit_tests.xml
- name: AUTO func Tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/ov_auto_func_tests --gtest_print_time=1 \
--gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-ov_auto_func_tests.xml
- name: Template plugin func tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/ov_template_func_tests --gtest_print_time=1 \
--gtest_filter=*smoke* \
--gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-TemplateFuncTests.xml
- name: Inference Engine C API tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/InferenceEngineCAPITests --gtest_print_time=1 \
--gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-InferenceEngineCAPITests.xml
- name: OpenVINO C API tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/ov_capi_test --gtest_print_time=1 \
--gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-OpenVINOCAPITests.xml
- name: AutoBatch unit tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/ov_auto_batch_unit_tests --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-ov_auto_batch_unit_tests.xml
- name: AutoBatch func tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/ov_auto_batch_func_tests --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-ov_auto_batch_func_tests.xml
- name: Proxy Plugin func tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/ov_proxy_plugin_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-OVProxyTests.xml
- name: Hetero unit tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/ov_hetero_unit_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-OVHeteroUnitTests.xml
- name: Hetero func tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
${{ env.INSTALL_TEST_DIR }}/ov_hetero_func_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-OVHeteroFuncTests.xml
- name: Upload Test Results
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: test-results-cpp-${{ matrix.arhitecture }}
path: ${{ env.INSTALL_TEST_DIR }}/TEST*.xml
if-no-files-found: 'error'
name: C++ unit tests
needs: [ Build, Smart_CI ]
uses: ./.github/workflows/job_cxx_unit_tests.yml
with:
runner: 'macos-13'
affected-components: ${{ needs.smart_ci.outputs.affected_components }}
Python_Unit_Tests:
name: Python unit tests
needs: Build
timeout-minutes: 55
defaults:
run:
shell: bash
strategy:
max-parallel: 2
fail-fast: false
matrix:
include:
- arhitecture: 'x86_64'
machine: 'macos-13'
- arhitecture: 'arm64'
machine: 'macos-13-xlarge'
runs-on: ${{ matrix.machine }}
env:
OPENVINO_REPO: ${{ github.workspace }}/openvino
OPENVINO_CONTRIB_REPO: ${{ github.workspace }}/openvino_contrib
INSTALL_DIR: ${{ github.workspace }}/install
INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests
LAYER_TESTS_INSTALL_DIR: ${{ github.workspace }}/install/tests/layer_tests
steps:
- name: Clone OpenVINO
uses: actions/checkout@v4
with:
path: 'openvino'
submodules: 'true'
#
# Dependencies
#
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Download OpenVINO package
uses: actions/download-artifact@v3
with:
name: openvino_package_${{ matrix.arhitecture }}
path: ${{ env.INSTALL_DIR }}
- name: Download OpenVINO tests package
uses: actions/download-artifact@v3
with:
name: openvino_tests_${{ matrix.arhitecture }}
path: ${{ env.INSTALL_TEST_DIR }}
- name: Extract OpenVINO packages
run: |
pushd ${{ env.INSTALL_DIR }}
tar -xzf openvino_package.tar.gz -C ${{ env.INSTALL_DIR }}
popd
pushd ${{ env.INSTALL_TEST_DIR }}
tar -xzf openvino_tests.tar.gz -C ${{ env.INSTALL_DIR }}
popd
- name: Install Python API tests dependencies
run: |
# For torchvision to OpenVINO preprocessing converter
python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/src/openvino/preprocess/torchvision/requirements.txt
# TODO: replace with Python API tests requirements
python3 -m pip install -r ${{ env.OPENVINO_REPO }}/tools/mo/requirements_dev.txt
- name: Install OpenVINO Python wheels
run: |
# Install the core OV wheel
python3 -m pip install ${{ env.INSTALL_DIR }}/tools/openvino-*.whl
# mxnet is only available on x86_64
extras_to_install="caffe,kaldi,onnx,tensorflow2,pytorch"
if [[ "${{ matrix.arhitecture }}" == "x86_64" ]]; then
extras_to_install="mxnet,$extras_to_install"
fi
# Find and install OV dev wheel
pushd ${{ env.INSTALL_DIR }}/tools
ov_dev_wheel_name=$(find . -name 'openvino_dev*.whl')
python3 -m pip install $ov_dev_wheel_name[$extras_to_install]
popd
- name: Python API 1.0 Tests
run: |
python3 -m pytest -s ${{ env.INSTALL_TEST_DIR }}/pyngraph \
--junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-Pyngraph.xml \
--ignore=${{ env.INSTALL_TEST_DIR }}/pyngraph/tests_compatibility/test_onnx/test_zoo_models.py \
--ignore=${{ env.INSTALL_TEST_DIR }}/pyngraph/tests_compatibility/test_onnx/test_backend.py
- name: Python API 2.0 Tests
run: |
# For python imports to import pybind_mock_frontend
export PYTHONPATH=${{ env.INSTALL_TEST_DIR }}:$PYTHONPATH
# for 'template' extension
export DYLD_LIBRARY_PATH=${{ env.INSTALL_TEST_DIR }}:$DYLD_LIBRARY_PATH
python3 -m pytest -sv ${{ env.INSTALL_TEST_DIR }}/pyopenvino \
--junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-Pyngraph.xml \
--ignore=${{ env.INSTALL_TEST_DIR }}/pyopenvino/tests/test_utils/test_utils.py
- name: MO Python API Tests
run: |
python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt
export PYTHONPATH=${{ env.LAYER_TESTS_INSTALL_DIR }}:$PYTHONPATH
# TODO: remove setupvars.sh from here; currently, it's used for 'test_utils' installed in '<package>/python/openvino'
source ${INSTALL_DIR}/setupvars.sh
python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/mo_python_api_tests/ --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_mo_convert.xml
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP16
- name: OVC Python API Tests
run: |
python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt
# TODO: remove setupvars.sh from here; currently, it's used for 'test_utils' installed in '<package>/python/openvino'
source ${{ env.INSTALL_DIR }}/setupvars.sh
python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/ovc_python_api_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_ovc_convert.xml
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP16
- name: Model Optimizer unit tests
run: |
export PYTHONPATH=${{ env.INSTALL_TEST_DIR }}:$PYTHONPATH
python3 -m pytest -s ${{ env.INSTALL_TEST_DIR }}/mo/unit_tests \
--ignore=${{ env.INSTALL_TEST_DIR }}/mo/unit_tests/mo/front/mxnet \
--junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-ModelOptimizer.xml
- name: PyTorch Layer Tests
run: |
python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt
export PYTHONPATH=${{ env.LAYER_TESTS_INSTALL_DIR }}:$PYTHONPATH
python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/pytorch_tests -m precommit --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-pytorch.xml
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP16
- name: ONNX Layer Tests
run: |
python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt
export PYTHONPATH=${{ env.OPENVINO_REPO }}/tools/mo/:${{ env.LAYER_TESTS_INSTALL_DIR }}:$PYTHONPATH
python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/onnx_tests -m "not launch_only_if_manually_specified and precommit" --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-onnx.xml
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP16
- name: TensorFlow 1 Layer Tests - TF FE
run: |
python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt
export PYTHONPATH=${{ env.OPENVINO_REPO }}/tools/mo/:${{ env.LAYER_TESTS_INSTALL_DIR }}:$PYTHONPATH
python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/tensorflow_tests/ --use_new_frontend -m precommit_tf_fe --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-tf_fe.xml
env:
TEST_DEVICE: CPU
- name: TensorFlow 2 Layer Tests - TF FE
if: ${{ 'false' }} # Ticket: 123322
run: |
python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt
export PYTHONPATH=${{ env.OPENVINO_REPO }}/tools/mo/:${{ env.LAYER_TESTS_INSTALL_DIR }}:$PYTHONPATH
python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/tensorflow2_keras_tests/ --use_new_frontend -m precommit_tf_fe --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-tf2_fe.xml
env:
TEST_DEVICE: CPU
- name: TensorFlow 1 Layer Tests - Legacy FE
run: |
python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt
export PYTHONPATH=${{ env.OPENVINO_REPO }}/tools/mo/:${{ env.LAYER_TESTS_INSTALL_DIR }}:$PYTHONPATH
python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/tensorflow_tests/test_tf_Roll.py --ir_version=10 --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-tf_Roll.xml
- name: TensorFlow 2 Layer Tests - Legacy FE
run: |
python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt
export PYTHONPATH=${{ env.OPENVINO_REPO }}/tools/mo/:${{ env.LAYER_TESTS_INSTALL_DIR }}:$PYTHONPATH
python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/tensorflow2_keras_tests/test_tf2_keras_activation.py \
--ir_version=11 --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-tf2_Activation.xml -k "sigmoid"
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP16
- name: TensorFlow Lite Layer Tests - TFL FE
run: |
python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt
export PYTHONPATH=${{ env.OPENVINO_REPO }}/tools/mo/:${{ env.LAYER_TESTS_INSTALL_DIR }}:$PYTHONPATH
python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/tensorflow_lite_tests/ --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-tfl_fe.xml
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP16
- name: Python ONNX operators tests
if: ${{ 'false' }} # Ticket: 123325
run: |
# Skip test_onnx/test_zoo_models and test_onnx/test_backend due to long execution time - ONNX Model Zoo tests are run separately
python3 -m pytest -sv ${{ env.OPENVINO_REPO }}/src/frontends/onnx/tests -k 'not cuda' \
--junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-onnx_frontend.xml \
--ignore=${{ env.OPENVINO_REPO }}/src/frontends/onnx/tests/test_python/test_zoo_models.py
- name: Python Frontend tests
run: |
python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt
export PYTHONPATH=${{ env.OPENVINO_REPO }}/tools/mo/:${{ env.LAYER_TESTS_INSTALL_DIR }}:$PYTHONPATH
# to allow 'libtest_builtin_extensions.so' to find 'libopenvino_onnx_frontend.so'
source ${{ env.INSTALL_DIR }}/setupvars.sh
python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/py_frontend_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_py_fontend.xml
# TODO: install to 'tests' component via cpack
- name: OVC unit tests
run: python3 -m pytest -s ${{ env.OPENVINO_REPO }}/tools/ovc/unit_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-OpenVinoConversion.xml
- name: Upload Test Results
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: test-results-python-${{ matrix.arhitecture }}
path: ${{ env.INSTALL_TEST_DIR }}/TEST*.xml
if-no-files-found: 'error'
needs: [ Build, Smart_CI ]
uses: ./.github/workflows/job_python_unit_tests.yml
with:
runner: 'macos-13'
affected-components: ${{ needs.smart_ci.outputs.affected_components }}
CPU_Functional_Tests:
name: CPU functional tests
needs: Build
timeout-minutes: 25
defaults:
run:
shell: bash
strategy:
max-parallel: 2
fail-fast: false
matrix:
include:
# ticket: 122001
# - arhitecture: 'x86_64'
# machine: 'macos-13'
- arhitecture: 'arm64'
machine: 'macos-13-xlarge'
runs-on: ${{ matrix.machine }}
env:
INSTALL_DIR: ${{ github.workspace }}/install
INSTALL_TEST_DIR: ${{ github.workspace }}/install/tests
steps:
- name: Create Directories
run: mkdir -p ${{ env.INSTALL_DIR }} ${{ env.INSTALL_TEST_DIR }}
- name: Download OpenVINO package
uses: actions/download-artifact@v3
with:
name: openvino_package_${{ matrix.arhitecture }}
path: ${{ env.INSTALL_DIR }}
- name: Download OpenVINO tests package
uses: actions/download-artifact@v3
with:
name: openvino_tests_${{ matrix.arhitecture }}
path: ${{ env.INSTALL_TEST_DIR }}
- name: Extract OpenVINO packages
run: |
pushd ${{ env.INSTALL_DIR }}
tar -xzf openvino_package.tar.gz -C ${{ env.INSTALL_DIR }} && rm openvino_package.tar.gz
popd
pushd ${{ env.INSTALL_TEST_DIR }}
tar -xzf openvino_tests.tar.gz -C ${{ env.INSTALL_DIR }} && rm openvino_tests.tar.gz
popd
- name: CPU plugin func tests
run: |
source ${{ env.INSTALL_DIR }}/setupvars.sh
# Skips under Ticket: 122769
skip_filter=${{ matrix.arhitecture == 'arm64' && '--gtest_filter=-*smoke_nonzero/NonZeroLayerTest.Inference/IS*:*smoke_NormalizeL2_*:*Extension.XmlModelWithExtensionFromDSO*:*Extension.OnnxModelWithExtensionFromDSO*:*ONNXQuantizedModels/QuantizedModelsTests.MaxPool*:*ONNXQuantizedModels/QuantizedModelsTests.Convolution*:**' || '' }}
${{ env.INSTALL_TEST_DIR }}/ov_cpu_func_tests --gtest_print_time=1 --gtest_filter=*smoke* "$skip_filter" --gtest_output=xml:"${{ env.INSTALL_TEST_DIR }}/TEST-CPUFuncTests.xml"
- name: Upload Test Results
uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: test-results-functional-cpu-${{ matrix.arhitecture }}
path: ${{ env.INSTALL_TEST_DIR }}/TEST*.xml
if-no-files-found: 'error'
# if: fromJSON(needs.smart_ci.outputs.affected_components).CPU.test
if: ${{ 'false' }} # Ticket: 122001
needs: [ Build, Smart_CI ]
uses: ./.github/workflows/job_cpu_functional_tests.yml
with:
runner: 'macos-13'

241
.github/workflows/mac_arm64.yml vendored Normal file
View File

@@ -0,0 +1,241 @@
name: macOS ARM64 (Python 3.11)
on:
workflow_dispatch:
schedule:
# at 00:00 on workdays
- cron: '0 0 * * 1,2,3,4,5'
# pull_request:
# paths-ignore:
# - '**/docs/**'
# - 'docs/**'
# - '**/**.md'
# - '**.md'
# - '**/layer_tests_summary/**'
# - '**/conformance/**'
# push:
# paths-ignore:
# - '**/docs/**'
# - 'docs/**'
# - '**/**.md'
# - '**.md'
# - '**/layer_tests_summary/**'
# - '**/conformance/**'
# branches:
# - master
# - 'releases/**'
concurrency:
# github.ref is not unique in post-commit
group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-mac-arm64
cancel-in-progress: true
env:
PYTHON_VERSION: '3.11'
jobs:
Smart_CI:
runs-on: ubuntu-latest
outputs:
affected_components: "${{ steps.smart_ci.outputs.affected_components }}"
skip_workflow: "${{ steps.smart_ci.outputs.skip_workflow }}"
steps:
- name: checkout action
uses: actions/checkout@v4
with:
sparse-checkout: .github/actions/smart-ci
- name: Get affected components
id: smart_ci
uses: ./.github/actions/smart-ci
with:
repository: ${{ github.repository }}
pr: ${{ github.event.number }}
commit_sha: ${{ github.sha }}
component_pattern: "category: (.*)"
repo_token: ${{ secrets.GITHUB_TOKEN }}
skip_when_only_listed_labels_set: 'docs'
skip_when_only_listed_files_changed: '*.md,*.rst,*.png,*.jpg,*.svg'
Build:
needs: Smart_CI
timeout-minutes: 150
defaults:
run:
shell: bash
runs-on: 'macos-13-xlarge'
env:
CMAKE_BUILD_TYPE: 'Release'
CMAKE_GENERATOR: 'Ninja Multi-Config'
MACOSX_DEPLOYMENT_TARGET: '11.0'
CMAKE_CXX_COMPILER_LAUNCHER: ccache
CMAKE_C_COMPILER_LAUNCHER: ccache
OPENVINO_REPO: ${{ github.workspace }}/openvino
OPENVINO_CONTRIB_REPO: ${{ github.workspace }}/openvino_contrib
INSTALL_DIR: ${{ github.workspace }}/openvino_install
INSTALL_TEST_DIR: ${{ github.workspace }}/tests_install
BUILD_DIR: ${{ github.workspace }}/build
steps:
- name: Clone OpenVINO
uses: actions/checkout@v4
with:
path: 'openvino'
submodules: 'true'
- name: Clone OpenVINO Contrib
uses: actions/checkout@v4
with:
repository: 'openvinotoolkit/openvino_contrib'
path: 'openvino_contrib'
#
# Print system info
#
- name: System info
uses: ./openvino/.github/actions/system_info
#
# Dependencies
#
- name: Install build dependencies
run: brew install coreutils ninja scons
- name: Setup Python ${{ env.PYTHON_VERSION }}
uses: ./openvino/.github/actions/setup_python
with:
version: ${{ env.PYTHON_VERSION }}
should-setup-pip-paths: 'false'
self-hosted-runner: 'false'
- name: Install python dependencies
run: |
# For Python API
python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/wheel/requirements-dev.txt
python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/requirements.txt
# For running Python API tests
python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/src/compatibility/openvino/requirements-dev.txt
# For running ONNX frontend unit tests
python3 -m pip install --force-reinstall -r ${{ env.OPENVINO_REPO }}/src/frontends/onnx/tests/requirements.txt
# For running TensorFlow frontend unit tests
python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/frontends/tensorflow/tests/requirements.txt
# For running Paddle frontend unit tests
python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/frontends/paddle/tests/requirements.txt
#
# Build
#
- name: Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
max-size: "2000M"
# Should save cache only if run in the master branch of the base repo
# github.ref_name is 'ref/PR_#' in case of the PR, and 'branch_name' when executed on push
save: ${{ github.ref_name == 'master' && 'true' || 'false' }}
verbose: 2
key: ${{ runner.os }}-${{ runner.arch }}-main
restore-keys: |
${{ runner.os }}-${{ runner.arch }}-main
- name: CMake configure
run: |
cmake \
-G "${{ env.CMAKE_GENERATOR }}" \
-DENABLE_CPPLINT=OFF \
-DENABLE_NCC_STYLE=OFF \
-DENABLE_TESTS=ON \
-DCMAKE_COMPILE_WARNING_AS_ERROR=OFF \
-DENABLE_STRICT_DEPENDENCIES=OFF \
-DCMAKE_CXX_COMPILER_LAUNCHER=${{ env.CMAKE_CXX_COMPILER_LAUNCHER }} \
-DCMAKE_C_COMPILER_LAUNCHER=${{ env.CMAKE_C_COMPILER_LAUNCHER }} \
-S ${{ env.OPENVINO_REPO }} \
-B ${{ env.BUILD_DIR }}
- name: Cmake build - OpenVINO
run: cmake --build ${{ env.BUILD_DIR }} --parallel --config ${{ env.CMAKE_BUILD_TYPE }}
- name: Show ccache stats
run: ccache --show-stats
- name: Cmake install - OpenVINO
run: |
cmake -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -P ${{ env.BUILD_DIR }}/cmake_install.cmake
cmake -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_TEST_DIR }} -DCOMPONENT=tests -P ${{ env.BUILD_DIR }}/cmake_install.cmake
cmake -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -DCOMPONENT=python_wheels -P ${{ env.BUILD_DIR }}/cmake_install.cmake
- name: Pack Artifacts
run: |
pushd ${{ env.INSTALL_DIR }}
tar -czvf ${{ env.BUILD_DIR }}/openvino_package.tar.gz *
popd
pushd ${{ env.INSTALL_TEST_DIR }}
tar -czvf ${{ env.BUILD_DIR }}/openvino_tests.tar.gz *
popd
- name: Cmake & Build - OpenVINO Contrib
run: |
cmake \
-DBUILD_nvidia_plugin=OFF \
-DBUILD_java_api=OFF \
-DCUSTOM_OPERATIONS="calculate_grid;complex_mul;fft;grid_sample;sparse_conv;sparse_conv_transpose" \
-DOPENVINO_EXTRA_MODULES=${{ env.OPENVINO_CONTRIB_REPO }}/modules \
-S ${{ env.OPENVINO_REPO }} \
-B ${{ env.BUILD_DIR }}
cmake --build ${{ env.BUILD_DIR }} --parallel --config ${{ env.CMAKE_BUILD_TYPE }}
#
# Upload build artifacts
#
- name: Upload openvino package
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: openvino_package
path: ${{ env.BUILD_DIR }}/openvino_package.tar.gz
if-no-files-found: 'error'
- name: Upload openvino tests package
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: openvino_tests
path: ${{ env.BUILD_DIR }}/openvino_tests.tar.gz
if-no-files-found: 'error'
Samples:
needs: Build
uses: ./.github/workflows/job_samples_tests.yml
with:
runner: 'macos-13-xlarge'
affected-components: ${{ needs.smart_ci.outputs.affected_components }}
CXX_Unit_Tests:
name: C++ unit tests
needs: [ Build, Smart_CI ]
uses: ./.github/workflows/job_cxx_unit_tests.yml
with:
runner: 'macos-13-xlarge'
affected-components: ${{ needs.smart_ci.outputs.affected_components }}
Python_Unit_Tests:
name: Python unit tests
needs: [ Build, Smart_CI ]
uses: ./.github/workflows/job_python_unit_tests.yml
with:
runner: 'macos-13-xlarge'
affected-components: ${{ needs.smart_ci.outputs.affected_components }}
CPU_Functional_Tests:
name: CPU functional tests
if: fromJSON(needs.smart_ci.outputs.affected_components).CPU.test
needs: [ Build, Smart_CI ]
uses: ./.github/workflows/job_cpu_functional_tests.yml
with:
runner: 'macos-13-xlarge'

View File

@@ -24,7 +24,7 @@ jobs:
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'

View File

@@ -28,7 +28,7 @@ jobs:
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.8'

View File

@@ -12,7 +12,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
- uses: actions/stale@v9
with:
stale-issue-message: 'This issue will be closed in a week because of 9 months of no activity.'
stale-pr-message: 'This PR will be closed in a week because of 2 weeks of no activity.'

View File

@@ -35,7 +35,7 @@ jobs:
container:
image: emscripten/emsdk
volumes:
- /mount/caches:/mount/caches
- /mount:/mount
options: -e SCCACHE_AZURE_BLOB_CONTAINER -e SCCACHE_AZURE_CONNECTION_STRING
env:
CMAKE_BUILD_TYPE: 'Release'

View File

@@ -1,43 +1,51 @@
name: Windows (VS 2019, Python 3.11)
on:
workflow_dispatch:
schedule:
# at 00:00 on workdays
- cron: '0 0 * * 1,2,3,4,5'
# pull_request:
# paths-ignore:
# - '**/docs/**'
# - 'docs/**'
# - '**/**.md'
# - '**.md'
# - '**/layer_tests_summary/**'
# - '**/conformance/**'
# push:
# paths-ignore:
# - '**/docs/**'
# - 'docs/**'
# - '**/**.md'
# - '**.md'
# - '**/layer_tests_summary/**'
# - '**/conformance/**'
# branches:
# - master
pull_request:
push:
branches:
- master
- 'releases/**'
concurrency:
# github.ref is not unique in post-commit
group: ${{ github.event_name == 'push' && github.run_id || github.ref }}-windows
cancel-in-progress: true
env:
PIP_CACHE_PATH: /mount/caches/pip/win
PYTHON_VERSION: '3.11'
jobs:
Smart_CI:
runs-on: ubuntu-latest
outputs:
affected_components: "${{ steps.smart_ci.outputs.affected_components }}"
skip_workflow: "${{ steps.smart_ci.outputs.skip_workflow }}"
steps:
- name: checkout action
uses: actions/checkout@v4
with:
sparse-checkout: .github/actions/smart-ci
- name: Get affected components
id: smart_ci
uses: ./.github/actions/smart-ci
with:
repository: ${{ github.repository }}
pr: ${{ github.event.number }}
commit_sha: ${{ github.sha }}
component_pattern: "category: (.*)"
repo_token: ${{ secrets.GITHUB_TOKEN }}
skip_when_only_listed_labels_set: 'docs'
skip_when_only_listed_files_changed: '*.md,*.rst,*.png,*.jpg,*.svg,*/layer_tests_summary/*,*/conformance/*'
Build:
needs: Smart_CI
timeout-minutes: 180
defaults:
run:
shell: pwsh
runs-on: windows-2019-16-core
runs-on: aks-win-16-cores-32gb
env:
CMAKE_BUILD_TYPE: 'Release'
CMAKE_GENERATOR: 'Ninja Multi-Config'
@@ -48,6 +56,10 @@ jobs:
INSTALL_DIR: "${{ github.workspace }}\\openvino_install"
INSTALL_TEST_DIR: "${{ github.workspace }}\\tests_install"
BUILD_DIR: "${{ github.workspace }}\\openvino_build"
# TODO: specify version of compiler here
SCCACHE_AZURE_KEY_PREFIX: windows2022_x86_64_Release
if: "!needs.smart_ci.outputs.skip_workflow"
steps:
- name: Clone OpenVINO
uses: actions/checkout@v4
@@ -60,7 +72,7 @@ jobs:
with:
repository: 'openvinotoolkit/openvino_contrib'
path: 'openvino_contrib'
ref: 'releases/2023/2'
ref: 'master'
#
# Print system info
@@ -73,9 +85,14 @@ jobs:
# Dependencies
#
- uses: actions/setup-python@v4
- name: Setup Python ${{ env.PYTHON_VERSION }}
uses: ./openvino/.github/actions/setup_python
with:
python-version: ${{ env.PYTHON_VERSION }}
version: ${{ env.PYTHON_VERSION }}
pip-cache-path: ${{ env.PIP_CACHE_PATH }}
should-setup-pip-paths: 'true'
self-hosted-runner: 'true'
show-cache-info: 'true'
- name: Install python dependencies
run: |
@@ -92,9 +109,18 @@ jobs:
# For running TensorFlow Lite frontend unit tests
python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/frontends/tensorflow_lite/tests/requirements.txt
# Disabled because of CVS-95904
# For running Paddle frontend unit tests
# python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/frontends/paddle/tests/requirements.txt
# For getting rid of SSL issues during model downloading for unit tests
python3 -m pip install certifi
- name: Install sccache
uses: mozilla-actions/sccache-action@v0.0.3
with:
version: "v0.5.4"
- name: Install build dependencies
run: choco install --no-progress ninja
@@ -105,18 +131,8 @@ jobs:
- name: Configure Developer Command Prompt for Microsoft Visual C++
uses: ilammy/msvc-dev-cmd@v1
- name: Setup sccache
uses: hendrikmuhs/ccache-action@v1.2
with:
variant: sccache
max-size: "2000M"
# Should save cache only if run in the master branch of the base repo
# github.ref_name is 'ref/PR_#' in case of the PR, and 'branch_name' when executed on push
save: ${{ github.ref_name == 'master' && 'true' || 'false' }}
append-timestamp: true
key: ${{ github.job }}-${{ runner.os }}-common
restore-keys: |
${{ github.job }}-${{ runner.os }}-common
- name: Set SSL_CERT_FILE for model downloading for unit tests
run: echo SSL_CERT_FILE=$(python3 -m certifi) >> $env:GITHUB_ENV
- name: CMake configure
run: |
@@ -134,9 +150,15 @@ jobs:
-S ${{ env.OPENVINO_REPO }} `
-B ${{ env.BUILD_DIR }}
- name: Clean sccache stats
run: '& "$Env:SCCACHE_PATH" --zero-stats'
- name: Cmake build - OpenVINO
run: cmake --build ${{ env.BUILD_DIR }} --parallel --config ${{ env.CMAKE_BUILD_TYPE }} --verbose
- name: Show sccache stats
run: '& "$Env:SCCACHE_PATH" --show-stats'
- name: Cmake install - OpenVINO
run: |
cmake -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -P ${{ env.BUILD_DIR }}/cmake_install.cmake
@@ -187,13 +209,15 @@ jobs:
if-no-files-found: 'error'
Samples:
needs: Build
timeout-minutes: 10
needs: [Build, Smart_CI]
if: fromJSON(needs.smart_ci.outputs.affected_components).samples
timeout-minutes: 20
defaults:
run:
shell: pwsh
runs-on: windows-2019
runs-on: aks-win-4-cores-8gb
env:
OPENVINO_REPO: "${{ github.workspace }}\\openvino"
INSTALL_DIR: "${{ github.workspace }}\\install"
INSTALL_TEST_DIR: "${{ github.workspace }}\\install\\tests"
SAMPLES_INSTALL_DIR: "${{ github.workspace }}\\install\\samples"
@@ -201,13 +225,13 @@ jobs:
steps:
- name: Download OpenVINO package
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: openvino_package
path: ${{ env.INSTALL_DIR }}
- name: Download OpenVINO tests package
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: openvino_tests
path: ${{ env.INSTALL_TEST_DIR }}
@@ -221,9 +245,20 @@ jobs:
Expand-Archive openvino_tests.zip -DestinationPath "${{ env.INSTALL_DIR }}"
popd
- uses: actions/setup-python@v4
- name: Fetch setup_python action
uses: actions/checkout@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
sparse-checkout: |
.github/actions/setup_python/action.yml
sparse-checkout-cone-mode: false
path: 'openvino'
- name: Setup Python ${{ env.PYTHON_VERSION }}
uses: ./openvino/.github/actions/setup_python
with:
version: ${{ env.PYTHON_VERSION }}
should-setup-pip-paths: 'false'
self-hosted-runner: 'true'
- name: Build cpp samples
run: |
@@ -256,12 +291,12 @@ jobs:
Python_Unit_Tests:
name: Python unit tests
needs: Build
needs: [Build, Smart_CI]
timeout-minutes: 75
defaults:
run:
shell: pwsh
runs-on: windows-2019
runs-on: aks-win-8-cores-16gb
env:
OPENVINO_REPO: "${{ github.workspace }}\\openvino"
OPENVINO_CONTRIB_REPO: "${{ github.workspace }}\\openvino_contrib"
@@ -272,13 +307,13 @@ jobs:
steps:
- name: Download OpenVINO package
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: openvino_package
path: ${{ env.INSTALL_DIR }}
- name: Download OpenVINO tests package
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: openvino_tests
path: ${{ env.INSTALL_TEST_DIR }}
@@ -292,22 +327,21 @@ jobs:
Expand-Archive openvino_tests.zip -DestinationPath "${{ env.INSTALL_DIR }}"
popd
- name: Clone OpenVINO
- name: Fetch setup_python action
uses: actions/checkout@v4
with:
sparse-checkout: |
.github/actions/setup_python/action.yml
sparse-checkout-cone-mode: false
path: 'openvino'
- uses: actions/setup-python@v4
- name: Setup Python ${{ env.PYTHON_VERSION }}
uses: ./openvino/.github/actions/setup_python
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Python API tests dependencies
run: |
# For torchvision to OpenVINO preprocessing converter
python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/bindings/python/src/openvino/preprocess/torchvision/requirements.txt
# TODO: replace with Python API tests requirements
python3 -m pip install -r ${{ env.OPENVINO_REPO }}/tools/mo/requirements_dev.txt
version: ${{ env.PYTHON_VERSION }}
pip-cache-path: ${{ env.PIP_CACHE_PATH }}
should-setup-pip-paths: 'false'
self-hosted-runner: 'true'
- name: Install OpenVINO Python wheels
run: |
@@ -319,133 +353,153 @@ jobs:
$ovDevWheelPath=Get-ChildItem -Path "${{ env.INSTALL_DIR }}\tools" -Filter openvino_dev*.whl | % { $_.FullName }
python3 -m pip install "$ovDevWheelPath[mxnet,caffe,kaldi,onnx,tensorflow2,pytorch]"
- name: Install Python API tests dependencies
run: |
# To enable pytest parallel features
python3 -m pip install pytest-xdist[psutil]
# For torchvision to OpenVINO preprocessing converter
python3 -m pip install -r ${{ env.INSTALL_TEST_DIR }}/python/preprocess/torchvision/requirements.txt
# TODO: replace with Python API tests requirements
python3 -m pip install -r ${{ env.INSTALL_TEST_DIR }}/mo/requirements_dev.txt
- name: Python API 1.0 Tests
#if: fromJSON(needs.smart_ci.outputs.affected_components).Python_API.test # Ticket: 127101
shell: cmd
run: |
python3 -m pytest -s ${{ env.INSTALL_TEST_DIR }}/pyngraph ${{ env.PYTHON_STATIC_ARGS }} --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-Pyngraph.xml --ignore=${{ env.INSTALL_TEST_DIR }}/pyngraph/tests_compatibility/test_onnx/test_zoo_models.py
- name: Python API 2.0 Tests
#if: fromJSON(needs.smart_ci.outputs.affected_components).Python_API.test # Ticket: 127101
shell: cmd
run: |
set PYTHONPATH=${{ env.LAYER_TESTS_INSTALL_DIR }};%PYTHONPATH%
python3 -m pytest -sv ${{ env.INSTALL_TEST_DIR }}/pyopenvino ${{ env.PYTHON_STATIC_ARGS }} --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-Pyngraph.xml --ignore=${{ env.INSTALL_TEST_DIR }}/pyopenvino/tests/test_utils/test_utils.py
- name: Model Optimizer UT
if: fromJSON(needs.smart_ci.outputs.affected_components).MO.test
shell: cmd
run: |
python3 -m pytest -s ${{ env.INSTALL_TEST_DIR }}/mo/unit_tests --ignore=${{ env.INSTALL_TEST_DIR }}/mo/unit_tests/mo/front/mxnet --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-ModelOptimizer.xml
- name: Install Python Layer tests dependencies
run: |
# layer test requirements
python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt
# Ticket - 115085
- name: PyTorch Layer Tests
if: ${{ 'false' }}
shell: cmd
run: |
python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt
python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/pytorch_tests -m precommit --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-pytorch.xml
python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/pytorch_tests -n logical -m precommit --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-pytorch.xml
env:
TEST_DEVICE: CPU
- name: ONNX Layer Tests
if: fromJSON(needs.smart_ci.outputs.affected_components).ONNX_FE.test
shell: cmd
run: |
python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt
:: requires 'unit_tests' from 'tools/mo'
set PYTHONPATH=${{ env.OPENVINO_REPO }}\tools\mo;${{ env.LAYER_TESTS_INSTALL_DIR }};%PYTHONPATH%
python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/onnx_tests -m "not launch_only_if_manually_specified and precommit" --junitxml=${INSTALL_TEST_DIR}/TEST-onnx.xml
set PYTHONPATH=${{ env.INSTALL_TEST_DIR }}\mo;%PYTHONPATH%
python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/onnx_tests -n logical -m "not launch_only_if_manually_specified and precommit" --junitxml=${INSTALL_TEST_DIR}/TEST-onnx.xml
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP16
- name: TensorFlow 1 Layer Tests - TF FE
if: fromJSON(needs.smart_ci.outputs.affected_components).TF_FE.test
shell: cmd
run: |
python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt
:: requires 'unit_tests' from 'tools/mo'
set PYTHONPATH=${{ env.OPENVINO_REPO }}\tools\mo;${{ env.LAYER_TESTS_INSTALL_DIR }};%PYTHONPATH%
set PYTHONPATH=${{ env.INSTALL_TEST_DIR }}\mo;%PYTHONPATH%
python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/tensorflow_tests/ --use_new_frontend -m precommit_tf_fe --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-tf_fe.xml
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP16
- name: TensorFlow 2 Layer Tests - TF FE
if: fromJSON(needs.smart_ci.outputs.affected_components).TF_FE.test
shell: cmd
run: |
python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt
:: requires 'unit_tests' from 'tools/mo'
set PYTHONPATH=${{ env.OPENVINO_REPO }}\tools\mo;${{ env.LAYER_TESTS_INSTALL_DIR }};%PYTHONPATH%
set PYTHONPATH=${{ env.INSTALL_TEST_DIR }}\mo;%PYTHONPATH%
python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/tensorflow2_keras_tests/ --use_new_frontend -m precommit_tf_fe --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-tf2_fe.xml
env:
TEST_DEVICE: CPU
- name: TensorFlow 1 Layer Tests - Legacy FE
if: fromJSON(needs.smart_ci.outputs.affected_components).TF_FE.test
shell: cmd
run: |
python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt
python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/tensorflow_tests/test_tf_Roll.py --ir_version=10 --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-tf_Roll.xml
- name: TensorFlow 2 Layer Tests - Legacy FE
if: fromJSON(needs.smart_ci.outputs.affected_components).TF_FE.test
shell: cmd
run: |
python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt
python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/tensorflow2_keras_tests/test_tf2_keras_activation.py --ir_version=11 --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-tf2_Activation.xml -k "sigmoid"
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP16
- name: TensorFlow Lite Layer Tests - TFL FE
if: fromJSON(needs.smart_ci.outputs.affected_components).TFL_FE.test
shell: cmd
run: |
python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt
python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/tensorflow_lite_tests/ --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-tfl_fe.xml
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP16
- name: Python ONNX operators tests
if: fromJSON(needs.smart_ci.outputs.affected_components).Python_API.test ||
fromJSON(needs.smart_ci.outputs.affected_components).ONNX_FE.test
shell: cmd
run: |
:: Skip test_onnx/test_zoo_models and test_onnx/test_backend due to long execution time - ONNX Model Zoo tests are run separately
python3 -m pytest ${{ env.OPENVINO_REPO }}/src/frontends/onnx/tests -k "not cuda" ^
python3 -m pytest ${{ env.INSTALL_TEST_DIR }}/onnx -k "not cuda" ^
--junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-onnx_frontend.xml ^
--ignore=${{ env.OPENVINO_REPO }}/src/frontends/onnx/tests/test_python/test_zoo_models.py
--ignore=${{ env.INSTALL_TEST_DIR }}/onnx/test_python/test_zoo_models.py
- name: MO Python API Tests
if: fromJSON(needs.smart_ci.outputs.affected_components).MO.test
shell: cmd
run: |
python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt
:: Used for 'test_utils' installed in '<test_package>\python\openvino\test_utils'
set PYTHONPATH=${{ env.INSTALL_TEST_DIR }}\python\openvino\test_utils;${{ env.INSTALL_TEST_DIR }}\python;%PYTHONPATH%
:: TODO: remove setupvars.bat from here; currently, it's used for 'test_utils' installed in '<package>/python/openvino'
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/mo_python_api_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_mo_convert.xml
python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/mo_python_api_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_mo_convert.xml
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP16
- name: OVC Python API Tests
if: fromJSON(needs.smart_ci.outputs.affected_components).MO.test
shell: cmd
run: |
python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt
:: Used for 'test_utils' installed in '<test_package>\python\openvino\test_utils'
set PYTHONPATH=${{ env.INSTALL_TEST_DIR }}\python\openvino\test_utils;${{ env.INSTALL_TEST_DIR }}\python;%PYTHONPATH%
:: TODO: remove setupvars.sh from here; currently, it's used for 'test_utils' installed in '<package>/python/openvino'
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/ovc_python_api_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_ovc_convert.xml
:: Skip test ticket: 126319
python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/ovc_python_api_tests -k "not test_ovc_tool_non_existng_output_dir" --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_ovc_convert.xml
env:
TEST_DEVICE: CPU
TEST_PRECISION: FP16
- name: Python Frontend tests
if: fromJSON(needs.smart_ci.outputs.affected_components).PyTorch_FE.test ||
fromJSON(needs.smart_ci.outputs.affected_components).PDPD_FE.test
shell: cmd
run: |
python3 -m pip install -r ${{ env.LAYER_TESTS_INSTALL_DIR }}/requirements.txt
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && python3 -m pytest ${{ env.LAYER_TESTS_INSTALL_DIR }}/py_frontend_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-test_py_fontend.xml
# TODO: install to 'tests' component via cpack
- name: OVC unit tests
if: fromJSON(needs.smart_ci.outputs.affected_components).MO.test
shell: cmd
run: python3 -m pytest -s ${{ env.OPENVINO_REPO }}/tools/ovc/unit_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-OpenVinoConversion.xml
run: python3 -m pytest -s ${{ env.INSTALL_TEST_DIR }}/ovc/unit_tests --junitxml=${{ env.INSTALL_TEST_DIR }}/TEST-OpenVinoConversion.xml
- name: Upload Test Results
uses: actions/upload-artifact@v3
@@ -457,25 +511,25 @@ jobs:
CXX_Unit_Tests:
name: C++ unit tests
needs: Build
timeout-minutes: 15
needs: [Build, Smart_CI]
timeout-minutes: 25
defaults:
run:
shell: pwsh
runs-on: windows-2019
runs-on: aks-win-4-cores-8gb
env:
INSTALL_DIR: "${{ github.workspace }}\\install"
INSTALL_TEST_DIR: "${{ github.workspace }}\\install\\tests"
steps:
- name: Download OpenVINO package
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: openvino_package
path: ${{ env.INSTALL_DIR }}
- name: Download OpenVINO tests package
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: openvino_tests
path: ${{ env.INSTALL_TEST_DIR }}
@@ -490,72 +544,87 @@ jobs:
popd
- name: OpenVINO Core unit tests
if: fromJSON(needs.smart_ci.outputs.affected_components).Core.test
shell: cmd
run: |
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/ov_core_unit_tests --gtest_print_time=1 --gtest_filter=-*IE_GPU* --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-NGraphUT.xml
- name: OpenVINO Inference functional tests
if: fromJSON(needs.smart_ci.outputs.affected_components).inference.test
shell: cmd
run: |
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/ov_inference_functional_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-InferenceFunc.xml
- name: OpenVINO Inference unit tests
if: fromJSON(needs.smart_ci.outputs.affected_components).inference.test
shell: cmd
run: |
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/ov_inference_unit_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-InferenceUnit.xml
- name: Low Precision Transformations Tests
if: fromJSON(needs.smart_ci.outputs.affected_components).LP_transformations.test
shell: cmd
run: |
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/ov_lp_transformations_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-LpTransformations.xml
- name: OpenVINO Conditional compilation tests
if: fromJSON(needs.smart_ci.outputs.affected_components).Core.test
shell: cmd
run: |
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/ov_conditional_compilation_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-ConditionalCompilation.xml
- name: IR frontend tests
if: fromJSON(needs.smart_ci.outputs.affected_components).IR_FE.test
shell: cmd
run: |
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/ov_ir_frontend_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-IRFrontend.xml
- name: PaddlePaddle frontend tests # Disabled in Azure: https://github.com/openvinotoolkit/openvino/blob/master/.ci/azure/linux.yml#L403
- name: PaddlePaddle frontend tests # Disabled because of CVS-95904
if: ${{ 'false' }}
shell: cmd
run: |
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/paddle_tests --gtest_print_time=1 --gtest_filter=*smoke* --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-PaddleTests.xml
- name: ONNX frontend tests
if: fromJSON(needs.smart_ci.outputs.affected_components).ONNX_FE.test
shell: cmd
run: |
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/ov_onnx_frontend_tests --gtest_print_time=1 --gtest_filter=-*IE_GPU* --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-ONNXFrontend.xml
- name: TensorFlow Common frontend tests
if: fromJSON(needs.smart_ci.outputs.affected_components).TF_FE.test ||
fromJSON(needs.smart_ci.outputs.affected_components).TFL_FE.test
shell: cmd
run: |
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/ov_tensorflow_common_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-TensorFlowCommonFrontend.xml
- name: TensorFlow frontend tests
if: fromJSON(needs.smart_ci.outputs.affected_components).TF_FE.test
shell: cmd
run: |
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/ov_tensorflow_frontend_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-TensorFlowFrontend.xml
- name: TensorFlow Lite frontend tests
if: fromJSON(needs.smart_ci.outputs.affected_components).TFL_FE.test
shell: cmd
run: |
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/ov_tensorflow_lite_frontend_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-TensorFlowLiteFrontend.xml
:: Skip ticket: 126320
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/ov_tensorflow_lite_frontend_tests --gtest_print_time=1 --gtest_filter=-*test_decode_convert_equal_convert*:*test_convert_partially_equal_convert* --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-TensorFlowLiteFrontend.xml
- name: Transformations func tests
if: fromJSON(needs.smart_ci.outputs.affected_components).transformations.test
shell: cmd
run: |
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/ov_transformations_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-Transformations.xml
- name: Legacy Transformations func tests
if: fromJSON(needs.smart_ci.outputs.affected_components).GNA.test
shell: cmd
run: |
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/ov_legacy_transformations_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-LegacyTransformations.xml
- name: Inference Engine 1.0 unit tests
if: fromJSON(needs.smart_ci.outputs.affected_components).GNA.test
shell: cmd
run: |
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/InferenceEngineUnitTests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-InferenceEngineUnitTests.xml
@@ -566,47 +635,53 @@ jobs:
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/ov_util_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-commonUtilsTests.xml
- name: Snippets func tests
if: fromJSON(needs.smart_ci.outputs.affected_components).CPU.test
shell: cmd
run: |
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/ov_snippets_func_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-SnippetsFuncTests.xml
- name: CPU plugin unit tests
if: fromJSON(needs.smart_ci.outputs.affected_components).CPU.test
shell: cmd
run: |
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/ov_cpu_unit_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-CPUUnitTests.xml
- name: SubgraphsDumper tests
- name: ov_subgraphs_dumper_tests tests
shell: cmd
run: |
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/subgraphsDumperTests --gtest_print_time=1 --gtest_print_time=1 --device=TEMPLATE --gtest_filter="*OpImpl*" --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-SubgraphsDumperTests.xml
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/ov_subgraphs_dumper_tests --gtest_print_time=1 --device=TEMPLATE --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-SubgraphsDumperTests.xml
- name: Template OpImpl tests
if: ${{ 'false' }} # Ticket: 123572
shell: cmd
run: |
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/conformanceTests --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-TemplateOpImplTests.xml
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/ov_op_conformance_tests --gtest_print_time=1 --gtest_filter="*OpImpl*" --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-TemplateOpImplTests.xml
- name: GNA plugin unit tests
if: fromJSON(needs.smart_ci.outputs.affected_components).GNA.test
shell: cmd
run: |
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/ov_gna_unit_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-GNAUnitTests.xml
- name: AUTO unit tests
if: fromJSON(needs.smart_ci.outputs.affected_components).AUTO.test
shell: cmd
run: |
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/ov_auto_unit_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-ov_auto_unit_tests.xml
- name: AUTO func Tests
if: fromJSON(needs.smart_ci.outputs.affected_components).AUTO.test
shell: cmd
run: |
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/ov_auto_func_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-ov_auto_func_tests.xml
- name: Template plugin func tests
if: fromJSON(needs.smart_ci.outputs.affected_components).TEMPLATE.test
shell: cmd
run: |
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/ov_template_func_tests --gtest_print_time=1 --gtest_filter=*smoke* --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-TemplateFuncTests.xml
- name: Inference Engine C API tests
if: fromJSON(needs.smart_ci.outputs.affected_components).C_API.test
shell: cmd
run: |
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/InferenceEngineCAPITests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-InferenceEngineCAPITests.xml
@@ -618,26 +693,31 @@ jobs:
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/ov_capi_test --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-OpenVINOCAPITests.xml
- name: AutoBatch unit tests
if: fromJSON(needs.smart_ci.outputs.affected_components).AUTO_BATCH.test
shell: cmd
run: |
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/ov_auto_batch_unit_tests --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-ov_auto_batch_unit_tests.xml
- name: AutoBatch func tests
if: fromJSON(needs.smart_ci.outputs.affected_components).AUTO_BATCH.test
shell: cmd
run: |
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/ov_auto_batch_func_tests --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-ov_auto_batch_func_tests.xml
- name: Proxy Plugin func tests
if: fromJSON(needs.smart_ci.outputs.affected_components).PROXY.test
shell: cmd
run: |
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/ov_proxy_plugin_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-OVProxyTests.xml
- name: Hetero Unit Tests
if: fromJSON(needs.smart_ci.outputs.affected_components).HETERO.test
shell: cmd
run: |
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/ov_hetero_unit_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-OVHeteroUnitTests.xml
- name: Hetero Func Tests
if: fromJSON(needs.smart_ci.outputs.affected_components).HETERO.test
shell: cmd
run: |
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && ${{ env.INSTALL_TEST_DIR }}/ov_hetero_func_tests --gtest_print_time=1 --gtest_output=xml:${{ env.INSTALL_TEST_DIR }}/TEST-OVHeteroFuncTests.xml
@@ -652,27 +732,28 @@ jobs:
CPU_Functional_Tests:
name: CPU functional tests
needs: Build
timeout-minutes: 30
needs: [Build, Smart_CI]
timeout-minutes: 70
defaults:
run:
shell: pwsh
runs-on: windows-2019-8-core
runs-on: aks-win-8-cores-16gb
env:
OPENVINO_REPO: "${{ github.workspace }}\\openvino"
INSTALL_DIR: "${{ github.workspace }}\\install"
INSTALL_TEST_DIR: "${{ github.workspace }}\\install\\tests"
PARALLEL_TEST_SCRIPT: "${{ github.workspace }}\\install\\tests\\functional_test_utils\\layer_tests_summary\\run_parallel.py"
PARALLEL_TEST_CACHE: "${{ github.workspace }}\\install\\tests\\test_cache.lst"
if: fromJSON(needs.smart_ci.outputs.affected_components).CPU.test
steps:
- name: Download OpenVINO package
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: openvino_package
path: ${{ env.INSTALL_DIR }}
- name: Download OpenVINO tests package
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: openvino_tests
path: ${{ env.INSTALL_TEST_DIR }}
@@ -686,9 +767,20 @@ jobs:
Expand-Archive openvino_tests.zip -DestinationPath "${{ env.INSTALL_DIR }}"
popd
- uses: actions/setup-python@v4
- name: Fetch setup_python action
uses: actions/checkout@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
sparse-checkout: |
.github/actions/setup_python/action.yml
sparse-checkout-cone-mode: false
path: 'openvino'
- name: Setup Python ${{ env.PYTHON_VERSION }}
uses: ./openvino/.github/actions/setup_python
with:
version: ${{ env.PYTHON_VERSION }}
should-setup-pip-paths: 'false'
self-hosted-runner: 'true'
- name: Install python dependencies
shell: cmd
@@ -706,7 +798,7 @@ jobs:
shell: cmd
run: |
call "${{ env.INSTALL_DIR }}\\setupvars.bat" && python3 ${{ env.PARALLEL_TEST_SCRIPT }} -e ${{ env.INSTALL_TEST_DIR }}\ov_cpu_func_tests.exe -c ${{ env.PARALLEL_TEST_CACHE }} -w ${{ env.INSTALL_TEST_DIR }} -s suite -- --gtest_filter=*smoke*"
timeout-minutes: 25
timeout-minutes: 60
- name: Save tests execution time
uses: actions/cache/save@v3
@@ -730,3 +822,17 @@ jobs:
${{ env.INSTALL_TEST_DIR }}/logs/hash_table.csv
${{ env.PARALLEL_TEST_CACHE }}
if-no-files-found: 'error'
Overall_Status:
name: ci/gha_overall_status_windows
needs: [Smart_CI, Build, Samples, CXX_Unit_Tests, Python_Unit_Tests, CPU_Functional_Tests]
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Check status of all jobs
if: >-
${{
contains(needs.*.result, 'failure') ||
contains(needs.*.result, 'cancelled')
}}
run: exit 1

View File

@@ -4,24 +4,25 @@ on:
schedule:
# run daily at 00:00
- cron: '0 0 * * *'
# pull_request:
# paths-ignore:
# - '**/docs/**'
# - 'docs/**'
# - '**/**.md'
# - '**.md'
# - '**/layer_tests_summary/**'
# - '**/conformance/**'
# push:
# paths-ignore:
# - '**/docs/**'
# - 'docs/**'
# - '**/**.md'
# - '**.md'
# - '**/layer_tests_summary/**'
# - '**/conformance/**'
# branches:
# - master
# pull_request:
# paths-ignore:
# - '**/docs/**'
# - 'docs/**'
# - '**/**.md'
# - '**.md'
# - '**/layer_tests_summary/**'
# - '**/conformance/**'
push:
paths-ignore:
- '**/docs/**'
- 'docs/**'
- '**/**.md'
- '**.md'
- '**/layer_tests_summary/**'
- '**/conformance/**'
branches:
- master
- 'releases/**'
concurrency:
# github.ref is not unique in post-commit
@@ -37,7 +38,7 @@ jobs:
defaults:
run:
shell: pwsh
runs-on: windows-latest-8-cores
runs-on: aks-win-16-cores-32gb
env:
CMAKE_BUILD_TYPE: 'Release'
CMAKE_GENERATOR: 'Ninja Multi-Config'
@@ -49,6 +50,8 @@ jobs:
BUILD_DIR: "${{ github.workspace }}\\openvino_build"
MODELS_PATH: "${{ github.workspace }}\\testdata"
SELECTIVE_BUILD_STAT_DIR: "${{ github.workspace }}\\selective_build_stat"
# TODO: specify version of compiler here
SCCACHE_AZURE_KEY_PREFIX: windows2022_x86_64_itt_Release
steps:
- name: Clone OpenVINO
uses: actions/checkout@v4
@@ -62,7 +65,7 @@ jobs:
repository: 'openvinotoolkit/testdata'
path: 'testdata'
lfs: 'true'
ref: 'releases/2023/2'
ref: 'master'
#
# Print system info
@@ -75,13 +78,39 @@ jobs:
# Dependencies
#
- uses: actions/setup-python@v4
- name: Setup Python ${{ env.PYTHON_VERSION }}
uses: ./openvino/.github/actions/setup_python
with:
python-version: ${{ env.PYTHON_VERSION }}
version: ${{ env.PYTHON_VERSION }}
should-setup-pip-paths: 'false'
self-hosted-runner: 'false'
- name: Install sccache
uses: mozilla-actions/sccache-action@v0.0.3
with:
version: "v0.5.4"
- name: Install build dependencies
run: choco install --no-progress ninja
- name: Install python dependencies
run: |
# For running ONNX frontend unit tests
python3 -m pip install --force-reinstall -r ${{ env.OPENVINO_REPO }}/src/frontends/onnx/tests/requirements.txt
# For running TensorFlow frontend unit tests
python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/frontends/tensorflow/tests/requirements.txt
# For running TensorFlow Lite frontend unit tests
python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/frontends/tensorflow_lite/tests/requirements.txt
# For getting rid of SSL issues during model downloading for unit tests
python3 -m pip install certifi
# Disabled because of CVS-95904
# For running Paddle frontend unit tests
# python3 -m pip install -r ${{ env.OPENVINO_REPO }}/src/frontends/paddle/tests/requirements.txt
#
# Build
#
@@ -89,17 +118,8 @@ jobs:
- name: Configure Developer Command Prompt for Microsoft Visual C++
uses: ilammy/msvc-dev-cmd@v1
- name: Setup sccache
uses: hendrikmuhs/ccache-action@v1.2
with:
variant: sccache
max-size: "2000M"
# Should save cache only if run in the master branch of the base repo
# github.ref_name is 'ref/PR_#' in case of the PR, and 'branch_name' when executed on push
save: ${{ github.ref_name == 'master' && 'true' || 'false' }}
key: ${{ github.job }}-${{ runner.os }}-itt
restore-keys: |
${{ github.job }}-${{ runner.os }}-itt
- name: Set SSL_CERT_FILE for model downloading for unit tests
run: echo SSL_CERT_FILE=$(python3 -m certifi) >> $env:GITHUB_ENV
- name: CMake configure - CC COLLECT
run: |
@@ -116,10 +136,29 @@ jobs:
-S ${{ env.OPENVINO_REPO }} `
-B ${{ env.BUILD_DIR }}
- name: Clean sccache stats
run: '& "$Env:SCCACHE_PATH" --zero-stats'
# to get more information on the issue
# described in the next step
- name: Show which network ports are used
run: netstat -ban
# the case is the following:
# sccache: error: An attempt was made to access a socket in a way forbidden by its access permissions. (os error 10013)
# This looks like the attempt to use
# a port below 1024 or a port
# which is occupied by another app
- name: Stop sccache server just in case
run: '& "$Env:SCCACHE_PATH" --stop-server'
- name: Cmake build - CC COLLECT
run: |
cmake --build ${{ env.BUILD_DIR }} --parallel --config ${{ env.CMAKE_BUILD_TYPE }}
cmake --build ${{ env.BUILD_DIR }} --parallel --config ${{ env.CMAKE_BUILD_TYPE }} --target sea_itt_lib
cmake --build ${{ env.BUILD_DIR }} --parallel 8 --config ${{ env.CMAKE_BUILD_TYPE }} && `
cmake --build ${{ env.BUILD_DIR }} --parallel 8 --config ${{ env.CMAKE_BUILD_TYPE }} --target sea_itt_lib
- name: Show sccache stats
run: '& "$Env:SCCACHE_PATH" --show-stats'
- name: Cmake install - OpenVINO
run: cmake -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }} -P ${{ env.BUILD_DIR }}/cmake_install.cmake
@@ -143,7 +182,7 @@ jobs:
shell: cmd
run: |
set path=%path%;${{ env.OPENVINO_REPO }}\temp\tbb\bin
python3 ${{ env.OPENVINO_REPO }}\thirdparty\itt_collector\runtool\sea_runtool.py ^
--bindir ${{ env.OPENVINO_REPO }}\bin\intel64\${{ env.CMAKE_BUILD_TYPE }} ^
-o ${{ env.SELECTIVE_BUILD_STAT_DIR }}\itt_stat ! ${{ env.OPENVINO_REPO }}\bin\intel64\${{ env.CMAKE_BUILD_TYPE }}\benchmark_app.exe ^
@@ -199,7 +238,7 @@ jobs:
defaults:
run:
shell: pwsh
runs-on: windows-latest-8-cores
runs-on: aks-win-16-cores-32gb
env:
CMAKE_BUILD_TYPE: 'Release'
CMAKE_CXX_COMPILER_LAUNCHER: sccache
@@ -208,6 +247,7 @@ jobs:
BUILD_DIR: "${{ github.workspace }}\\openvino_build"
MODELS_PATH: "${{ github.workspace }}\\testdata"
SELECTIVE_BUILD_STAT_DIR: "${{ github.workspace }}\\selective_build_stat"
SCCACHE_AZURE_KEY_PREFIX: windows2022_x86_64_cc_Release
steps:
- name: Clone OpenVINO
uses: actions/checkout@v4
@@ -221,10 +261,10 @@ jobs:
repository: 'openvinotoolkit/testdata'
path: 'testdata'
lfs: 'true'
ref: 'releases/2023/2'
ref: 'master'
- name: Download selective build statistics package
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: openvino_selective_build_stat
path: ${{ env.SELECTIVE_BUILD_STAT_DIR }}
@@ -232,6 +272,18 @@ jobs:
- name: Extract selective build statistics package
run: Expand-Archive ${{ env.SELECTIVE_BUILD_STAT_DIR }}/openvino_selective_build_stat.zip -DestinationPath "${{ env.SELECTIVE_BUILD_STAT_DIR }}"
- name: Setup Python ${{ env.PYTHON_VERSION }}
uses: ./openvino/.github/actions/setup_python
with:
version: ${{ env.PYTHON_VERSION }}
should-setup-pip-paths: 'false'
self-hosted-runner: 'false'
- name: Install sccache
uses: mozilla-actions/sccache-action@v0.0.3
with:
version: "v0.5.4"
- name: CMake configure - CC ON
run: |
cmake `
@@ -250,9 +302,15 @@ jobs:
-S ${{ env.OPENVINO_REPO }} `
-B ${{ env.BUILD_DIR }}
- name: Clean sccache stats
run: '& "$Env:SCCACHE_PATH" --zero-stats'
- name: Cmake build - CC ON
run: cmake --build ${{ env.BUILD_DIR }} --parallel --config ${{ env.CMAKE_BUILD_TYPE }} --target benchmark_app
- name: Show sccache stats
run: '& "$Env:SCCACHE_PATH" --show-stats'
- name: List bin files
shell: cmd
run: dir ${{ env.OPENVINO_REPO }}\bin\ /s
@@ -266,18 +324,20 @@ jobs:
CPU_Functional_Tests:
name: CPU functional tests
needs: Build
timeout-minutes: 70
defaults:
run:
shell: pwsh
runs-on: windows-latest-8-cores
runs-on: aks-win-8-cores-16gb
env:
OPENVINO_REPO: "${{ github.workspace }}\\openvino"
INSTALL_TEST_DIR: "${{ github.workspace }}\\tests_install"
PARALLEL_TEST_SCRIPT: "${{ github.workspace }}\\tests_install\\layer_tests_summary\\run_parallel.py"
PARALLEL_TEST_CACHE: "${{ github.workspace }}\\tests_install\\test_cache.lst"
steps:
- name: Download OpenVINO tests package
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: openvino_tests
path: ${{ env.INSTALL_TEST_DIR }}
@@ -285,9 +345,20 @@ jobs:
- name: Extract OpenVINO tests package
run: Expand-Archive ${{ env.INSTALL_TEST_DIR }}/openvino_tests.zip -DestinationPath "${{ env.INSTALL_TEST_DIR }}"
- uses: actions/setup-python@v4
- name: Fetch setup_python action
uses: actions/checkout@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
sparse-checkout: |
.github/actions/setup_python/action.yml
sparse-checkout-cone-mode: false
path: 'openvino'
- name: Setup Python ${{ env.PYTHON_VERSION }}
uses: ./openvino/.github/actions/setup_python
with:
version: ${{ env.PYTHON_VERSION }}
should-setup-pip-paths: 'false'
self-hosted-runner: 'false'
- name: Install python dependencies for run_parallel.py
run: python3 -m pip install -r ${{ env.INSTALL_TEST_DIR }}/layer_tests_summary/requirements.txt

3
.gitignore vendored
View File

@@ -7,7 +7,7 @@ cmake-build*
!__init__.py
!__main__.py
# and sphinx documentation folders
!docs/_*
!docs/sphinx_setup/_*
# developer tools
*.idea
@@ -61,3 +61,4 @@ __pycache__
/tools/mo/*.svg
/src/plugins/intel_cpu/tools/commit_slider/*.json
/src/plugins/intel_cpu/tools/commit_slider/slider_cache/*
.github/GITHUB_OUTPUT

View File

@@ -4,8 +4,14 @@
OpenVINO™ is always looking for opportunities to improve and your contributions
play a big role in this process. There are several ways you can make the
product better:
product better.
# Table of Contents
1. [Forms of contribution](#Forms-of-contribution)
2. [Technical guide](#Technical-guide)
## Forms of contribution
### Provide Feedback
@@ -32,7 +38,7 @@ product better:
If you want to help improving OpenVINO, choose one of the issues reported in
[GitHub Issue Tracker](https://github.com/openvinotoolkit/openvino/issues) and
[create a Pull Request](./CONTRIBUTING_PR.md) addressing it. Consider one of the
tasks listed as [first-time contributions](https://github.com/openvinotoolkit/openvino/issues/17502).
tasks listed as [first-time contributions](https://github.com/orgs/openvinotoolkit/projects/3).
If the feature you want to develop is more complex or not well defined by the reporter,
it is always a good idea to [discuss it](https://github.com/openvinotoolkit/openvino/discussions)
with OpenVINO developers first. Before creating a new PR, check if nobody is already
@@ -81,6 +87,66 @@ product better:
share your expertise with the community. Check GitHub Discussions and
Issues to see if you can help someone.
## Technical guide
This section lists all the necessary steps required to set up your environment, build OpenVINO locally, and run tests for specific components. It's a perfect place to start when you have just picked a Good First Issue and are wondering how to start working on it.
Keep in mind that we are here to help - **do not hesitate to ask the development team if something is not clear**. Such questions allow us to keep improving our documentation.
### 1. Prerequisites
You can start with the following links:
- [What is OpenVINO?](https://github.com/openvinotoolkit/openvino#what-is-openvino-toolkit)
- [OpenVINO architecture](https://github.com/openvinotoolkit/openvino/blob/master/src/docs/architecture.md)
- [User documentation](https://docs.openvino.ai/)
- [Blog post on contributing to OpenVINO](https://medium.com/openvino-toolkit/how-to-contribute-to-an-ai-open-source-project-c741f48e009e)
- [Pick up a Good First Issue](https://github.com/orgs/openvinotoolkit/projects/3)
### 2. Building the project
In order to build the project, follow the [build instructions for your specific OS](https://github.com/openvinotoolkit/openvino/blob/master/docs/dev/build.md).
### 3. Familiarize yourself with the component you'll be working with
Choose the component your Good First Issue is related to. You can run tests to make sure it works correctly.
##### APIs
- [C API](https://github.com/openvinotoolkit/openvino/tree/master/src/bindings/c)
- [Core](https://github.com/openvinotoolkit/openvino/tree/master/src/core)
- [Python API](https://github.com/openvinotoolkit/openvino/tree/master/src/bindings/python)
##### Frontends
- [IR Frontend](https://github.com/openvinotoolkit/openvino/tree/master/src/frontends/ir)
- [ONNX Frontend](https://github.com/openvinotoolkit/openvino/tree/master/src/frontends/onnx)
- [PaddlePaddle Frontend](https://github.com/openvinotoolkit/openvino/tree/master/src/frontends/paddle)
- [PyTorch Frontend](https://github.com/openvinotoolkit/openvino/tree/master/src/frontends/pytorch)
- [TensorFlow Frontend](https://github.com/openvinotoolkit/openvino/tree/master/src/frontends/tensorflow)
##### Plugins
- [Auto plugin](https://github.com/openvinotoolkit/openvino/blob/master/src/plugins/auto)
- [CPU plugin](https://github.com/openvinotoolkit/openvino/blob/master/src/plugins/intel_cpu)
- [GPU plugin](https://github.com/openvinotoolkit/openvino/blob/master/src/plugins/intel_gpu)
- [Hetero plugin](https://github.com/openvinotoolkit/openvino/blob/master/src/plugins/hetero)
- [Template plugin](https://github.com/openvinotoolkit/openvino/tree/master/src/plugins/template)
##### Tools
- [Benchmark Tool](https://github.com/openvinotoolkit/openvino/tree/master/tools/benchmark_tool)
- [Model Optimizer](https://github.com/openvinotoolkit/openvino/tree/master/tools/mo)
##### Others
- [Documentation](https://github.com/openvinotoolkit/openvino/blob/master/CONTRIBUTING_DOCS.md)
### 3. Start working on your Good First Issue
Use the issue description and locally built OpenVINO to complete the task. Remember that you can always ask users tagged in the "Contact points" section for help!
### 4. Submit a PR with your changes
Follow our [Good Pull Request guidelines](https://github.com/openvinotoolkit/openvino/blob/master/CONTRIBUTING_PR.md).
### 5. Wait for a review
We'll make sure to review your Pull Request as soon as possible and provide you with our feedback. You can expect a merge once your changes are validated with automatic tests and approved by maintainers.
## License

View File

@@ -87,11 +87,6 @@ function(ov_set_temp_directory temp_variable source_tree_dir)
endif()
endfunction()
macro(set_temp_directory)
message(WARNING "'set_temp_directory' is deprecated. Please, use 'ov_set_temp_directory'")
ov_set_temp_directory(${ARGV})
endmacro()
#
# For cross-compilation
#
@@ -294,11 +289,6 @@ function(ov_mark_target_as_cc TARGET_NAME)
add_dependencies(${TARGET_NAME} conditional_compilation_gen)
endfunction()
function(ie_mark_target_as_cc TARGET_NAME)
message(WARNING "This function is deprecated. Please use ov_mark_target_as_cc(TARGET_NAME) instead.")
ov_mark_target_as_cc(${TARGET_NAME})
endfunction()
include(python_requirements)
# Code style utils

View File

@@ -181,15 +181,3 @@ function(ov_add_test_target)
COMPONENT ${ARG_COMPONENT}
EXCLUDE_FROM_ALL)
endfunction()
# deprecated
function(addIeTarget)
message(WARNING "'addIeTarget' is deprecated, please, use 'ov_add_target' instead")
ov_add_target(${ARGV})
endfunction()
function(addIeTargetTest)
message(WARNING "'addIeTargetTest' is deprecated, please, use 'ov_add_test_target' instead")
ov_add_test_target(${ARGV})
endfunction()

View File

@@ -196,10 +196,3 @@ endfunction()
function(ov_add_api_validator_post_build_step)
_ov_add_api_validator_post_build_step(${ARGN})
endfunction()
# deprecated
function(ie_add_api_validator_post_build_step)
message(WARNING "'ie_add_api_validator_post_build_step' is deprecated, use 'ov_add_api_validator_post_build_step' instead")
_ov_add_api_validator_post_build_step(${ARGN})
endfunction()

View File

@@ -130,8 +130,3 @@ function(ov_add_clang_format_target TARGET_NAME)
add_dependencies(clang_format_check_all ${TARGET_NAME})
add_dependencies(clang_format_fix_all ${TARGET_NAME}_fix)
endfunction()
function(add_clang_format_target)
message(WARNING "add_clang_format_target is deprecated, use ov_add_clang_format_target instead")
ov_add_clang_format_target(${ARGV})
endfunction()

View File

@@ -32,11 +32,6 @@ macro(ov_disable_deprecated_warnings)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ov_c_cxx_deprecated}")
endmacro()
macro(disable_deprecated_warnings)
message(WARNING "'disable_deprecated_warnings' is deprecated, use 'ov_disable_deprecated_warnings' instead")
ov_disable_deprecated_warnings()
endmacro()
#
# ov_deprecated_no_errors()
#
@@ -125,7 +120,7 @@ macro(ov_avx2_optimization_flags flags)
set(${flags} -xCORE-AVX2)
endif()
elseif(OV_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_GNUCXX)
set(${flags} -mavx2 -mfma)
set(${flags} -mavx2 -mfma -mf16c)
else()
message(WARNING "Unsupported CXX compiler ${CMAKE_CXX_COMPILER_ID}")
endif()
@@ -147,7 +142,7 @@ macro(ov_avx512_optimization_flags flags)
set(${flags} -xCOMMON-AVX512)
endif()
elseif(OV_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_GNUCXX)
set(${flags} -mavx512f -mfma)
set(${flags} -mavx512f -mfma -mf16c)
else()
message(WARNING "Unsupported CXX compiler ${CMAKE_CXX_COMPILER_ID}")
endif()
@@ -213,16 +208,6 @@ function(ov_disable_all_warnings)
endforeach()
endfunction()
#
# ie_enable_lto()
#
# Enables Link Time Optimization compilation
#
macro(ie_enable_lto)
message(WARNING "'ie_enable_lto' is deprecated, set 'INTERPROCEDURAL_OPTIMIZATION_RELEASE' target property instead")
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ON)
endmacro()
#
# ov_add_compiler_flags(<flag1 [flag2 flag3 ...>])
#
@@ -235,11 +220,6 @@ macro(ov_add_compiler_flags)
endforeach()
endmacro()
macro(ie_add_compiler_flags)
message(WARNING "'ie_add_compiler_flags' is deprecated, use 'ov_add_compiler_flags' instead")
ov_add_compiler_flags(${ARGN})
endmacro()
#
# ov_force_include(<target> <PUBLIC | PRIVATE | INTERFACE> <header file>)
#

View File

@@ -19,10 +19,3 @@ function(ov_build_target_faster TARGET_NAME)
target_precompile_headers(${TARGET_NAME} ${FASTER_BUILD_PCH})
endif()
endfunction()
# deprecated
function(ie_faster_build)
message(WARNING "ie_faster_build is deprecated, use ov_build_target_faster instead")
ov_build_target_faster(${ARGV})
endfunction()

View File

@@ -57,10 +57,10 @@ function(ov_generate_frontends_hpp)
# for some reason dependency on source files does not work
# so, we have to use explicit target and make it dependency for frontend_common
add_custom_target(_ov_frontends_hpp DEPENDS ${ov_frontends_hpp})
add_dependencies(frontend_common_obj _ov_frontends_hpp)
add_dependencies(openvino_frontend_common_obj _ov_frontends_hpp)
# add dependency for object files
get_target_property(sources frontend_common_obj SOURCES)
get_target_property(sources openvino_frontend_common_obj SOURCES)
foreach(source IN LISTS sources)
if("${source}" MATCHES "\\$\\<TARGET_OBJECTS\\:([A-Za-z0-9_]*)\\>")
# object library
@@ -80,6 +80,25 @@ endfunction()
unset(protobuf_lite_installed CACHE)
unset(protobuf_installed CACHE)
#
# ov_frontend_group_files(<ROOT_DIR> # Root path for scanning
# <REL_PATH> # Relative path (in ROOT_DIR) is used for scanning
# <FILE_EXT>) # File extension for grouping
#
macro(ov_frontend_group_files root_dir rel_path file_mask)
file(GLOB items RELATIVE ${root_dir}/${rel_path} ${root_dir}/${rel_path}/*)
foreach(item ${items})
if(IS_DIRECTORY ${root_dir}/${rel_path}/${item})
ov_frontend_group_files(${root_dir} ${rel_path}/${item} ${file_mask})
else()
if(${item} MATCHES ".*\.${file_mask}$")
string(REPLACE "/" "\\" groupname ${rel_path})
source_group(${groupname} FILES ${root_dir}/${rel_path}/${item})
endif()
endif()
endforeach()
endmacro()
#
# ov_add_frontend(NAME <IR|ONNX|...>
# FILEDESCRIPTION <description> # used on Windows to describe DLL file
@@ -121,7 +140,8 @@ macro(ov_add_frontend)
# Create named folders for the sources within the .vcproj
# Empty name lists them directly under the .vcproj
source_group("src" FILES ${LIBRARY_SRC})
ov_frontend_group_files(${frontend_root_dir}/ "src" "cpp")
ov_frontend_group_files(${frontend_root_dir}/ "src" "proto")
source_group("include" FILES ${LIBRARY_HEADERS})
source_group("public include" FILES ${LIBRARY_PUBLIC_HEADERS})
@@ -200,6 +220,7 @@ macro(ov_add_frontend)
PUBLIC
$<BUILD_INTERFACE:${${TARGET_NAME}_INCLUDE_DIR}>
PRIVATE
$<TARGET_PROPERTY:openvino::frontend::common,INTERFACE_INCLUDE_DIRECTORIES>
${frontend_root_dir}/src
${CMAKE_CURRENT_BINARY_DIR})
@@ -322,6 +343,7 @@ macro(ov_add_frontend)
install(DIRECTORY ${${TARGET_NAME}_INCLUDE_DIR}/openvino
DESTINATION ${FRONTEND_INSTALL_INCLUDE}
COMPONENT ${dev_component}
${OV_CPACK_COMP_CORE_DEV_EXCLUDE_ALL}
FILES_MATCHING PATTERN "*.hpp")
# public target name

View File

@@ -32,6 +32,8 @@ if(ENABLE_NCC_STYLE)
set(clang_version 14)
elseif(Python3_VERSION_MINOR EQUAL 11)
set(clang_version 14)
elseif(Python3_VERSION_MINOR EQUAL 12)
set(clang_version 15)
else()
message(WARNING "Cannot suggest clang package for python ${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}")
endif()

View File

@@ -18,7 +18,7 @@ VariableReference: '^\w+$'
EnumName: '^[A-Z][\w]+$'
# excepts element_type
EnumConstantName: '^([A-Z\d_]+|undefined|dynamic|boolean|bf16|f16|f32|f64|i4|i8|i16|i32|i64|u1|u4|u8|u16|u32|u64|nf4|asymmetric|align_corners|round_prefer_floor|round_prefer_ceil|floor|ceil|simple|nearest|linear|linear_onnx|cubic|area|scales|sizes|half_pixel|tf_half_pixel_for_nn|pytorch_half_pixel|asymetric)$'
EnumConstantName: '^([A-Z\d_]+|undefined|dynamic|boolean|bf16|f16|f32|f64|i4|i8|i16|i32|i64|u1|u4|u8|u16|u32|u64|nf4|string|asymmetric|align_corners|round_prefer_floor|round_prefer_ceil|floor|ceil|simple|nearest|linear|linear_onnx|cubic|area|scales|sizes|half_pixel|tf_half_pixel_for_nn|pytorch_half_pixel|asymetric)$'
# TODO: align
UsingDeclaration: '^.*$'
TypedefName: '^.*$'

View File

@@ -2,4 +2,5 @@ clang==12.0.1; python_version == '3.8'
clang==12.0.1; python_version == '3.9'
clang==14.0; python_version == '3.10'
clang==14.0; python_version == '3.11'
clang==15.0.7; python_version == '3.12'
pyyaml

View File

@@ -55,20 +55,3 @@ function (ov_print_enabled_features)
endforeach()
message(STATUS "")
endfunction()
# deprecated
macro (ie_option variable description value)
message(WARNING "'ie_option' is deprecated, please, use 'ov_option' instead")
ov_option(${variable} "${description}" ${value})
endmacro()
macro(ie_dependent_option variable description def_value condition fallback_value)
message(WARNING "'ie_dependent_option' is deprecated, please, use 'ov_dependent_option' instead")
ov_dependent_option(${variable} "${description}" ${def_value} "${condition}" ${fallback_value})
endmacro()
function(print_enabled_features)
message(WARNING "'print_enabled_features' is deprecated, please, use 'ov_print_enabled_features' instead")
ov_print_enabled_features()
endfunction()

View File

@@ -241,10 +241,3 @@ macro(ov_cpack)
include(CPack)
endmacro()
# deprecated
macro(ie_cpack)
message(WARNING "'ie_cpack' is deprecated. Please, use 'ov_cpack'")
ov_cpack(${ARGV})
endmacro()

View File

@@ -135,9 +135,6 @@ function(ov_add_plugin)
install(TARGETS ${OV_PLUGIN_NAME}
LIBRARY DESTINATION ${OV_CPACK_PLUGINSDIR}
COMPONENT ${install_component})
install(TARGETS ${OV_PLUGIN_NAME}
LIBRARY DESTINATION ${OV_CPACK_PLUGINSDIR}
COMPONENT ${install_component})
else()
ov_install_static_lib(${OV_PLUGIN_NAME} ${OV_CPACK_COMP_CORE})
endif()
@@ -167,11 +164,6 @@ function(ov_add_plugin)
endif()
endfunction()
function(ie_add_plugin)
message(WARNING "'ie_add_plugin' is deprecated. Please, use 'ov_add_plugin'")
ov_add_plugin(${ARGN})
endfunction()
#
# ov_register_in_plugins_xml(MAIN_TARGET <main target name>)
#
@@ -263,14 +255,6 @@ macro(ov_register_plugins)
endif()
endmacro()
#
# ie_register_plugins()
#
macro(ie_register_plugins)
message(WARNING "'ie_register_plugins' is deprecated. Please, use 'ov_register_plugins'")
ov_register_plugins(${ARGN})
endmacro()
#
# ov_target_link_plugins(<TARGET_NAME>)
#

View File

@@ -10,8 +10,11 @@ function(ov_branch_name VAR REPO_ROOT)
COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY ${REPO_ROOT}
OUTPUT_VARIABLE GIT_BRANCH
RESULT_VARIABLE EXIT_CODE
OUTPUT_STRIP_TRAILING_WHITESPACE)
set (${VAR} ${GIT_BRANCH} PARENT_SCOPE)
if(EXIT_CODE EQUAL 0)
set(${VAR} ${GIT_BRANCH} PARENT_SCOPE)
endif()
endif()
endfunction()
@@ -21,22 +24,31 @@ function(ov_commit_hash VAR REPO_ROOT)
COMMAND ${GIT_EXECUTABLE} rev-parse --short=11 HEAD
WORKING_DIRECTORY ${REPO_ROOT}
OUTPUT_VARIABLE GIT_COMMIT_HASH
RESULT_VARIABLE EXIT_CODE
OUTPUT_STRIP_TRAILING_WHITESPACE)
set (${VAR} ${GIT_COMMIT_HASH} PARENT_SCOPE)
if(EXIT_CODE EQUAL 0)
set(${VAR} ${GIT_COMMIT_HASH} PARENT_SCOPE)
endif()
endif()
endfunction()
function(ov_commit_number VAR REPO_ROOT)
set(GIT_COMMIT_NUMBER_FOUND OFF)
if(GIT_FOUND)
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-list --count --first-parent HEAD
WORKING_DIRECTORY ${REPO_ROOT}
OUTPUT_VARIABLE GIT_COMMIT_NUMBER
RESULT_VARIABLE EXIT_CODE
OUTPUT_STRIP_TRAILING_WHITESPACE)
set (${VAR} ${GIT_COMMIT_NUMBER} PARENT_SCOPE)
else()
if(EXIT_CODE EQUAL 0)
set(GIT_COMMIT_NUMBER_FOUND ON)
set(${VAR} ${GIT_COMMIT_NUMBER} PARENT_SCOPE)
endif()
endif()
if(NOT GIT_COMMIT_NUMBER_FOUND)
# set zeros since git is not available
set (${VAR} "000" PARENT_SCOPE)
set(${VAR} "000" PARENT_SCOPE)
endif()
endfunction()
@@ -140,7 +152,7 @@ macro(ov_parse_ci_build_number repo_root)
ov_branch_name(GIT_BRANCH "${repo_root}")
ov_commit_hash(GIT_COMMIT_HASH "${repo_root}")
if(NOT GIT_BRANCH STREQUAL "master")
if(NOT GIT_BRANCH MATCHES "^(master|HEAD)$")
set(GIT_BRANCH_POSTFIX "-${GIT_BRANCH}")
endif()
@@ -154,28 +166,6 @@ macro(ov_parse_ci_build_number repo_root)
endif()
endmacro()
macro (addVersionDefines FILE)
message(WARNING "'addVersionDefines' is deprecated. Please, use 'ov_add_version_defines'")
set(__version_file ${FILE})
if(NOT IS_ABSOLUTE ${__version_file})
set(__version_file "${CMAKE_CURRENT_SOURCE_DIR}/${__version_file}")
endif()
if(NOT EXISTS ${__version_file})
message(FATAL_ERROR "${FILE} does not exists in current source directory")
endif()
foreach (VAR ${ARGN})
if (DEFINED ${VAR} AND NOT "${${VAR}}" STREQUAL "")
set_property(
SOURCE ${__version_file}
APPEND
PROPERTY COMPILE_DEFINITIONS
${VAR}="${${VAR}}")
endif()
endforeach()
unset(__version_file)
endmacro()
macro (ov_add_version_defines FILE TARGET)
set(__version_file ${FILE})
if(NOT IS_ABSOLUTE ${__version_file})

View File

@@ -51,10 +51,3 @@ function(ov_target_link_whole_archive targetName)
target_link_libraries(${targetName} PRIVATE ${libs})
endif()
endfunction()
# deprecated
function(ieTargetLinkWholeArchive)
message(WARNING "'ieTargetLinkWholeArchive' is deprecated, use 'ov_target_link_whole_archive' instead")
ov_target_link_whole_archive(${ARGN})
endfunction()

View File

@@ -2,38 +2,6 @@
# SPDX-License-Identifier: Apache-2.0
#
function(ie_generate_dev_package_config)
# dummy check that OpenCV is here
find_package(OpenCV QUIET)
if(OpenCV_VERSION VERSION_LESS 3.0)
set(OpenCV_FOUND OFF)
endif()
# export all targets with prefix and use them during extra modules build
export(TARGETS ${_OPENVINO_DEVELOPER_PACKAGE_TARGETS} NAMESPACE IE::
APPEND FILE "${CMAKE_BINARY_DIR}/inference_engine_developer_package_targets.cmake")
add_custom_target(ie_dev_targets DEPENDS ${_OPENVINO_DEVELOPER_PACKAGE_TARGETS})
set(PATH_VARS "OpenVINO_SOURCE_DIR")
if(ENABLE_SAMPLES OR ENABLE_TESTS)
list(APPEND PATH_VARS "gflags_BINARY_DIR")
# if we've found system gflags
if(gflags_DIR)
set(gflags_BINARY_DIR "${gflags_DIR}")
endif()
endif()
configure_package_config_file("${OpenVINO_SOURCE_DIR}/cmake/templates/InferenceEngineDeveloperPackageConfig.cmake.in"
"${CMAKE_BINARY_DIR}/InferenceEngineDeveloperPackageConfig.cmake"
INSTALL_DESTINATION share # not used
PATH_VARS ${PATH_VARS}
NO_CHECK_REQUIRED_COMPONENTS_MACRO)
configure_file("${OpenVINO_SOURCE_DIR}/cmake/templates/InferenceEngineConfig-version.cmake.in"
"${CMAKE_BINARY_DIR}/InferenceEngineDeveloperPackageConfig-version.cmake"
@ONLY)
endfunction()
function(ov_generate_dev_package_config)
# dummy check that OpenCV is here
find_package(OpenCV QUIET)
@@ -207,7 +175,6 @@ endfunction()
# this OpenVINODeveloperPackageConfig.cmake is not used during extra modules build
# since it's generated after modules are configured
ie_generate_dev_package_config()
ov_generate_dev_package_config()
# extra modules must be registered after inference_engine library

View File

@@ -92,6 +92,7 @@ macro(ov_cpack_settings)
2022.3.0 2022.3.1 2022.3.2 2022.3.3 2022.3.4 2022.3.5
2023.0.0 2023.0.1 2023.0.2 2023.0.3
2023.1.0
2023.2.0
)
#
@@ -316,7 +317,7 @@ macro(ov_cpack_settings)
list(APPEND CPACK_COMPONENT_PYOPENVINO_PACKAGE_${pyversion}_DEPENDS ${installed_plugins})
list(APPEND CPACK_COMPONENT_PYOPENVINO_PACKAGE_${pyversion}_DEPENDS ${frontends})
set(CPACK_DEBIAN_PYOPENVINO_PACKAGE_${pyversion}_PACKAGE_NAME "python3-openvino")
set(CPACK_DEBIAN_PYOPENVINO_PACKAGE_${pyversion}_PACKAGE_NAME "python3-openvino-${cpack_name_ver}")
set(python_package "${CPACK_DEBIAN_PYOPENVINO_PACKAGE_${pyversion}_PACKAGE_NAME} (= ${cpack_full_ver})")
set(CPACK_DEBIAN_PYOPENVINO_PACKAGE_${pyversion}_PACKAGE_DEPENDS "python3, python3-numpy")
@@ -367,6 +368,7 @@ macro(ov_cpack_settings)
set(python_samples_package "${CPACK_DEBIAN_PYTHON_SAMPLES_PACKAGE_NAME} (= ${cpack_full_ver})")
set(CPACK_DEBIAN_PYTHON_SAMPLES_PACKAGE_DEPENDS "python3, ${python_package}")
set(CPACK_DEBIAN_PYTHON_SAMPLES_PACKAGE_ARCHITECTURE "all")
ov_debian_generate_conflicts(${OV_CPACK_COMP_PYTHON_SAMPLES} ${conflicting_versions})
set(python_samples_copyright "generic")
endif()

View File

@@ -78,6 +78,7 @@ macro(ov_cpack_settings)
2022.3.0 2022.3.1 2022.3.2 2022.3.3 2022.3.4 2022.3.5
2023.0.0 2023.0.1 2023.0.2 2023.0.3
2023.1.0
2023.2.0
)
find_host_program(rpmlint_PROGRAM NAMES rpmlint DOC "Path to rpmlint")
@@ -278,7 +279,7 @@ macro(ov_cpack_settings)
set(CPACK_COMPONENT_PYOPENVINO_PACKAGE_${pyversion_upper}_DESCRIPTION "OpenVINO Python API")
set(CPACK_RPM_PYOPENVINO_PACKAGE_${pyversion_upper}_PACKAGE_REQUIRES
"${core_package}, ${frontend_packages}, ${plugin_packages}, python3, python3-numpy")
set(CPACK_RPM_PYOPENVINO_PACKAGE_${pyversion_upper}_PACKAGE_NAME "python3-openvino")
set(CPACK_RPM_PYOPENVINO_PACKAGE_${pyversion_upper}_PACKAGE_NAME "python3-openvino-${cpack_full_ver}")
set(python_package "${CPACK_RPM_PYOPENVINO_PACKAGE_${pyversion_upper}_PACKAGE_NAME} = ${cpack_full_ver}")
set(${python_component}_copyright "generic")
@@ -328,6 +329,7 @@ macro(ov_cpack_settings)
set(CPACK_RPM_PYTHON_SAMPLES_PACKAGE_NAME "openvino-samples-python-${cpack_name_ver}")
set(python_samples_package "${CPACK_RPM_PYTHON_SAMPLES_PACKAGE_NAME} = ${cpack_full_ver}")
set(CPACK_RPM_PYTHON_SAMPLES_PACKAGE_ARCHITECTURE "noarch")
ov_rpm_generate_conflicts(${OV_CPACK_COMP_PYTHON_SAMPLES} ${conflicting_versions})
set(python_samples_copyright "generic")
ov_rpm_add_rpmlint_suppression(${OV_CPACK_COMP_PYTHON_SAMPLES}

View File

@@ -1,188 +0,0 @@
# Copyright (C) 2018-2023 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
message(WARNING "find_package(InferenceEngineDeveloperPackage) is deprecated and will be removed in 2024.0 release. Please, use find_package(OpenVINODeveloperPackage)")
# TODO: remove after changing [private plugins]
set_and_check(OpenVINO_SOURCE_DIR "@OpenVINO_SOURCE_DIR@") # NPU
set_and_check(OpenVINO_MAIN_SOURCE_DIR "@OpenVINO_SOURCE_DIR@") # NPU
# Variables to export in plugin's projects
set(ov_options "@OV_OPTIONS@")
list(APPEND ov_options CMAKE_CXX_COMPILER_LAUNCHER CMAKE_C_COMPILER_LAUNCHER
CMAKE_CXX_LINKER_LAUNCHER CMAKE_C_LINKER_LAUNCHER
CMAKE_INSTALL_PREFIX CPACK_GENERATOR)
if(APPLE)
list(APPEND ov_options CMAKE_OSX_ARCHITECTURES CMAKE_OSX_DEPLOYMENT_TARGET)
endif()
get_property(_OV_GENERATOR_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(_OV_GENERATOR_MULTI_CONFIG)
list(APPEND ov_options CMAKE_CONFIGURATION_TYPES)
if(CMAKE_GENERATOR MATCHES "^Ninja Multi-Config$")
list(APPEND ov_options CMAKE_DEFAULT_BUILD_TYPE)
endif()
else()
list(APPEND ov_options CMAKE_BUILD_TYPE)
endif()
unset(_OV_GENERATOR_MULTI_CONFIG)
file(TO_CMAKE_PATH "${CMAKE_CURRENT_LIST_DIR}" cache_path)
message(STATUS "The following CMake options are exported from Inference Engine Developer package")
message(" ")
foreach(option IN LISTS ov_options)
if(NOT DEFINED "${option}")
load_cache("${cache_path}" READ_WITH_PREFIX "" ${option})
endif()
message(" ${option}: ${${option}}")
endforeach()
message(" ")
# for samples in 3rd party projects
if(ENABLE_SAMPLES)
set_and_check(gflags_DIR "@gflags_BINARY_DIR@")
endif()
# Disable warning as error for private components
set(CMAKE_COMPILE_WARNING_AS_ERROR OFF)
#
# Content
#
find_dependency(OpenVINODeveloperScripts
PATHS "${OpenVINO_SOURCE_DIR}/cmake/developer_package"
NO_CMAKE_FIND_ROOT_PATH
NO_DEFAULT_PATH)
find_dependency(InferenceEngine
PATHS "${CMAKE_CURRENT_LIST_DIR}"
NO_CMAKE_FIND_ROOT_PATH
NO_DEFAULT_PATH)
find_dependency(ngraph
PATHS "${CMAKE_CURRENT_LIST_DIR}"
NO_CMAKE_FIND_ROOT_PATH
NO_DEFAULT_PATH)
if(TARGET openvino::runtime AND NOT TARGET IE::runtime)
add_library(IE::runtime INTERFACE IMPORTED)
set_target_properties(IE::runtime PROPERTIES
INTERFACE_LINK_LIBRARIES openvino::runtime)
endif()
# WA for cmake: it exports ngraph as IE::ngraph in the IE export list
# while we already have ngraph export in its own export list as ngraph::ngraph
if(TARGET ngraph::ngraph AND NOT TARGET IE::ngraph)
add_library(IE::ngraph INTERFACE IMPORTED)
set_target_properties(IE::ngraph PROPERTIES INTERFACE_LINK_LIBRARIES ngraph::ngraph)
endif()
_ov_find_tbb()
include("${CMAKE_CURRENT_LIST_DIR}/inference_engine_developer_package_targets.cmake")
if(TARGET IE::ov_core_dev AND NOT TARGET openvino::core::dev)
add_library(openvino::core::dev INTERFACE IMPORTED)
set_target_properties(openvino::core::dev PROPERTIES
INTERFACE_LINK_LIBRARIES IE::ov_core_dev)
endif()
if(TARGET IE::runtime::dev AND NOT TARGET openvino::runtime::dev)
add_library(openvino::runtime::dev INTERFACE IMPORTED)
set_target_properties(openvino::runtime::dev PROPERTIES
INTERFACE_LINK_LIBRARIES IE::runtime::dev)
endif()
if(TARGET IE::reference AND NOT TARGET IE::ngraph_reference)
add_library(IE::ngraph_reference INTERFACE IMPORTED)
set_target_properties(IE::ngraph_reference PROPERTIES
INTERFACE_LINK_LIBRARIES IE::reference)
endif()
if(ENABLE_SYSTEM_PUGIXML)
set(_ov_pugixml_pkgconfig_interface "@pugixml_FOUND@")
set(_ov_pugixml_cmake_interface "@PugiXML_FOUND@")
if(_ov_pugixml_pkgconfig_interface)
find_dependency(PkgConfig)
elseif(_ov_pugixml_cmake_interface)
find_dependency(PugiXML)
endif()
if(PugiXML_FOUND)
set_property(TARGET pugixml PROPERTY IMPORTED_GLOBAL TRUE)
add_library(IE::pugixml ALIAS pugixml)
elseif(PkgConfig_FOUND)
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
set(pkg_config_quiet_arg QUIET)
endif()
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED)
set(pkg_config_required_arg REQUIRED)
endif()
pkg_search_module(pugixml
${pkg_config_quiet_arg}
${pkg_config_required_arg}
IMPORTED_TARGET GLOBAL
pugixml)
unset(pkg_config_quiet_arg)
unset(pkg_config_required_arg)
if(pugixml_FOUND)
add_library(IE::pugixml ALIAS PkgConfig::pugixml)
# PATCH: on Ubuntu 18.04 pugixml.pc contains incorrect include directories
get_target_property(interface_include_dir PkgConfig::pugixml INTERFACE_INCLUDE_DIRECTORIES)
if(interface_include_dir AND NOT EXISTS "${interface_include_dir}")
set_target_properties(PkgConfig::pugixml PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "")
endif()
endif()
endif()
# debian 9 case: no cmake, no pkg-config files
if(NOT TARGET IE::pugixml)
find_library(PUGIXML_LIBRARY NAMES pugixml DOC "Path to pugixml library")
if(PUGIXML_LIBRARY)
add_library(IE::pugixml INTERFACE IMPORTED GLOBAL)
set_target_properties(IE::pugixml PROPERTIES INTERFACE_LINK_LIBRARIES "${PUGIXML_LIBRARY}")
else()
message(FATAL_ERROR "Failed to find system pugixml in OpenVINO Developer Package")
endif()
endif()
endif()
set(_ov_nlohmann_json_FOUND "@nlohmann_json_FOUND@")
if(_ov_nlohmann_json_FOUND)
find_dependency(nlohmann_json)
set_target_properties(nlohmann_json::nlohmann_json PROPERTIES IMPORTED_GLOBAL ON)
add_library(IE::nlohmann_json ALIAS nlohmann_json::nlohmann_json)
endif()
unset(_ov_nlohmann_json_FOUND)
# inherit OpenCV from main IE project if enabled
if("@OpenCV_FOUND@")
# Use OpenCV_DIR from cache only if user doesn't define OpenCV_DIR
if(NOT OpenCV_DIR)
load_cache("${cache_path}" READ_WITH_PREFIX "" OpenCV_DIR)
endif()
find_dependency(OpenCV)
endif()
#
# Extra Compile Flags
#
# don't fail on strict compilation options in 3rd party modules
ov_dev_package_no_errors()
# Don't threat deprecated API warnings as errors in 3rd party apps
ov_deprecated_no_errors()

View File

@@ -1,7 +1,6 @@
{
"version": "0.5",
"requires": [
"zlib/1.2.13#97d5730b529b4224045fe7090592d4c1%1692672717.049",
"xbyak/6.73#250bc3bc73379f90f255876c1c00a4cd%1691853024.351",
"snappy/1.1.10#916523630083f6d855cb2977de8eefb6%1689780661.062",
"rapidjson/cci.20220822#8ca51918340f3a21127822258e95ec0f%1663194355.698",
@@ -16,7 +15,7 @@
"ittapi/3.24.0#9246125f13e7686dee2b0c992b71db94%1682969872.743",
"hwloc/2.9.2#1c63e2eccac57048ae226e6c946ebf0e%1688677682.002",
"flatbuffers/23.5.26#b153646f6546daab4c7326970b6cd89c%1685838458.449",
"ade/0.1.2c#8c03c130df6dc35186b38ba73a40a71d%1694253992.577"
"ade/0.1.2d#f225d0a218a7c9fbb81746806c7de53d%1697752528.048"
],
"build_requires": [
"zlib/1.2.13#97d5730b529b4224045fe7090592d4c1%1692672717.049",

View File

@@ -1,5 +1,5 @@
[requires]
ade/0.1.2c
ade/0.1.2d
onetbb/[>=2021.2.1]
pugixml/[>=1.10]
protobuf/3.21.12

View File

@@ -4,187 +4,122 @@
add_subdirectory(snippets)
set(LINKCHECKER_PY "" CACHE FILEPATH "Path to linkchecker.py for documentation check dir.")
set(ENABLE_OPENVINO_NOTEBOOKS OFF CACHE BOOL "Build with openvino notebooks")
set(OMZ_DOCS_DIR "" CACHE PATH "Path to open_model_zoo documentation dir.")
set(OTE_DOCS_DIR "" CACHE PATH "Path to training_extensions documentation dir.")
set(WORKBENCH_DOCS_DIR "" CACHE PATH "Path to workbench documentation dir.")
set(ENABLE_CPP_API OFF CACHE BOOL "Build with C/C++ API.")
set(ENABLE_PYTHON_API OFF CACHE BOOL "Build with Python API.")
set(ENABLE_NOTEBOOKS OFF CACHE BOOL "Build with openvino notebooks.")
set(ENABLE_OMZ OFF CACHE BOOL "Build with open_model_zoo.")
set(ENABLE_OVMS OFF CACHE BOOL "Build with ovms.")
set(OVMS_DOCS_DIR "" CACHE PATH "Path to model server documentation dir.")
set(GRAPH_CSV_DIR "" CACHE PATH "Path to the folder containing csv data for rendering graphs.")
if(${ENABLE_OVMS} AND (OVMS_DOCS_DIR STREQUAL ""))
message( FATAL_ERROR "You want to build OVMS, but OVMS_DOCS_DIR variable is empty." )
endif()
function(build_docs)
find_package(Doxygen REQUIRED dot)
find_package(LATEX REQUIRED)
find_program(DOXYREST_EXECUTABLE NAMES doxyrest)
if (NOT DOXYREST_EXECUTABLE)
message(FATAL_ERROR "No doxyrest found. Documentation output is not available")
endif()
set(DOCS_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}")
set(DOCS_SOURCE_DIR "${OpenVINO_SOURCE_DIR}/docs")
set(SCRIPTS_DIR "${DOCS_SOURCE_DIR}/scripts")
# markdown docs
set(MARKDOWN_INPUT "${DOCS_BUILD_DIR}")
# Preprocessing scripts
set(DOXY_MD_FILTER "${SCRIPTS_DIR}/doxy_md_filter.py")
set(PREPARE_XML_SCRIPT "${SCRIPTS_DIR}/prepare_xml.py")
set(REMOVE_XML_SCRIPT "${SCRIPTS_DIR}/remove_xml.py")
set(FILE_HELPER_SCRIPT "${SCRIPTS_DIR}/filehelper.py")
set(COPY_IMAGES_SCRIPT "${SCRIPTS_DIR}/copy_images.py")
set(DOC_TEST_DIR "${SCRIPTS_DIR}/tests")
set(DOXYGEN_MAPPING_SCRIPT "${SCRIPTS_DIR}/create_mapping.py")
set(BREATHE_APIDOC_SCRIPT "${SCRIPTS_DIR}/apidoc.py")
# out dirs
set(XML_OUTPUT "${DOCS_BUILD_DIR}/xml")
set(RST_OUTPUT "${DOCS_BUILD_DIR}/rst")
# Doxygen/Sphinx setup
set(DOXYGEN_XML_OUTPUT "${DOCS_BUILD_DIR}/xml")
set(SPHINX_SETUP_DIR "${DOCS_SOURCE_DIR}/sphinx_setup")
set(SPHINX_SOURCE_DIR "${DOCS_BUILD_DIR}/sphinx_source")
set(SPHINX_OUTPUT "${DOCS_BUILD_DIR}/_build")
# Sphinx folders, doxyrest templates and config
set(SPHINX_CONF_IN "${DOCS_SOURCE_DIR}/conf.py")
set(SPHINX_TEMPLATES_IN "${DOCS_SOURCE_DIR}/_templates")
set(SPHINX_TEMPLATES_OUT "${RST_OUTPUT}/_templates")
set(SPHINX_CONF_OUT "${RST_OUTPUT}/conf.py")
set(SPHINX_STATIC_IN "${DOCS_SOURCE_DIR}/_static")
set(SPHINX_STATIC_OUT "${RST_OUTPUT}/_static")
set(SPHINX_INDEX_IN "${DOCS_SOURCE_DIR}/index.rst")
set(SPHINX_INDEX_OUT "${RST_OUTPUT}/index.rst")
set(API_DOCS_IN "${DOCS_SOURCE_DIR}/api")
set(API_DOCS_OUT "${RST_OUTPUT}/api")
set(DOXYREST_IN "${DOCS_SOURCE_DIR}/doxyrest")
set(DOXYREST_OUT "${DOCS_BUILD_DIR}/doxyrest")
set(DOXYREST_SPHINX_IN "${DOCS_SOURCE_DIR}/doxyrest-sphinx")
set(DOXYREST_SPHINX_OUT "${RST_OUTPUT}/doxyrest-sphinx")
set(DOXYREST_CONFIG_IN "${DOCS_SOURCE_DIR}/doxyrest-config.lua")
set(DOXYREST_CONFIG_OUT "${DOCS_BUILD_DIR}/doxyrest-config.lua")
configure_file(${DOXYREST_CONFIG_IN} ${DOXYREST_CONFIG_OUT} @ONLY)
configure_file(${SPHINX_CONF_IN} ${SPHINX_CONF_OUT} @ONLY)
# Doxygen config
set(DOXYFILE_SOURCE "${DOCS_SOURCE_DIR}/Doxyfile.config")
set(DOXYFILE_BUILD "${DOCS_BUILD_DIR}/Doxyfile.config")
configure_file(${DOXYFILE_SOURCE} ${DOXYFILE_BUILD} @ONLY)
list(APPEND commands COMMAND ${Python3_EXECUTABLE} ${DOXY_MD_FILTER}
list(APPEND commands COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --green "STARTED preprocessing OpenVINO articles")
list(APPEND commands COMMAND ${Python3_EXECUTABLE} ${FILE_HELPER_SCRIPT}
--filetype=rst
--input_dir=${OpenVINO_SOURCE_DIR}
--output_dir=${DOCS_BUILD_DIR}/openvino
--exclude_dir=${DOCS_BUILD_DIR})
--output_dir=${SPHINX_SOURCE_DIR}
--exclude_dir=${SPHINX_SOURCE_DIR})
list(APPEND commands COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --green "FINISHED preprocessing OpenVINO articles")
# include additional repositories
if(${ENABLE_CPP_API})
# Doxygen config
set(DOXYFILE_SOURCE "${DOCS_SOURCE_DIR}/Doxyfile.config")
set(DOXYFILE_BUILD "${DOCS_BUILD_DIR}/Doxyfile.config")
configure_file(${DOXYFILE_SOURCE} ${DOXYFILE_BUILD} @ONLY)
list(APPEND commands COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --green "STARTED preprocessing OpenVINO C/C++ API reference")
list(APPEND commands COMMAND ${Python3_EXECUTABLE} ${REMOVE_XML_SCRIPT} ${DOXYGEN_XML_OUTPUT})
list(APPEND commands COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYFILE_BUILD})
list(APPEND post_commands COMMAND ${Python3_EXECUTABLE} ${BREATHE_APIDOC_SCRIPT} ${DOXYGEN_XML_OUTPUT} -o "${SPHINX_SOURCE_DIR}/api/c_cpp_api" -m -T -p openvino -g class,group,struct,union,enum)
list(APPEND commands COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --green "FINISHED preprocessing OpenVINO C/C++ API reference")
endif()
# build with openvino notebooks
if(ENABLE_OPENVINO_NOTEBOOKS)
if(${ENABLE_PYTHON_API})
list(APPEND commands COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --green "STARTED preprocessing OpenVINO Python API")
list(APPEND commands COMMAND ${Python3_EXECUTABLE} -m pip install openvino)
list(APPEND commands COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --green "FINISHED preprocessing OpenVINO Python API")
endif()
if(${ENABLE_NOTEBOOKS})
set(NBDOC_SCRIPT "${DOCS_SOURCE_DIR}/nbdoc/nbdoc.py")
list(PREPEND commands
COMMAND ${Python3_EXECUTABLE} "${NBDOC_SCRIPT}" "${DOCS_SOURCE_DIR}/notebooks" "${RST_OUTPUT}/notebooks"
list(APPEND commands COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --green "STARTED preprocessing OpenVINO notebooks")
list(APPEND commands
COMMAND ${Python3_EXECUTABLE} "${NBDOC_SCRIPT}" "${DOCS_SOURCE_DIR}/notebooks" "${SPHINX_SOURCE_DIR}/notebooks"
)
list(APPEND commands COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --green "FINISHED preprocessing OpenVINO notebooks")
endif()
if(GRAPH_CSV_DIR)
set(GRAPH_CSV_DIR_OUT "${RST_OUTPUT}/csv")
list(APPEND commands
COMMAND ${CMAKE_COMMAND} -E copy_directory "${GRAPH_CSV_DIR}" "${GRAPH_CSV_DIR_OUT}"
)
if(${ENABLE_OVMS})
list(APPEND commands COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --green "STARTED preprocessing OVMS")
list(APPEND commands COMMAND ${Python3_EXECUTABLE} ${FILE_HELPER_SCRIPT}
--filetype=md
--input_dir=${OVMS_DOCS_DIR}
--output_dir=${SPHINX_SOURCE_DIR}
--exclude_dir=${SPHINX_SOURCE_DIR})
list(APPEND commands COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --green "FINISHED preprocessing OVMS")
endif()
list(APPEND commands
COMMAND ${CMAKE_COMMAND} -E copy ${API_DOCS_IN}/api_reference.rst ${API_DOCS_OUT}/api_reference.rst
COMMAND ${CMAKE_COMMAND} -E copy_directory ${API_DOCS_IN}/ie_python_api ${API_DOCS_OUT}/ie_python_api
)
# omz doc files
if(EXISTS "${OMZ_DOCS_DIR}")
get_filename_component(OMZ_DOCS_DIR "${OMZ_DOCS_DIR}" ABSOLUTE)
if(${ENABLE_OMZ})
list(APPEND commands COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --green "STARTED preprocessing OMZ")
list(APPEND commands
COMMAND ${Python3_EXECUTABLE} ${OMZ_DOCS_DIR}/ci/prepare-documentation.py ${CMAKE_BINARY_DIR}/open_model_zoo)
list(APPEND commands COMMAND ${Python3_EXECUTABLE} ${DOXY_MD_FILTER}
COMMAND ${Python3_EXECUTABLE} ${OpenVINO_SOURCE_DIR}/thirdparty/open_model_zoo/ci/prepare-documentation.py ${CMAKE_BINARY_DIR}/open_model_zoo)
list(APPEND commands COMMAND ${Python3_EXECUTABLE} ${FILE_HELPER_SCRIPT}
--filetype=md
--input_dir=${CMAKE_BINARY_DIR}/open_model_zoo
--output_dir=${DOCS_BUILD_DIR}/open_model_zoo)
--output_dir=${SPHINX_SOURCE_DIR}
--exclude_dir=${SPHINX_SOURCE_DIR})
list(APPEND commands COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --green "FINISHED preprocessing OMZ")
endif()
# workbench doc files
if(EXISTS "${WORKBENCH_DOCS_DIR}")
get_filename_component(WORKBENCH_DOCS_DIR "${WORKBENCH_DOCS_DIR}" ABSOLUTE)
list(APPEND commands COMMAND ${Python3_EXECUTABLE} ${DOXY_MD_FILTER}
--input_dir=${WORKBENCH_DOCS_DIR}
--output_dir=${DOCS_BUILD_DIR}/workbench)
endif()
# ote doc files
if(EXISTS "${OTE_DOCS_DIR}")
get_filename_component(WORKBENCH_DOCS_DIR "${OTE_DOCS_DIR}" ABSOLUTE)
list(APPEND commands COMMAND ${Python3_EXECUTABLE} ${DOXY_MD_FILTER}
--input_dir=${OTE_DOCS_DIR}
--output_dir=${DOCS_BUILD_DIR}/ote)
endif()
# ovms doc files
if(EXISTS "${OVMS_DOCS_DIR}")
get_filename_component(OVMS_DOCS_DIR "${OVMS_DOCS_DIR}" ABSOLUTE)
list(APPEND commands COMMAND ${Python3_EXECUTABLE} ${DOXY_MD_FILTER}
--input_dir=${OVMS_DOCS_DIR}
--output_dir=${DOCS_BUILD_DIR}/ovms)
endif()
add_custom_target(preprocess_docs
COMMENT "Preprocess documentation"
VERBATIM)
# Preprocess docs
add_custom_target(preprocess_docs
COMMAND ${CMAKE_COMMAND} -E remove_directory ${SPHINX_SOURCE_DIR}
${commands}
WORKING_DIRECTORY ${DOCS_BUILD_DIR}
VERBATIM)
add_custom_command(TARGET preprocess_docs
POST_BUILD
${commands}
WORKING_DIRECTORY ${DOCS_BUILD_DIR}
COMMENT "Preprocess documentation"
VERBATIM)
add_custom_target(doxygen_xml
DEPENDS preprocess_docs
COMMAND ${Python3_EXECUTABLE} ${REMOVE_XML_SCRIPT} ${XML_OUTPUT}
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYFILE_BUILD}
WORKING_DIRECTORY ${DOCS_BUILD_DIR}
COMMENT "Generate doxygen XML output"
VERBATIM)
# Post-process docs
add_custom_command(TARGET doxygen_xml
POST_BUILD
COMMAND ${Python3_EXECUTABLE} ${PREPARE_XML_SCRIPT} ${XML_OUTPUT}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${DOXYREST_IN} ${DOXYREST_OUT}
COMMAND ${DOXYREST_EXECUTABLE} -c ${DOXYREST_CONFIG_OUT}
COMMAND ${Python3_EXECUTABLE} ${COPY_IMAGES_SCRIPT} ${XML_OUTPUT} ${RST_OUTPUT}
COMMAND ${Python3_EXECUTABLE} ${DOXYGEN_MAPPING_SCRIPT} ${XML_OUTPUT} ${DOCS_BUILD_DIR} ${OpenVINO_SOURCE_DIR}/../
COMMAND ${CMAKE_COMMAND} -E copy ${SPHINX_INDEX_IN} ${SPHINX_INDEX_OUT}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${SPHINX_TEMPLATES_IN} ${SPHINX_TEMPLATES_OUT}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${DOXYREST_IN} ${DOXYREST_OUT}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${DOXYREST_SPHINX_IN} ${DOXYREST_SPHINX_OUT}
COMMAND ${CMAKE_COMMAND} -E copy_directory ${SPHINX_STATIC_IN} ${SPHINX_STATIC_OUT}
COMMENT "Prepare xml"
COMMAND ${Python3_EXECUTABLE} ${COPY_IMAGES_SCRIPT} ${DOXYGEN_XML_OUTPUT} ${SPHINX_SOURCE_DIR}
COMMAND ${Python3_EXECUTABLE} ${DOXYGEN_MAPPING_SCRIPT} ${DOXYGEN_XML_OUTPUT} ${DOCS_BUILD_DIR} ${OpenVINO_SOURCE_DIR}/../
COMMAND ${CMAKE_COMMAND} -E copy_directory ${SPHINX_SETUP_DIR} ${SPHINX_SOURCE_DIR}
${post_commands}
VERBATIM)
# Build docs
add_custom_target(sphinx_docs
DEPENDS doxygen_xml
COMMAND sphinx-build -q -j auto -w ${DOCS_BUILD_DIR}/sphinx.log -b html ${RST_OUTPUT} ${SPHINX_OUTPUT}
WORKING_DIRECTORY ${RST_OUTPUT}
DEPENDS preprocess_docs
COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --green "STARTED sphinx documentation build"
COMMAND sphinx-build -j auto -w ${DOCS_BUILD_DIR}/sphinx.log -b html ${SPHINX_SOURCE_DIR} ${SPHINX_OUTPUT}
COMMAND ${CMAKE_COMMAND} -E cmake_echo_color --green "FINISHED sphinx documentation build"
WORKING_DIRECTORY ${SPHINX_SOURCE_DIR}
VERBATIM)
set_target_properties(doxygen_xml sphinx_docs
PROPERTIES FOLDER docs)
set_target_properties(preprocess_docs sphinx_docs PROPERTIES FOLDER docs)
find_program(browser NAMES xdg-open)
if(browser)
add_custom_target(ie_docs_open
COMMAND ${browser} "${SPHINX_OUTPUT}/index.html"
DEPENDS sphinx_docs
COMMENT "Open OpenVINO documentation"
VERBATIM)
set_target_properties(ie_docs_open PROPERTIES FOLDER docs)
endif()
endfunction()
if(ENABLE_DOCS)

View File

@@ -829,8 +829,7 @@ WARN_LOGFILE = "@DOCS_BUILD_DIR@/doxygen.log"
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
INPUT = "@MARKDOWN_INPUT@" \
"@OpenVINO_SOURCE_DIR@/src/frontends/common/include/" \
INPUT = "@OpenVINO_SOURCE_DIR@/src/frontends/common/include/" \
"@OpenVINO_SOURCE_DIR@/src/common/conditional_compilation/include/" \
"@OpenVINO_SOURCE_DIR@/src/common/itt/include/" \
"@OpenVINO_SOURCE_DIR@/src/common/low_precision_transformations/include/" \

View File

@@ -1,18 +0,0 @@
# Representation of low-precision models {#openvino_docs_ie_plugin_dg_lp_representation}
The goal of this document is to describe how optimized models are represented in OpenVINO Intermediate Representation (IR) and provide guidance on interpretation rules for such models at runtime.
Currently, there are two groups of optimization methods that can influence on the IR after applying them to the full-precision model:
- **Sparsity**. It is represented by zeros inside the weights and this is up to the hardware plugin how to interpret these zeros (use weights as is or apply special compression algorithms and sparse arithmetic). No additional mask is provided with the model.
- **Quantization**. The rest of this document is dedicated to the representation of quantized models.
## Representation of quantized models
The OpenVINO Toolkit represents all the quantized models using the so-called FakeQuantize operation (see the description in [this document](@ref openvino_docs_ops_quantization_FakeQuantize_1)). This operation is very expressive and allows mapping values from arbitrary input and output ranges. The whole idea behind that is quite simple: we project (discretize) the input values to the low-precision data type using affine transformation (with clamp and rounding) and then reproject discrete values back to the original range and data type. It can be considered as an emulation of the quantization process which happens at runtime.
In order to be able to execute a particular DL operation in low-precision all its inputs should be quantized i.e. should have FakeQuantize between operation and data blobs. The figure below shows an example of quantized Convolution which contains two FakeQuantize nodes: one for weights and one for activations (bias is quantized using the same parameters).
![quantized_convolution]
<div align="center">Figure 1. Example of quantized Convolution operation.</div>
Starting from OpenVINO 2020.2 release all the quantized models are represented in the compressed form. It means that the weights of low-precision operations are converted into the target precision (e.g. INT8). It helps to substantially reduce the model size. The rest of the parameters can be represented in FLOAT32 or FLOAT16 precision depending on the input full-precision model used in the quantization process. Fig. 2 below shows an example of the part of the compressed IR.
![quantized_model_example]
<div align="center">Figure 2. Example of compressed quantized model.</div>
[quantized_convolution]: images/quantized_convolution.png
[quantized_model_example]: images/quantized_model_example.png

View File

@@ -1,112 +0,0 @@
# [LEGACY] Extending Model Optimizer with Caffe Python Layers {#openvino_docs_MO_DG_prepare_model_customize_model_optimizer_Extending_Model_Optimizer_With_Caffe_Python_Layers}
@sphinxdirective
.. meta::
:description: Learn how to extract operator attributes in Model Optimizer to
support a custom Caffe operation written only in Python.
.. danger::
The code described here has been **deprecated!** Do not use it to avoid working with a legacy solution. It will be kept for some time to ensure backwards compatibility, but **you should not use** it in contemporary applications.
This guide describes a deprecated TensorFlow conversion method. The guide on the new and recommended method, using a new frontend, can be found in the :doc:`Frontend Extensions <openvino_docs_Extensibility_UG_Frontend_Extensions>` article.
This article provides instructions on how to support a custom Caffe operation written only in Python. For example, the
`Faster-R-CNN model <https://dl.dropboxusercontent.com/s/o6ii098bu51d139/faster_rcnn_models.tgz?dl=0>`__ implemented in
Caffe contains a custom proposal layer written in Python. The layer is described in the
`Faster-R-CNN prototxt <https://raw.githubusercontent.com/rbgirshick/py-faster-rcnn/master/models/pascal_voc/VGG16/faster_rcnn_end2end/test.prototxt>`__ in the following way:
.. code-block:: sh
layer {
name: 'proposal'
type: 'Python'
bottom: 'rpn_cls_prob_reshape'
bottom: 'rpn_bbox_pred'
bottom: 'im_info'
top: 'rois'
python_param {
module: 'rpn.proposal_layer'
layer: 'ProposalLayer'
param_str: "'feat_stride': 16"
}
}
This article describes only a procedure on how to extract operator attributes in Model Optimizer. The rest of the
operation enabling pipeline and information on how to support other Caffe operations (written in C++) is described in
the :doc:`Customize Model Optimizer <openvino_docs_MO_DG_prepare_model_customize_model_optimizer_Customize_Model_Optimizer>` guide.
========================================
Writing Extractor for Caffe Python Layer
========================================
Custom Caffe Python layers have an attribute ``type`` (defining the type of the operation) equal to ``Python`` and two
mandatory attributes ``module`` and ``layer`` in the ``python_param`` dictionary. The ``module`` defines the Python module name
with the layer implementation, while ``layer`` value is an operation type defined by a user. In order to extract
attributes for such an operation it is necessary to implement extractor class inherited from the
``CaffePythonFrontExtractorOp`` class instead of ``FrontExtractorOp`` class, used for standard framework layers. The ``op``
class attribute value should be set to the ``module + "." + layer`` value so the extractor is triggered for this kind of
operation.
Below is a simplified example of the extractor for the custom operation Proposal from the mentioned Faster-R-CNN model.
The full code with additional checks can be found `here <https://github.com/openvinotoolkit/openvino/blob/releases/2022/1/tools/mo/openvino/tools/mo/front/caffe/proposal_python_ext.py>`__.
The sample code uses operation ``ProposalOp`` which corresponds to ``Proposal`` operation described in the :doc:`Available Operations Sets <openvino_docs_ops_opset>`
page. For a detailed explanation of the extractor, refer to the source code below.
.. code-block:: py
:force:
from openvino.tools.mo.ops.proposal import ProposalOp
from openvino.tools.mo.front.extractor import CaffePythonFrontExtractorOp
class ProposalPythonFrontExtractor(CaffePythonFrontExtractorOp):
op = 'rpn.proposal_layer.ProposalLayer' # module + "." + layer
enabled = True # extractor is enabled
@staticmethod
def extract_proposal_params(node, defaults):
param = node.pb.python_param # get the protobuf message representation of the layer attributes
# parse attributes from the layer protobuf message to a Python dictionary
attrs = CaffePythonFrontExtractorOp.parse_param_str(param.param_str)
update_attrs = defaults
# the operation expects ratio and scale values to be called "ratio" and "scale" while Caffe uses different names
if 'ratios' in attrs:
attrs['ratio'] = attrs['ratios']
del attrs['ratios']
if 'scales' in attrs:
attrs['scale'] = attrs['scales']
del attrs['scales']
update_attrs.update(attrs)
ProposalOp.update_node_stat(node, update_attrs) # update the node attributes
@classmethod
def extract(cls, node):
# define default values for the Proposal layer attributes
defaults = {
'feat_stride': 16,
'base_size': 16,
'min_size': 16,
'ratio': [0.5, 1, 2],
'scale': [8, 16, 32],
'pre_nms_topn': 6000,
'post_nms_topn': 300,
'nms_thresh': 0.7
}
cls.extract_proposal_params(node, defaults)
return cls.enabled
====================
Additional Resources
====================
* :doc:`Model Optimizer Extensibility <openvino_docs_MO_DG_prepare_model_customize_model_optimizer_Customize_Model_Optimizer>`
* :doc:`Graph Traversal and Modification Using Ports and Connections <openvino_docs_MO_DG_prepare_model_customize_model_optimizer_Customize_Model_Optimizer_Model_Optimizer_Ports_Connections>`
* :doc:`Model Optimizer Extensions <openvino_docs_MO_DG_prepare_model_customize_model_optimizer_Model_Optimizer_Extensions>`
@endsphinxdirective

View File

@@ -1,62 +0,0 @@
# [LEGACY] Model Optimizer Extensions {#openvino_docs_MO_DG_prepare_model_customize_model_optimizer_Model_Optimizer_Extensions}
@sphinxdirective
.. meta::
:description: Learn about deprecated extensions, which enable injecting logic
to the model conversion pipeline without changing the Model
Optimizer core code.
.. toctree::
:maxdepth: 1
:hidden:
openvino_docs_MO_DG_prepare_model_customize_model_optimizer_Model_Optimizer_Extensions_Model_Optimizer_Operation
openvino_docs_MO_DG_prepare_model_customize_model_optimizer_Model_Optimizer_Extensions_Model_Optimizer_Extractor
openvino_docs_MO_DG_prepare_model_customize_model_optimizer_Model_Optimizer_Extensions_Model_Optimizer_Transformation_Extensions
.. danger::
The code described here has been **deprecated!** Do not use it to avoid working with a legacy solution. It will be kept for some time to ensure backwards compatibility, but **you should not use** it in contemporary applications.
This guide describes a deprecated TensorFlow conversion method. The guide on the new and recommended method, using a new frontend, can be found in the :doc:`Frontend Extensions <openvino_docs_Extensibility_UG_Frontend_Extensions>` article.
Model Optimizer extensions enable you to inject some logic to the model conversion pipeline without changing the Model
Optimizer core code. There are three types of the Model Optimizer extensions:
1. :doc:`Model Optimizer operation <openvino_docs_MO_DG_prepare_model_customize_model_optimizer_Model_Optimizer_Extensions_Model_Optimizer_Operation>`.
2. A :doc:`framework operation extractor <openvino_docs_MO_DG_prepare_model_customize_model_optimizer_Model_Optimizer_Extensions_Model_Optimizer_Extractor>`.
3. A :doc:`model transformation <openvino_docs_MO_DG_prepare_model_customize_model_optimizer_Model_Optimizer_Extensions_Model_Optimizer_Transformation_Extensions>`, which can be executed during front, middle or back phase of the model conversion.
An extension is just a plain text file with a Python code. The file should contain a class (or classes) inherited from
one of extension base classes. Extension files should be saved to a directory with the following structure:
.. code-block:: sh
./<MY_EXT>/
ops/ - custom operations
front/ - framework independent front transformations
<FRAMEWORK_1>/ - front transformations for <FRAMEWORK_1> models only and extractors for <FRAMEWORK_1> operations
<FRAMEWORK_2>/ - front transformations for <FRAMEWORK_2> models only and extractors for <FRAMEWORK_2> operations
...
middle/ - middle transformations
back/ - back transformations
Model Optimizer uses the same layout internally to keep built-in extensions. The only exception is that the
``mo/ops/`` directory is also used as a source of the Model Optimizer operations due to historical reasons.
.. note::
The name of a root directory with extensions should not be equal to "extensions" because it will result in a name conflict with the built-in Model Optimizer extensions.
.. note::
Model Optimizer itself is built by using these extensions, so there is a huge number of examples of their usage in the Model Optimizer code.
====================
Additional Resources
====================
* :doc:`Model Optimizer Extensibility <openvino_docs_MO_DG_prepare_model_customize_model_optimizer_Customize_Model_Optimizer>`
* :doc:`Graph Traversal and Modification Using Ports and Connections <openvino_docs_MO_DG_prepare_model_customize_model_optimizer_Customize_Model_Optimizer_Model_Optimizer_Ports_Connections>`
* :doc:`Extending Model Optimizer with Caffe Python Layers <openvino_docs_MO_DG_prepare_model_customize_model_optimizer_Extending_Model_Optimizer_With_Caffe_Python_Layers>`
@endsphinxdirective

View File

@@ -1,115 +0,0 @@
# [LEGACY] Operation Extractor {#openvino_docs_MO_DG_prepare_model_customize_model_optimizer_Model_Optimizer_Extensions_Model_Optimizer_Extractor}
@sphinxdirective
.. meta::
:description: Learn about a deprecated generic extension in Model Optimizer,
which provides the operation extractor usable for all model
frameworks.
.. danger::
The code described here has been **deprecated!** Do not use it to avoid working with a legacy solution. It will be kept for some time to ensure backwards compatibility, but **you should not use** it in contemporary applications.
This guide describes a deprecated TensorFlow conversion method. The guide on the new and recommended method, using a new frontend, can be found in the :doc:`Frontend Extensions <openvino_docs_Extensibility_UG_Frontend_Extensions>` article.
Model Optimizer runs specific extractor for each operation in the model during the model loading.
There are several types of Model Optimizer extractor extensions:
1. The generic one, which is described in this article.
2. The special extractor for Caffe models with Python layers. This kind of extractor is described in the :doc:`Extending Model Optimizer with Caffe Python Layers <openvino_docs_MO_DG_prepare_model_customize_model_optimizer_Extending_Model_Optimizer_With_Caffe_Python_Layers>` guide.
Generic extension provides a generic mechanism for the operation extractor applicable for all frameworks. Model Optimizer provides the ``mo.front.extractor.FrontExtractorOp`` class as a base class to implement the extractor. It has the ``extract`` class method, which gets the only parameter ``Node``, which corresponds to the graph node to extract data from. The operation description in the original framework format is stored in the attribute ``pb`` of the node. The extractor goal is to parse this attribute and save necessary attributes to the corresponding node of the graph. Consider the extractor for the ``Const`` TensorFlow operation (refer to the ``extensions/front/tf/const_ext.py`` file):
.. code-block:: py
:force:
from openvino.tools.mo.front.extractor import FrontExtractorOp
from openvino.tools.mo.front.tf.extractors.utils import tf_dtype_extractor, tf_tensor_shape, tf_tensor_content
from openvino.tools.mo.ops.const import Const
class ConstExtractor(FrontExtractorOp):
# The "op" class attribute defines a type of the operation in the framework (in this case it is a TensorFlow),
# for which the extractor should be triggered.
op = 'Const'
enabled = True # The flag that indicates that this extractor is enabled.
@classmethod
def extract(cls, node): # The entry point of the extractor.
# The `node.pb` attribute stores the TensorFlow representation of the operation, which is a Protobuf message of the
# specific format. In particular, the message contains the attribute called "value" containing the description of
# the constant. The string "pb.attr["value"].tensor" is just a Python binding for Protobuf message parsing.
pb_tensor = node.pb.attr["value"].tensor
# Get the shape of the tensor from the protobuf message, using the helper function "tf_tensor_shape".
shape = tf_tensor_shape(pb_tensor.tensor_shape)
# Create a dictionary with necessary attributes.
attrs = {
'shape': shape,
# Get the tensor value, using "tf_tensor_content" helper function.
'value': tf_tensor_content(pb_tensor.dtype, shape, pb_tensor),
# Get the tensor data type, using "tf_dtype_extractor" helper function.
'data_type': tf_dtype_extractor(pb_tensor.dtype),
}
# Update the node attributes, using default attributes from the "Const" operation and attributes saved to the
# "attrs" dictionary.
Const.update_node_stat(node, attrs)
return cls.enabled
Consider another example with an extractor of the ``Constant`` ONNX operation (refer to the ``extensions/front/onnx/const_ext.py`` file):
.. code-block:: py
:force:
from onnx import numpy_helper
from onnx.numpy_helper import to_array
from openvino.tools.mo.front.extractor import FrontExtractorOp
from openvino.tools.mo.front.onnx.extractors.utils import onnx_attr
from openvino.tools.mo.ops.const import Const
class ConstantExtractor(FrontExtractorOp):
op = 'Constant'
enabled = True
@classmethod
def extract(cls, node):
# Use "onnx_attr" helper method, which parses the Protobuf representation of the operation saved in the "node".
# Gets the value of the attribute with name "value" as "TensorProto" type (specified with a keyword "t").
pb_value = onnx_attr(node, 'value', 't')
# Use "numpy_helper.to_array()" ONNX helper method to convert "TensorProto" object to a numpy array.
value = numpy_helper.to_array(pb_value)
attrs = {
'data_type': value.dtype,
'value': value,
}
# Update the node attributes, using default attributes from the "Const" operation and attributes saved to the
# "attrs" dictionary.
Const.update_node_stat(node, attrs)
return cls.enabled
The extractors for operations from different frameworks work similarly. The only difference is in the helper methods used to parse operation attributes encoded with a framework-specific representation.
A common practice is to use ``update_node_stat()`` method of the dedicated ``Op`` class to update the node attributes. This method does the following:
1. Sets values for common attributes like ``op``, ``type``, ``infer``, ``in_ports_count``, ``out_ports_count``, ``version`` to values specific to the dedicated operation (``Const`` operation in this case).
2. Uses ``supported_attrs()`` and ``backend_attrs()`` methods, defined in the ``Op`` class to update specific node attribute ``IE``. The IR emitter uses the value stored in the ``IE`` attribute to pre-process attribute values and save them to IR.
3. Optionally sets additional attributes provided to the ``update_node_stat()`` function as a second parameter. Usually these attributes are parsed from the particular instance of the operation.
.. note::
Model Optimizer uses numpy arrays to store values and numpy arrays of ``np.int64`` type to store shapes in the graph.
====================
Additional Resources
====================
* :doc:`Model Optimizer Extensibility <openvino_docs_MO_DG_prepare_model_customize_model_optimizer_Customize_Model_Optimizer>`
* :doc:`Graph Traversal and Modification Using Ports and Connections <openvino_docs_MO_DG_prepare_model_customize_model_optimizer_Customize_Model_Optimizer_Model_Optimizer_Ports_Connections>`
* :doc:`Model Optimizer Extensions <openvino_docs_MO_DG_prepare_model_customize_model_optimizer_Model_Optimizer_Extensions>`
* :doc:`Extending Model Optimizer with Caffe Python Layers <openvino_docs_MO_DG_prepare_model_customize_model_optimizer_Extending_Model_Optimizer_With_Caffe_Python_Layers>`
@endsphinxdirective

View File

@@ -1,188 +0,0 @@
# [LEGACY] Graph Traversal and Modification {#openvino_docs_MO_DG_prepare_model_customize_model_optimizer_Customize_Model_Optimizer_Model_Optimizer_Ports_Connections}
@sphinxdirective
.. meta::
:description: Learn about deprecated APIs and the Port and Connection classes
in Model Optimizer used for graph traversal and transformation.
.. danger::
The code described here has been **deprecated!** Do not use it to avoid working with a legacy solution. It will be kept for some time to ensure backwards compatibility, but **you should not use** it in contemporary applications.
This guide describes a deprecated TensorFlow conversion method. The guide on the new and recommended method, using a new frontend, can be found in the :doc:`Frontend Extensions <openvino_docs_Extensibility_UG_Frontend_Extensions>` article.
There are three APIs for a graph traversal and transformation used in the Model Optimizer:
1. The API provided with the ``networkx`` Python library for the ``networkx.MultiDiGraph`` class, which is the base class for
the ``mo.graph.graph.Graph`` object. For example, the following methods belong to this API level:
* ``graph.add_edges_from([list])``,
* ``graph.add_node(x, attrs)``,
* ``graph.out_edges(node_id)``
* other methods where ``graph`` is a an instance of the ``networkx.MultiDiGraph`` class.
**This is the lowest-level API. Avoid using it in the Model Optimizer transformations**. For more details, refer to the :ref:`Model Representation in Memory <mo_model_representation_in_memory>` section.
2. The API built around the ``mo.graph.graph.Node`` class. The ``Node`` class is the primary class to work with graph nodes
and their attributes. Examples of such methods and functions are:
* ``node.in_node(y)``,
* ``node.out_node(x)``,
* ``node.get_outputs()``,
* ``node.insert_node_after(n1, y)``,
* ``create_edge(n1, n2)``
**There are some "Node" class methods not recommended for use and some functions defined in the mo.graph.graph have been deprecated**. For more details, refer to the ``mo/graph/graph.py`` file.
3. The high-level API called Model Optimizer Graph API, which uses ``mo.graph.graph.Graph``, ``mo.graph.port.Port`` and
``mo.graph.connection.Connection`` classes. For example, the following methods belong to this API level:
* ``node.in_port(x)``,
* ``node.out_port(y)``,
* ``port.get_connection()``,
* ``connection.get_source()``,
* ``connection.set_destination(dest_port)``
**This is the recommended API for the Model Optimizer transformations and operations implementation**.
The main benefit of using the Model Optimizer Graph API is that it hides some internal implementation details (the fact that
the graph contains data nodes), provides API to perform safe and predictable graph manipulations, and adds operation
semantic to the graph. This is achieved with introduction of concepts of ports and connections.
.. note::
This article is dedicated to the Model Optimizer Graph API only and does not cover other two non-recommended APIs.
.. _mo_intro_ports:
=====
Ports
=====
An operation semantic describes how many inputs and outputs the operation has. For example,
:doc:`Parameter <openvino_docs_ops_infrastructure_Parameter_1>` and :doc:`Const <openvino_docs_ops_infrastructure_Constant_1>` operations have no
inputs and have one output, :doc:`ReLU <openvino_docs_ops_activation_ReLU_1>` operation has one input and one output,
:doc:`Split <openvino_docs_ops_movement_Split_1>` operation has 2 inputs and a variable number of outputs depending on the value of the
attribute ``num_splits``.
Each operation node in the graph (an instance of the ``Node`` class) has 0 or more input and output ports (instances of
the ``mo.graph.port.Port`` class). The ``Port`` object has several attributes:
* ``node`` - the instance of the ``Node`` object the port belongs to.
* ``idx`` - the port number. Input and output ports are numbered independently, starting from ``0``. Thus,
:doc:`ReLU <openvino_docs_ops_activation_ReLU_1>` operation has one input port (with index ``0``) and one output port (with index ``0``).
* ``type`` - the type of the port. Could be equal to either ``"in"`` or ``"out"``.
* ``data`` - the object that should be used to get attributes of the corresponding data node. This object has methods ``get_shape()`` / ``set_shape()`` and ``get_value()`` / ``set_value()`` to get/set shape/value of the corresponding data node. For example, ``in_port.data.get_shape()`` returns an input shape of a tensor connected to input port ``in_port`` (``in_port.type == 'in'``), ``out_port.data.get_value()`` returns a value of a tensor produced from output port ``out_port`` (``out_port.type == 'out'``).
.. note::
Functions ``get_shape()`` and ``get_value()`` return ``None`` until the partial inference phase. For more information about model conversion phases, refer to the :ref:`Model Conversion Pipeline <mo_model_conversion_pipeline>`. For information about partial inference phase, see the :ref:`Partial Inference <mo_partial_inference>`.
There are several methods of the ``Node`` class to get the instance of a corresponding port:
* ``in_port(x)`` and ``out_port(x)`` to get the input/output port with number ``x``.
* ``in_ports()`` and ``out_ports()`` to get a dictionary, where key is a port number and the value is the corresponding input/output port.
Attributes ``in_ports_count`` and ``out_ports_count`` of the ``Op`` class instance define default number of input and output
ports to be created for the ``Node``. However, additional input/output ports can be added using methods
``add_input_port()`` and ``add_output_port()``. Port also can be removed, using the ``delete_input_port()`` and
``delete_output_port()`` methods.
The ``Port`` class is just an abstraction that works with edges incoming/outgoing to/from a specific ``Node`` instance. For
example, output port with ``idx = 1`` corresponds to the outgoing edge of a node with an attribute ``out = 1``, the input
port with ``idx = 2`` corresponds to the incoming edge of a node with an attribute ``in = 2``.
Consider the example of a graph part with 4 operation nodes "Op1", "Op2", "Op3", and "Op4" and a number of data nodes
depicted with light green boxes.
.. image:: _static/images/MO_ports_example_1.svg
:scale: 80 %
:align: center
Operation nodes have input ports (yellow squares) and output ports (light purple squares). Input port may not be
connected. For example, the input **port 2** of node **Op1** does not have incoming edge, while output port always has an
associated data node (after the partial inference when the data nodes are added to the graph), which may have no
consumers.
Ports can be used to traverse a graph. The method ``get_source()`` of an input port returns an output port producing the
tensor consumed by the input port. It is important that the method works the same during front, middle and back phases of a
model conversion even though the graph structure changes (there are no data nodes in the graph during the front phase).
Let's assume that there are 4 instances of ``Node`` object ``op1, op2, op3``, and ``op4`` corresponding to nodes **Op1**, **Op2**,
**Op3**, and **Op4**, respectively. The result of ``op2.in_port(0).get_source()`` and ``op4.in_port(1).get_source()`` is the
same object ``op1.out_port(1)`` of type ``Port``.
The method ``get_destination()`` of an output port returns the input port of the node consuming this tensor. If there are
multiple consumers of this tensor, the error is raised. The method ``get_destinations()`` of an output port returns a
list of input ports consuming the tensor.
The method ``disconnect()`` removes a node incoming edge corresponding to the specific input port. The method removes
several edges if it is applied during the front phase for a node output port connected with multiple nodes.
The method ``port.connect(another_port)`` connects output port ``port`` and input port ``another_port``. The method handles
situations when the graph contains data nodes (middle and back phases) and does not create an edge between two nodes
but also automatically creates data node or reuses existing data node. If the method is used during the front phase and
data nodes do not exist, the method creates edge and properly sets ``in`` and ``out`` edge attributes.
For example, applying the following two methods to the graph above will result in the graph depicted below:
.. code-block:: py
:force:
op4.in_port(1).disconnect()
op3.out_port(0).connect(op4.in_port(1))
.. image:: _static/images/MO_ports_example_2.svg
:scale: 80 %
:align: center
.. note::
For a full list of available methods, refer to the ``Node`` class implementation in the ``mo/graph/graph.py`` and ``Port`` class implementation in the ``mo/graph/port.py`` files.
===========
Connections
===========
Connection is a concept introduced to easily and reliably perform graph modifications. Connection corresponds to a
link between a source output port with one or more destination input ports or a link between a destination input port
and source output port producing data. So each port is connected with one or more ports with help of a connection.
Model Optimizer uses the ``mo.graph.connection.Connection`` class to represent a connection.
There is only one ``get_connection()`` method of the ``Port`` class to get the instance of the corresponding ``Connection``
object. If the port is not connected, the returned value is ``None``.
For example, the ``op3.out_port(0).get_connection()`` method returns a ``Connection`` object encapsulating edges from node
**Op3** to data node **data_3_0** and two edges from data node **data_3_0** to two ports of the node **Op4**.
The ``Connection`` class provides methods to get source and destination(s) ports the connection corresponds to:
* ``connection.get_source()`` - returns an output ``Port`` object producing the tensor.
* ``connection.get_destinations()`` - returns a list of input ``Port`` consuming the data.
* ``connection.get_destination()`` - returns a single input ``Port`` consuming the data. If there are multiple consumers, the exception is raised.
The ``Connection`` class provides methods to modify a graph by changing a source or destination(s) of a connection. For
example, the function call ``op3.out_port(0).get_connection().set_source(op1.out_port(0))`` changes source port of edges
consuming data from port ``op3.out_port(0)`` to ``op1.out_port(0)``. The transformed graph from the sample above is depicted
below:
.. image:: _static/images/MO_connection_example_1.svg
:scale: 80 %
:align: center
Another example is the ``connection.set_destination(dest_port)`` method. It disconnects ``dest_port`` and all input ports to which
the connection is currently connected and connects the connection source port to ``dest_port``.
Note that connection works seamlessly during front, middle, and back phases and hides the fact that the graph structure is
different.
.. note::
For a full list of available methods, refer to the ``Connection`` class implementation in the ``mo/graph/connection.py`` file.
====================
Additional Resources
====================
* :doc:`Model Optimizer Extensibility <openvino_docs_MO_DG_prepare_model_customize_model_optimizer_Customize_Model_Optimizer>`
* :doc:`Model Optimizer Extensions <openvino_docs_MO_DG_prepare_model_customize_model_optimizer_Model_Optimizer_Extensions>`
* :doc:`Extending Model Optimizer with Caffe Python Layers <openvino_docs_MO_DG_prepare_model_customize_model_optimizer_Extending_Model_Optimizer_With_Caffe_Python_Layers>`
@endsphinxdirective

View File

@@ -1,59 +0,0 @@
# Low-Precision 8-bit Integer Inference
## Disclaimer
Low-precision 8-bit inference is optimized for:
- Intel® architecture processors with the following instruction set architecture extensions:
- Intel® Advanced Vector Extensions 512 Vector Neural Network Instructions (Intel® AVX-512 VNNI)
- Intel® Advanced Vector Extensions 512 (Intel® AVX-512)
- Intel® Advanced Vector Extensions 2.0 (Intel® AVX2)
- Intel® Streaming SIMD Extensions 4.2 (Intel® SSE4.2)
- Intel® processor graphics:
- Intel® Iris® Xe Graphics
- Intel® Iris® Xe MAX Graphics
## Introduction
For 8-bit integer computation, a model must be quantized. You can use a quantized model from [OpenVINO™ Toolkit Intel's Pre-Trained Models](@ref omz_models_group_intel) or quantize a model yourself. For more details on how to get quantized model please refer to [Model Optimization](@ref openvino_docs_model_optimization_guide) document.
The quantization process adds [FakeQuantize](../ops/quantization/FakeQuantize_1.md) layers on activations and weights for most layers. Read more about mathematical computations in the [Uniform Quantization with Fine-Tuning](https://github.com/openvinotoolkit/nncf/blob/develop/docs/compression_algorithms/Quantization.md).
When you pass the quantized IR to the OpenVINO™ plugin, the plugin automatically recognizes it as a quantized model and performs 8-bit inference. Note that if you pass a quantized model to another plugin that does not support 8-bit inference but supports all operations from the model, the model is inferred in precision that this plugin supports.
At runtime, the quantized model is loaded to the plugin. The plugin uses the `Low Precision Transformation` component to update the model to infer it in low precision:
- Update `FakeQuantize` layers to have quantized output tensors in low-precision range and add dequantization layers to compensate for the update. Dequantization layers are pushed through as many layers as possible to have more layers in low precision. After that, most layers have quantized input tensors in low-precision range and can be inferred in low precision. Ideally, dequantization layers should be fused in the next `FakeQuantize` layer.
- Weights are quantized and stored in `Constant` layers.
## Prerequisites
Let's explore quantized [TensorFlow* implementation of the ResNet-50](https://github.com/openvinotoolkit/open_model_zoo/tree/master/models/public/resnet-50-tf) model. Use [Model Downloader](@ref omz_tools_downloader) to download the `FP16` model from [OpenVINO™ Toolkit - Open Model Zoo repository](https://github.com/openvinotoolkit/open_model_zoo):
```sh
omz_downloader --name resnet-50-tf --precisions FP16-INT8
```
After that you should quantize the model with the [Model Quantizer](@ref omz_tools_downloader) tool.
```sh
omz_quantizer --model_dir public/resnet-50-tf --dataset_dir <DATASET_DIR> --precisions=FP16-INT8
```
The simplest way to infer the model and collect performance counters is the [Benchmark Application](../../samples/cpp/benchmark_app/README.md):
```sh
./benchmark_app -m resnet-50-tf.xml -d CPU -niter 1 -api sync -report_type average_counters -report_folder pc_report_dir
```
If you infer the model with the OpenVINO™ CPU plugin and collect performance counters, all operations (except the last non-quantized SoftMax) are executed in INT8 precision.
## Low-Precision 8-bit Integer Inference Workflow
For 8-bit integer computations, a model must be quantized. Quantized models can be downloaded from [Overview of OpenVINO™ Toolkit Intel's Pre-Trained Models](@ref omz_models_group_intel). If the model is not quantized, you can use the [Post-Training Optimization Tool](@ref pot_introduction) to quantize the model. The quantization process adds [FakeQuantize](../ops/quantization/FakeQuantize_1.md) layers on activations and weights for most layers. Read more about mathematical computations in the [Uniform Quantization with Fine-Tuning](https://github.com/openvinotoolkit/nncf/blob/develop/docs/compression_algorithms/Quantization.md).
8-bit inference pipeline includes two stages (also refer to the figure below):
1. *Offline stage*, or *model quantization*. During this stage, [FakeQuantize](../ops/quantization/FakeQuantize_1.md) layers are added before most layers to have quantized tensors before layers in a way that low-precision accuracy drop for 8-bit integer inference satisfies the specified threshold. The output of this stage is a quantized model. Quantized model precision is not changed, quantized tensors are in the original precision range (`fp32`). `FakeQuantize` layer has `levels` attribute which defines quants count. Quants count defines precision which is used during inference. For `int8` range `levels` attribute value has to be 255 or 256. To quantize the model, you can use the [Post-Training Optimization Tool](@ref pot_introduction) delivered with the Intel® Distribution of OpenVINO™ toolkit release package.
When you pass the quantized IR to the OpenVINO™ plugin, the plugin automatically recognizes it as a quantized model and performs 8-bit inference. Note, if you pass a quantized model to another plugin that does not support 8-bit inference but supports all operations from the model, the model is inferred in precision that this plugin supports.
2. *Runtime stage*. This stage is an internal procedure of the OpenVINO™ plugin. During this stage, the quantized model is loaded to the plugin. The plugin uses `Low Precision Transformation` component to update the model to infer it in low precision:
- Update `FakeQuantize` layers to have quantized output tensors in low precision range and add dequantization layers to compensate the update. Dequantization layers are pushed through as many layers as possible to have more layers in low precision. After that, most layers have quantized input tensors in low precision range and can be inferred in low precision. Ideally, dequantization layers should be fused in the next `FakeQuantize` layer.
- Weights are quantized and stored in `Constant` layers.
![int8_flow]

View File

@@ -1,6 +1,8 @@
# Legal Information {#openvino_docs_Legal_Information}
.. {#openvino_docs_Legal_Information}
Legal Information
=================
@sphinxdirective
.. meta::
:description: Learn about legal information and policies related to the use
@@ -29,6 +31,5 @@ The OpenVINO logo must be used in connection with truthful, non-misleading refer
Modification of the logo or use of any separate element(s) of the logo alone is not allowed.
@endsphinxdirective

View File

@@ -1,6 +1,8 @@
# About OpenVINO {#about_openvino}
.. {#about_openvino}
About OpenVINO
==============
@sphinxdirective
.. toctree::
:maxdepth: 1
@@ -72,5 +74,4 @@ Case Studies
OpenVINO has been employed in various case studies across a wide range of industries and applications, including healthcare, retail, safety and security, transportation, and more. Read about how OpenVINO enhances efficiency, accuracy, and safety in different sectors on the `success stories page <https://www.intel.com/content/www/us/en/internet-of-things/ai-in-production/success-stories.html>`__.
@endsphinxdirective

View File

@@ -1,7 +1,9 @@
# Additional Resources {#resources}
.. {#resources}
Additional Resources
====================
@sphinxdirective
.. meta::
:description: Learn more about OpenVINO from benchmark results, case studies
@@ -28,6 +30,5 @@
`Case Studies <https://www.intel.com/openvino-success-stories>`__ are articles about real-world examples of OpenVINO™ usage.
@endsphinxdirective

View File

@@ -1,6 +1,8 @@
# OpenVINO™ Telemetry {#openvino_docs_telemetry_information}
.. {#openvino_docs_telemetry_information}
OpenVINO™ Telemetry
=====================
@sphinxdirective
.. meta::
:description: Learn about OpenVINO™ telemetry, that collects anonymous usage data for the purpose of improving OpenVINO™ tools.
@@ -56,4 +58,3 @@ Telemetry Data Collection Details
Any raw data that has reached the 14-month threshold is deleted from Google Analytics on a monthly basis.
@endsphinxdirective

View File

@@ -1,6 +1,8 @@
# OpenVINO TensorFlow Frontend Capabilities and Limitations {#openvino_docs_MO_DG_TensorFlow_Frontend}
.. {#openvino_docs_MO_DG_TensorFlow_Frontend}
OpenVINO TensorFlow Frontend Capabilities and Limitations
=========================================================
@sphinxdirective
.. meta::
:description: TensorFlow Frontend in OpenVINO Runtime is a C++ based frontend used
@@ -16,4 +18,3 @@ The current limitations:
* There is no full parity between the legacy frontend and the new frontend in MO. Known limitations compared to the legacy approach are: TF1 Control flow, Complex types, models requiring config files and old python extensions. The solution detects unsupported functionalities and provides fallback. To force the use of the legacy frontend, ``--use_legacy_frontend`` must be specified.
@endsphinxdirective

View File

@@ -1,6 +1,8 @@
# Compatibility and Support {#compatibility_and_support}
.. {#compatibility_and_support}
Compatibility and Support
=========================
@sphinxdirective
.. toctree::
:maxdepth: 1
@@ -22,4 +24,3 @@
@endsphinxdirective

View File

@@ -1,7 +1,9 @@
# Supported Devices {#openvino_docs_OV_UG_supported_plugins_Supported_Devices}
.. {#openvino_docs_OV_UG_supported_plugins_Supported_Devices}
Supported Devices
=================
@sphinxdirective
.. meta::
:description: Check the list of officially supported models in Intel®
@@ -57,6 +59,5 @@ topic (step 3 "Configure input and output").
@endsphinxdirective

View File

@@ -1,7 +1,9 @@
# Supported Models {#openvino_supported_models}
.. {#openvino_supported_models}
Supported Models
================
@sphinxdirective
.. meta::
:description: Check the list of officially supported models in Intel®
@@ -30,6 +32,5 @@ The list is based on release 2023.0, as of June 01, 2023
* As OpenVINO™ is open source you can enhance it with your own contribution to the GitHub repository. To learn more, see the articles on :doc:`OpenVINO Extensibility <openvino_docs_Extensibility_UG_Intro>`.
@endsphinxdirective

View File

@@ -1,6 +1,8 @@
# Supported Operations - by Framework Frontend {#openvino_resources_supported_operations_frontend}
.. {#openvino_resources_supported_operations_frontend}
Supported Operations - by Framework Frontend
============================================
@sphinxdirective
.. meta::
:description: Check the list of operations supported by OpenVINO Framework Frontend.
@@ -1138,4 +1140,3 @@ This page lists operations supported by OpenVINO Framework Frontend.
========================================== ==========================================================================================
@endsphinxdirective

View File

@@ -1,6 +1,8 @@
# Supported Operations - by Inference Devices {#openvino_resources_supported_operations}
.. {#openvino_resources_supported_operations}
Supported Operations - by Inference Devices
===========================================
@sphinxdirective
This page lists operations supported by OpenVINO inference devices. The table presents general information,
for a more detailed and most recent listing of operations that are implemented and tested:
@@ -168,4 +170,3 @@ for a more detailed and most recent listing of operations that are implemented a
@endsphinxdirective

View File

@@ -1,6 +1,8 @@
# Performance Benchmarks {#openvino_docs_performance_benchmarks}
.. {#openvino_docs_performance_benchmarks}
Performance Benchmarks
======================
@sphinxdirective
.. meta::
:description: Use the benchmark results for Intel® Distribution of OpenVINO™
@@ -179,4 +181,3 @@ Your costs and results may vary.
Intel optimizations, for Intel compilers or other products, may not optimize to the same degree for non-Intel products.
@endsphinxdirective

View File

@@ -1,7 +1,9 @@
# Getting Performance Numbers {#openvino_docs_MO_DG_Getting_Performance_Numbers}
.. {#openvino_docs_MO_DG_Getting_Performance_Numbers}
Getting Performance Numbers
===========================
@sphinxdirective
This guide explains how to use the benchmark_app to get performance numbers. It also explains how the performance
numbers are reflected through internal inference performance counters and execution graphs. It also includes
@@ -154,6 +156,5 @@ Therefore, you can also compile OpenVINO from the source code with ITT enabled a
insights in the application-level performance on the timeline view.
@endsphinxdirective

View File

@@ -1,7 +1,9 @@
# Performance Information F.A.Q. {#openvino_docs_performance_benchmarks_faq}
.. {#openvino_docs_performance_benchmarks_faq}
Performance Information F.A.Q.
==============================
@sphinxdirective
.. meta::
@@ -165,4 +167,3 @@
inference is required.
@endsphinxdirective

View File

@@ -1,7 +1,9 @@
# Model Accuracy {#openvino_docs_performance_int8_vs_fp32}
.. {#openvino_docs_performance_int8_vs_fp32}
Model Accuracy
==============
@sphinxdirective
The following two tables present the absolute accuracy drop calculated as the accuracy difference
between OV-accuracy and the original frame work accuracy for FP32, and the same for INT8 and FP16
@@ -228,4 +230,3 @@ for more information.
Notes: For all accuracy metrics except perplexity a "-", (minus sign), indicates an accuracy drop.
For perplexity the values do not indicate a deviation from a reference but are the actual measured accuracy for the model.
@endsphinxdirective

View File

@@ -1,6 +1,8 @@
# OpenVINO Release Notes {#openvino_release_notes}
.. {#openvino_release_notes}
OpenVINO Release Notes
======================
@sphinxdirective
The Intel® Distribution of OpenVINO™ toolkit is an open-source solution for optimizing
and deploying AI inference in domains such as computer vision,automatic speech
@@ -384,4 +386,3 @@ and distribution options.
@endsphinxdirective

View File

@@ -1,6 +1,8 @@
# System Requirements {#system_requirements}
.. {#system_requirements}
System Requirements
===================
@sphinxdirective
Certain hardware requires specific drivers to work properly with OpenVINO.
@@ -222,4 +224,3 @@ Performance varies by use, configuration and other factors. Learn more at
@endsphinxdirective

View File

@@ -1,6 +1,8 @@
# Documentation {#documentation}
.. {#documentation}
Documentation
=============
@sphinxdirective
.. meta::
:description: Explore the OpenVINO toolkit workflow that entails preparing,
@@ -33,4 +35,3 @@ This section provides reference documents that guide you through the OpenVINO to
| :doc:`OpenVINO™ Security <openvino_docs_security_guide_introduction>`
| Learn how to use OpenVINO securely and protect your data to meet specific security and privacy requirements.
@endsphinxdirective

View File

@@ -1,6 +1,8 @@
# OpenVINO™ Ecosystem Overview {#openvino_ecosystem}
.. {#openvino_ecosystem}
OpenVINO™ Ecosystem Overview
==============================
@sphinxdirective
.. meta::
:description: OpenVINO™ ecosystem offers various resources for developing deep learning solutions.
@@ -62,5 +64,4 @@ More resources:
@endsphinxdirective

View File

@@ -1,6 +1,8 @@
# Datumaro {#datumaro_documentation}
.. {#datumaro_documentation}
Datumaro
========
@sphinxdirective
.. meta::
:description: Start working with Datumaro, which offers functionalities for basic data
@@ -72,5 +74,4 @@ Python Hands-on Examples
* `Deep learning end-to-end use-cases <https://openvinotoolkit.github.io/datumaro/stable/docs/jupyter_notebook_examples/e2e_example.html>`__
@endsphinxdirective

View File

@@ -1,6 +1,8 @@
# OpenVINO™ Training Extensions {#ote_documentation}
.. {#ote_documentation}
OpenVINO™ Training Extensions
===============================
@sphinxdirective
.. meta::
:description: OpenVINO™ Training Extensions include advanced algorithms used
@@ -42,6 +44,5 @@ Tutorials
* `Base tutorial <https://openvinotoolkit.github.io/training_extensions/stable/guide/tutorials/base/index.html>`__
* `Advanced tutorial <https://openvinotoolkit.github.io/training_extensions/stable/guide/tutorials/advanced/index.html>`__
@endsphinxdirective

View File

@@ -1,6 +1,8 @@
# OpenVINO™ Security Add-on {#ovsa_get_started}
.. {#ovsa_get_started}
OpenVINO™ Security Add-on
===========================
@sphinxdirective
.. meta::
:description: Learn how to setup hardware and virtual machines to use the OpenVINO™ Security Add-on to access and run access controlled models.
@@ -1053,5 +1055,4 @@ Use these links for more information:
- `OpenVINO Model Server Quick Start Guide <https://github.com/openvinotoolkit/model_server/blob/main/docs/ovms_quickstart.md>`__
- `Model repository <https://github.com/openvinotoolkit/model_server/blob/main/docs/models_repository.md>`__
@endsphinxdirective

View File

@@ -1,6 +1,8 @@
# OpenVINO Extensibility Mechanism {#openvino_docs_Extensibility_UG_Intro}
.. {#openvino_docs_Extensibility_UG_Intro}
OpenVINO Extensibility Mechanism
================================
@sphinxdirective
.. meta::
:description: Explore OpenVINO™ Extensibility API, which allows adding
@@ -194,4 +196,3 @@ See Also
* :doc:`Using OpenVINO Runtime Samples <openvino_docs_OV_UG_Samples_Overview>`
* :doc:`Hello Shape Infer SSD sample <openvino_inference_engine_samples_hello_reshape_ssd_README>`
@endsphinxdirective

View File

@@ -1,6 +1,8 @@
# How to Implement Custom GPU Operations {#openvino_docs_Extensibility_UG_GPU}
.. {#openvino_docs_Extensibility_UG_GPU}
How to Implement Custom GPU Operations
======================================
@sphinxdirective
.. meta::
:description: Learn the details of custom kernel support for the GPU device to
@@ -358,4 +360,3 @@ execution ends.
For more information, refer to the `printf Function <https://www.khronos.org/registry/OpenCL/sdk/1.2/docs/man/xhtml/printfFunction.html>`__.
@endsphinxdirective

View File

@@ -1,6 +1,8 @@
# Custom OpenVINO™ Operations {#openvino_docs_Extensibility_UG_add_openvino_ops}
.. {#openvino_docs_Extensibility_UG_add_openvino_ops}
Custom OpenVINO™ Operations
=============================
@sphinxdirective
.. meta::
:description: Explore OpenVINO™ Extension API which enables registering
@@ -83,4 +85,3 @@ OpenVINO™ operation contains two constructors:
:language: cpp
:fragment: [op:evaluate]
@endsphinxdirective

View File

@@ -1,6 +1,8 @@
# Frontend Extensions {#openvino_docs_Extensibility_UG_Frontend_Extensions}
.. {#openvino_docs_Extensibility_UG_Frontend_Extensions}
Frontend Extensions
===================
@sphinxdirective
.. meta::
:description: Learn how to use frontend extension classes to facilitate the mapping
@@ -414,6 +416,5 @@ The next example shows such conversion for the ``TopKV2`` operation.
:language: cpp
:fragment: [frontend_extension_tf_TopK]
@endsphinxdirective

View File

@@ -1,6 +1,8 @@
# Overview of OpenVINO Plugin Library {#openvino_docs_ie_plugin_dg_overview}
.. {#openvino_docs_ie_plugin_dg_overview}
Overview of OpenVINO Plugin Library
===================================
@sphinxdirective
.. meta::
:description: Develop and implement independent inference solutions for
@@ -97,4 +99,3 @@ API References
* `OpenVINO Plugin API <https://docs.openvino.ai/2023.2/groupov_dev_api.html>`__
* `OpenVINO Transformation API <https://docs.openvino.ai/2023.2/groupie_transformation_api.html>`__
@endsphinxdirective

View File

@@ -1,6 +1,8 @@
# Asynchronous Inference Request {#openvino_docs_ov_plugin_dg_async_infer_request}
.. {#openvino_docs_ov_plugin_dg_async_infer_request}
Asynchronous Inference Request
==============================
@sphinxdirective
.. meta::
:description: Use the base ov::IAsyncInferRequest class to implement a custom asynchronous inference request in OpenVINO.
@@ -73,5 +75,4 @@ The method allows to cancel the infer request execution:
:language: cpp
:fragment: [async_infer_request:cancel]
@endsphinxdirective

View File

@@ -1,6 +1,8 @@
# Build Plugin Using CMake {#openvino_docs_ov_plugin_dg_plugin_build}
.. {#openvino_docs_ov_plugin_dg_plugin_build}
Build Plugin Using CMake
========================
@sphinxdirective
.. meta::
:description: Learn how to build a plugin using CMake and OpenVINO Developer Package.
@@ -101,5 +103,4 @@ To build a plugin and its tests, run the following CMake scripts:
The ``openvino::funcSharedTests`` static library with common functional OpenVINO Plugin tests is imported via the OpenVINO Developer Package.
@endsphinxdirective

View File

@@ -1,6 +1,8 @@
# Compiled Model {#openvino_docs_ov_plugin_dg_compiled_model}
.. {#openvino_docs_ov_plugin_dg_compiled_model}
Compiled Model
==============
@sphinxdirective
.. meta::
:description: Use the ov::CompiledModel class as the base class for a compiled
@@ -132,4 +134,3 @@ The methods returns the runtime model with backend specific information.
The next step in plugin library implementation is the :doc:`Synchronous Inference Request <openvino_docs_ov_plugin_dg_infer_request>` class.
@endsphinxdirective

View File

@@ -1,6 +1,8 @@
# Synchronous Inference Request {#openvino_docs_ov_plugin_dg_infer_request}
.. {#openvino_docs_ov_plugin_dg_infer_request}
Synchronous Inference Request
=============================
@sphinxdirective
.. meta::
:description: Use the ov::ISyncInferRequest interface as the base class to implement a synchronous inference request in OpenVINO.
@@ -146,4 +148,3 @@ The plugin specific method allows to interrupt the synchronous execution from th
The next step in the plugin library implementation is the :doc:`Asynchronous Inference Request <openvino_docs_ov_plugin_dg_async_infer_request>` class.
@endsphinxdirective

Some files were not shown because too many files have changed in this diff Show More