Compare commits

...

1633 Commits

Author SHA1 Message Date
Anuj Mittal
2eb6fbcca1 installing-openvino-yocto: remove reference to staticdev (#11656)
This is no longer generated or required.

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
2022-05-12 09:51:34 +02:00
Anuj Mittal
1bf8a41ff6 Yocto documentation updates (#10549)
* installing-openvino-yocto: fix documentation links

Point to the new Yocto docs website.

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>

* installing-openvino-yocto: add step to checkout specific branch

Request users to checkout specific branch of meta-intel where this
version of OpenVINO is available.

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>

* Update installing-openvino-yocto.md

Co-authored-by: Yuan Xu <yuan1.xu@intel.com>
2022-02-25 12:31:51 +03:00
Alexey Suhov
c5f7ad383e Fix license header in Movidius sources 2021-06-02 20:33:21 +03:00
Pavel Esir
cccff7fe0d added RNN-t conversion doc (#5140)
* added RNN-t conversion doc

* applied review comments

* a couple of corrections

* added pip3 everywhere

* fixed a typo

* applied review comments

* title name fix

* applied Tatiana's comments round 2

* fixed a typo for 'inference'

* fixed typo in MLCommons name

* moved to PyTorch* specific, applied comments

* pytorch_specific typo

* froze MLCommons revision to r1.0; fixed typo in MLCommons relative path
2021-05-31 13:14:05 +03:00
Nikolay Tyukaev
b33800a61c fix layout (#5381)
* fix

* fix labels
2021-04-26 13:31:23 +03:00
Kate Generalova
320887b424 doc: add Red Hat docker registry (#5184) (#5253) 2021-04-15 11:01:52 +03:00
Maxim Vafin
5f2e584231 Add PyTorch section to the documentation (#4972)
* Add PyTorch section to the documentation

* Apply review feedback

* Remove section about loop

* Apply review feedback

* Apply review feedback

* Apply review feedback
2021-04-13 14:34:35 +03:00
Andrey Zaytsev
ba35364a53 Feature/benchmarks 2021 3 ehl (#5191)
* Added EHL config

* Updated graphs

* improve table formatting

* Wrap <iframe> tag with \htmlonly \endhtmlonly to avoid build errors

* Updated graphs

* Fixed links to TDP and Price for 8380
2021-04-12 15:38:07 +03:00
Anton Chetverikov
1c84064e06 Add specification for ExperimentalDetectron* oprations (#5128) 2021-04-07 14:01:08 +03:00
Nikolay Tyukaev
c370284bc4 fix doc iframe issue - 2021.3 (#5090)
* wrap with htmlonly

* wrap with htmlonly
2021-04-06 11:34:10 +03:00
Dmitry Kurtaev
81b0aec201 Enable mo.front.common.extractors module (#5038)
* Enable mo.front.common.extractors module (#5018)

* Enable mo.front.common.extractors module

* Update package_BOM.txt

* Test MO wheel content
2021-04-01 13:54:09 +03:00
Alexey Suhov
f37e14c614 update OpenCV version to 4.5.2 (#5069)
* update OpenCV version to 4.5.2
2021-04-01 13:30:03 +03:00
Sergey Lyubimtsev
7fe8264703 compression.configs.hardware config to package_data (#5066) 2021-04-01 11:34:59 +03:00
Andrey Zaytsev
a5cfe0ecb2 fixes for graphs (#5057) 2021-03-31 16:21:09 +03:00
Andrey Zaytsev
22cf9efcdc Feature/doc fixes 2021 3 (#4971)
* Made changes for CVS-50424

* Changes for CVS-49349

* Minor change for CVS-49349

* Changes for CVS-49343

* Cherry-pick #PR4254

* Replaced /opt/intel/openvino/ with /opt/intel/openvino_2021/ as the default target directory

* (CVS-50786) Added a new section Reference IMplementations to keep Speech Library and Speech Recognition Demos

* Doc fixes

* Replaced links to inference_engine_intro.md with Deep_Learning_Inference_Engine_DevGuide.md, fixed links

* Fixed link

* Fixes

* Fixes

* Reemoved Intel® Xeon® processor E family
2021-03-25 21:31:29 +03:00
Alina Alborova
1fdc9e372f [49342] Update recommended CMake version on install guide in documentation (#4763)
* Inserted a disclaimer

* Another disclaimer

* Update installing-openvino-windows.md

* Update installing-openvino-windows.md

* Update installing-openvino-windows.md
2021-03-24 15:03:41 +03:00
Alexey Suhov
18e83a2177 [README.md] change latest release to 2021.3 2021-03-23 22:02:53 +03:00
Alina Alborova
ef892a01df DevCloud call outs (#4904) 2021-03-23 18:09:30 +03:00
Ivan Tikhonov
7965797103 Clarification of Low Latency Transformation and State API documentation (#4877)
* Assign/ReadValue, LowLatency and StateAPI clarifications

* Apply suggestions from code review: spelling mistakes

Co-authored-by: Anastasiya Ageeva <anastasiya.ageeva@intel.com>

* fixed wording

* cherry-pick missing commit to release branch: low latency documentation

* Resolve review remarks

Co-authored-by: Anastasiya Ageeva <anastasiya.ageeva@intel.com>
Co-authored-by: Svetlana Dolinina <svetlana.a.dolinina@intel.com>
2021-03-23 16:23:16 +03:00
Andrey Zaytsev
28be0a0452 Feature/ovsa docs 2021 3 (#4914)
* Updated to 2021-3, fixed formatting issues

* Fixed formatting issues

* Fixed formatting issues

* Fixed formatting issues

* Update ovsa_get_started.md
2021-03-23 16:12:32 +03:00
Alina Alborova
8db14b987c [cherry-pick] Extensibility docs review (#4915) 2021-03-23 15:25:30 +03:00
Andrey Zaytsev
9910725a7b Feature/omz link changes (#4911)
* Changed labels for demos and model downloader

* Changed links to models and tools

* Changed links to models and tools

* Changed links to demos
2021-03-23 01:00:17 +03:00
Andrey Zaytsev
c72f2ef88c Feature/benchmarks 2021 3 (#4910)
* added new topics, changed the intro text

* updated

* Updates

* Updates

* Updates

* Updates

* Updates

* Added yolo-v4-tf and unet-camvid-onnx graphs

* Date for pricing is updated to March 15th
2021-03-22 23:27:24 +03:00
Anastasiya Ageeva
a135ab64af Avladimi/cherry pick from master (#4892)
* Fixed CVS-48061

* Reviewed and edited the Customization instructions

* Fixed broken links in the TOC

* Fixed links

* Fixed formatting in the IG for Raspberry
2021-03-22 21:07:15 +03:00
Edward Shogulin
9a7e939a6f [DOC] Low-Precision 8-bit Integer Inference (#4834)
* [DOC] Low-Precision 8-bit Integer Inference

* [DOC] Low-Precision 8-bit Integer Inference: comment fixes

* Update docs/IE_DG/Int8Inference.md

Co-authored-by: Anastasiya Ageeva <anastasiya.ageeva@intel.com>

* Update docs/IE_DG/Int8Inference.md

Co-authored-by: Anastasiya Ageeva <anastasiya.ageeva@intel.com>

* Update docs/IE_DG/Int8Inference.md

Co-authored-by: Anastasiya Ageeva <anastasiya.ageeva@intel.com>

* Update docs/IE_DG/Int8Inference.md

Co-authored-by: Anastasiya Ageeva <anastasiya.ageeva@intel.com>

* Update docs/IE_DG/Int8Inference.md

Co-authored-by: Anastasiya Ageeva <anastasiya.ageeva@intel.com>

* Update docs/IE_DG/Int8Inference.md

Co-authored-by: Anastasiya Ageeva <anastasiya.ageeva@intel.com>

* Update docs/IE_DG/Int8Inference.md

Co-authored-by: Anastasiya Ageeva <anastasiya.ageeva@intel.com>

* Update docs/IE_DG/Int8Inference.md

Co-authored-by: Anastasiya Ageeva <anastasiya.ageeva@intel.com>

* Update docs/IE_DG/Int8Inference.md

Co-authored-by: Anastasiya Ageeva <anastasiya.ageeva@intel.com>

* Update docs/IE_DG/Int8Inference.md

Co-authored-by: Anastasiya Ageeva <anastasiya.ageeva@intel.com>

* [DOC] LPT comments fix

* [DOC] LPT comments fix: absolute links are updated to relative

* Update Int8Inference.md

* Update Int8Inference.md

Co-authored-by: Anastasiya Ageeva <anastasiya.ageeva@intel.com>
Co-authored-by: Andrey Zaytsev <andrey.zaytsev@intel.com>
2021-03-22 14:24:24 +03:00
Anastasiya Ageeva
f9075c808a avladimi/cvs-31369: Documented packages content to YUM/APT IGs (#4839)
* Documented runtime/dev packages content

* Minor formatting fixes

* Implemented review comments

* Update installing-openvino-apt.md

Co-authored-by: Andrey Zaytsev <andrey.zaytsev@intel.com>
2021-03-22 14:07:06 +03:00
Evgeny Lazarev
60059f2c75 Fixed dead lock in telemetry (#4873)
* Fixed dead lock in telemetry

* Refactored TelemetrySender.send function

* Refactored send function implementation to avoid deadlocks

* Unit tests for telemetry sender function

* Added legal header
2021-03-19 14:59:45 +03:00
Anton Chetverikov
58012dcd71 Add documentation on how to convert F3Net model (#4863)
* Add instruction for F3Net model pytorch->onnx conversion

* Fix style
2021-03-18 15:24:56 +03:00
Maxim Vafin
71f27da6a8 Document YOLACT support (#4749)
* Document YOLACT support

* Add preprocessing section

* Apply suggestions from code review

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

Co-authored-by: Tatiana Savina <tatiana.savina@intel.com>
2021-03-18 12:09:39 +03:00
Helena Kloosterman
35a898ab85 Updated PIP install instructions (#4821) 2021-03-17 11:42:55 +03:00
Vladislav Volkov
a5d9f96efd MKLDNN weights cache key calculation algorithm changed (#4790) 2021-03-16 21:42:26 +03:00
Alina Alborova
1ef890329c Fixed wrong link (#4817) 2021-03-16 18:00:26 +03:00
Andrew Bakalin
a86ae42aed [VPU] Limit dlclose() WA to be used for Ubuntu only (#4806) 2021-03-16 14:54:40 +03:00
Andrey Dmitriev
cef0696ef7 [DOCS] added iname/oname (#4735) 2021-03-16 12:41:54 +03:00
Andrey Zaytsev
e57a96474d Feature/vpu doc fixes 2021 3 (#4635)
* Documentation fixes and updates for VPU

* minor correction

* minor correction

* Fixed links

* updated supported layers list for vpu
2021-03-15 16:40:17 +03:00
Ilya Lavrenov
ed052022d3 Fixed some klockwork issues in C API samples (#4767) 2021-03-15 11:00:07 +03:00
Alina Alborova
6eda5c39c6 Inserted a disclaimer (#4760) 2021-03-12 18:38:58 +03:00
Mikhail Ryzhov
0100810dd6 Added mo.py to wheel packages (#4731) 2021-03-12 15:57:12 +03:00
Elizaveta Lobanova
882e377ef9 [GNA] Update documentation regarding splits and concatenations support (#4740) 2021-03-12 14:00:15 +03:00
Ilya Lavrenov
c9d5d95e2c Blocked dims hwc 2021/3 (#4729)
* Fix for BlockedDims

* Added test for HWC layout
2021-03-11 16:02:25 +03:00
Maxim Shevtsov
d77bc36dcd Docs update (#4626)
* Updated latency case desc to cover multi-socket machines

* updated opt guide a bit

* avoiding '#' which is interpreted as ref

* Update CPU.md

* Update docs/optimization_guide/dldt_optimization_guide.md

Co-authored-by: Alina Alborova <alina.alborova@intel.com>

* Update docs/optimization_guide/dldt_optimization_guide.md

Co-authored-by: Alina Alborova <alina.alborova@intel.com>

* Update docs/optimization_guide/dldt_optimization_guide.md

Co-authored-by: Alina Alborova <alina.alborova@intel.com>

* Update docs/optimization_guide/dldt_optimization_guide.md

Co-authored-by: Alina Alborova <alina.alborova@intel.com>

* Update docs/optimization_guide/dldt_optimization_guide.md

Co-authored-by: Alina Alborova <alina.alborova@intel.com>

Co-authored-by: Alina Alborova <alina.alborova@intel.com>
2021-03-11 15:33:08 +03:00
Andrey Somsikov
19e1b6002e Catch std::except in fuzz tests (#4695)
Fuzz tests must catch all expected exceptions from IE. IE is using C++ std
library which may raise standard exceptions which IE pass through.
2021-03-11 14:09:36 +03:00
Ivan Tikhonov
6bcd0f6072 Fix python API for Loop/TensorIterator/Assign/ReadValue operations 2021-03-11 13:22:50 +03:00
Anton Chetverikov
0e8534a4a9 Add STN to list of supported models (#4728) 2021-03-11 11:55:45 +03:00
Ilya Churaev
08d7c3e75f Restored folded Operations for QueryNetwork (#4685)
* Restored folded Operations for QueryNetwork

* Fixed comment

* Add unfolded constant operations to supported layers map
2021-03-11 10:41:57 +03:00
Evgeny Lazarev
821d513150 Updated documentation about the supported YOLOv3 model from ONNX (#4722) (#4726) 2021-03-11 10:32:13 +03:00
Mikhail Letavin
38a48b9cbf Fix NormalizeL2 creation in QueryNetwork (cherry pick from master PR 4310) (#4651) 2021-03-10 19:41:35 +03:00
Mikhail Letavin
c6d8905a88 [IE CLDNN] Fix missing variable initializations and types (#4669) 2021-03-10 16:23:10 +03:00
Ilya Churaev
3a80652d70 Updated nGraph custom op documentation (#4604)
* Updated nGraph custom op documentation

* Fixed comments
2021-03-10 16:16:57 +03:00
Roman Kazantsev
120d3a596d Document TensorFlow 2* Update: Layers Support and Remove Beta Status (#4474) (#4711)
* Document TensorFlow 2* Update: Layers Support and Remove Beta Status

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

* Update documentation based on latest test results and feedback

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

* Remove ConvLSTM2D from supported layers list

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

* Document Dot layer without limitation

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

* Address feedback upon DenseFeatures and RNN operations

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

* Do a grammar correction

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

* Do a grammar correction based on feedback

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2021-03-10 13:35:46 +03:00
Andrew Bakalin
25af83db81 [VPU] WA for Segmentation fault on dlclose() issue (#4645) 2021-03-10 12:09:55 +03:00
Maksim Doronin
03c6f4e3fe [IE][VPU]: Fix empty output of CTCGreedyDecoderSeqLen (#4653)
* Allow the second output of CTCGreedyDecoderSeqLen to be nullptr in cases when it is not used but calculated in the Myriad plugin. In this case, parse the second output as FakeData
* It is a cherry-pick of #4652
* Update the firmware to release version
2021-03-10 11:48:13 +03:00
Mikhail Ryzhov
5d3d323bed [doc] Updated PyPI support OSes (#4643) (#4662)
* [doc] Updated PyPI support OSes (#4643)

* Updated PyPI support OSes

* Added python versions for win and mac

* Update pypi-openvino-dev.md

* Update pypi-openvino-dev.md

* Update pypi-openvino-rt.md

* Update pypi-openvino-dev.md

Co-authored-by: Andrey Zaytsev <andrey.zaytsev@intel.com>
2021-03-09 17:54:29 +03:00
Anastasia Popova
a53524a554 Fixed bug in assign elimination transformation. (#4644) 2021-03-09 14:58:12 +03:00
Maxim Vafin
02d2dbd0fa Add documentation on how to convert QuartzNet model (#4664)
* Add documentation on how to convert QuartzNet model (#4422)

* Add documentation on how to convert QuartzNet model

* Apply review feedback

* Small fix

* Apply review feedback

* Apply suggestions from code review

Co-authored-by: Anastasiya Ageeva <anastasiya.ageeva@intel.com>

Co-authored-by: Anastasiya Ageeva <anastasiya.ageeva@intel.com>

* Add reference to file

Co-authored-by: Anastasiya Ageeva <anastasiya.ageeva@intel.com>
2021-03-09 13:55:46 +03:00
Ilya Lavrenov
bfe0748b4c Docs api (#4657)
* Updated API changes document

* Comment for CVS-49440
2021-03-09 12:50:37 +03:00
Nikolay Shchegolev
d78577aecb [CPU] Statically analyzed issues. (#4637) 2021-03-09 12:26:32 +03:00
Mikhail Ryzhov
e09f0e4808 Corrected PyYAML dependency (#4598) (#4620)
5.4.2 is absent on PyPI
2021-03-05 17:24:36 +03:00
Roman Kazantsev
ff73955354 Add workaround for control edges to support TF 2.4 RNN (#4634)
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2021-03-05 16:41:36 +03:00
Vladislav Volkov
18cb230af4 Fix for MKLDNN constant layers execution (#4642)
* Fix for MKLDNN constant layers execution

* Single mkldnn::engine for all MKLDNN graphs
2021-03-05 16:28:10 +03:00
Alina Kladieva
9067a25616 [.ci/azure] Add windows_conditional_compilation.yml (#4648) (#4655) 2021-03-05 15:59:59 +03:00
Gorokhov Dmitriy
c4ff0ffa9d [CPU] Supported ANY layout for inputs in inferRequest (#4621) 2021-03-05 12:30:26 +03:00
Ilya Churaev
4675a12c8f Fixed KW hits (#4638) 2021-03-05 11:13:11 +03:00
Evgeny Lazarev
3cd5da0797 Fixed transformation to pull constants into Loop body (cherry-pick of PR 4591) (#4607)
* Cherry-pick of PR 4591

* Fixed typo

* Moved a check into the parameter_unchanged_after_iteration function
2021-03-04 17:56:54 +03:00
Andrey Zaytsev
9b402f226f Formula fix (#4624) 2021-03-04 16:24:56 +03:00
Alina Kladieva
784adca70a [.ci/azure] Enable CC build (#4619) 2021-03-04 14:49:50 +03:00
Ilya Churaev
8e1603f7fd Fixed clone rt info (#4597) 2021-03-04 13:02:11 +03:00
azhogov
66ede40e4e Merge branch 'releases/2021/3' of https://github.com/openvinotoolkit/openvino into releases/2021/3 2021-03-04 12:22:59 +03:00
azhogov
40a29a7aa3 Azure CI: Add "ref: releases/2021/3" 2021-03-04 12:22:31 +03:00
Vladislav Volkov
a7e00dae54 Fix for broken CC in CPU plugin (#4595) 2021-03-04 12:22:15 +03:00
Andrey Zaytsev
4c40494605 Feature/azaytsev/gna model link fixes (#4599)
* Added info on DockerHub CI Framework

* Feature/azaytsev/change layout (#3295)

* Changes according to feedback comments

* Replaced @ref's with html links

* Fixed links, added a title page for installing from repos and images, fixed formatting issues

* Added links

* minor fix

* Added DL Streamer to the list of components installed by default

* Link fixes

* Link fixes

* ovms doc fix (#2988)

* added OpenVINO Model Server

* ovms doc fixes

Co-authored-by: Trawinski, Dariusz <dariusz.trawinski@intel.com>

* Updated openvino_docs.xml

* Link Fixes

Co-authored-by: Trawinski, Dariusz <dariusz.trawinski@intel.com>
2021-03-04 12:00:07 +03:00
Andrey Zaytsev
3e2a4a5df1 Feature/azaytsev/cldnn doc fixes (#4600)
* Legal fixes, removed the Generating docs section

* Removed info regarding generating docs

Co-authored-by: Trawinski, Dariusz <dariusz.trawinski@intel.com>
2021-03-04 11:50:02 +03:00
Vladislav Volkov
e0573e7e7b Constant nodes outputs sharing between streams (#4561) 2021-03-03 16:57:15 +03:00
Andrew Bakalin
430adbc191 [IE][VPU]: Fixes for Yolo-V3 (#4517)
* Fix negative axis processing for StaticShapeTopK
* Preserve output names in MergeSubsequentDSROperations
* Do validate_and_infer_types every time it's called in StaticShape* operations. It's needed to infer the correct output type in case it was changed from the last call moment (e.g. the ConvertPrecision pass have been called)
2021-03-03 16:47:42 +03:00
Edward Shogulin
7aed4ab3e7 [LPT] GPU support3DTensorOnActivations (#4562) 2021-03-03 16:18:25 +03:00
Alexander Zhogov
d76b4da77a [Azure CI] Disable real CC build 2021-03-03 15:56:37 +03:00
Alina Kladieva
e8aa8e3efc Add cc azure pipeline (#4586)
* [.ci/azure] Add linux_conditional_compilation.yml

* Update linux_conditional_compilation.yml

* [.ci/azure] Update config for lin cc build
2021-03-03 15:27:38 +03:00
Piotr Rozen
bf467e097f [GNA] Fixed issue with multiple connections between pair of nodes (Split=>Concat) (#3953)
* fixed: gna split-concat-concat sequence issue
fixed: gna permute-conv-maxpool-permute issue

* fix issue with multiple connections between split|crop|memory & concat
fix issue with serializing IR V7 model

* fixed: gna split-concat-concat sequence issue
fixed: gna permute-conv-maxpool-permute issue

* fix issue with multiple connections between split|crop|memory & concat
fix issue with serializing IR V7 model

* fixed issues after rebase

* Fix for the test TEST_F(FP32NonQuantizedTest, LSTMCellPropagateForward)

Input x[96] = 0.1
Scaled input = 0.01
Affine output = 64 * 0.01 * 0.1 + 0.1 = 0.164
Sigmoid(Affine output) = 0.541
Tanh(Affine output) = 0.163
Sigmoid(Affine output)*Tanh(Affine output) = 0.088

Sigmoid(Affine output)*Scaled input = 0.005

H = Sigmoid(Affine output)*Tanh(Affine output) + Sigmoid(Affine output)*Scaled input = 0.093
tanh(H) = 0.093

Result = H + Sigmoid(Affine output)*Scaled input = 0.093 + 0.541*0.093 = 0.093 + 0.050 = 0.143

* Updated copyright date

* [GNA] Added tests for cases connection split->concat

* [GNA] Added fix memory -> concat case

* fixed inf loop during quantization

* fixed code formatting

* fixed failing test smoke_concat_quant_memory_requant/ConcatQuantDuringMemoryRequantTest.CompareWithRefs/netPRC=FP16_IS=128_HS=128_targetDevice=GNA

* fixed removed & mark from pass manager main for loop

* added split=>concat case to InsertCopyLayerPass

Co-authored-by: Andrey Dmitriev <andrey.dmitriev@intel.com>
2021-03-03 12:54:09 +03:00
Mikhail Ryzhov
aadf4f4da6 Updated PyPi documentation (#4423)
* Updated documentation

* Added documentation for dev package

* Added separate documents for PyPI

Co-authored-by: Andrey Zaytsev <andrey.zaytsev@intel.com>
2021-03-03 12:09:09 +03:00
Vladislav Golubev
a719534889 [LPT] matmul with qdq on weights tests (#4283) 2021-03-03 12:07:49 +03:00
Vladislav Golubev
c206830e7b [LPT] Integration branch with fixes for release 2021.3 (#4544)
* [LPT] ClampTransformation segfault fix
[LPT] Clamp with non dequantization multiply functional tests

* [LPT] StridedSliceTransformation: handling Dq without batch

* [LPT] MVN-6 support

Co-authored-by: Zinoviev, Vladimir <vladimir.zinoviev@intel.com>
2021-03-03 11:36:26 +03:00
Gleb Kazantaev
ffade0d1d8 Fix FakeQuantizeMulFusion for cases with NUMPY broadcasting (#4570)
* Fix FQMul fusion

* Added transformation test

* Removed wrong test
2021-03-03 11:34:29 +03:00
Gleb Kazantaev
c1925cc220 Fix klocwork hits (#4573) 2021-03-03 11:27:47 +03:00
Pavel Esir
29612f15e3 Fix StridedSlice replacer order and input permutation when strides are not specified (#4545) 2021-03-03 11:16:56 +03:00
Vladimir Paramuzov
92d750747c [IE CLDNN] Restored optional conversion of quantized model to fp32 (#4485) 2021-03-03 09:28:53 +03:00
Alexandra Sidorova
ebe63f557c [CPU] Fixed strides for Pad after optimized Split (#4556) 2021-03-03 09:28:01 +03:00
Tomasz Dołbniak
a35dfc4c5a Disable the randomly failing test (#4555) 2021-03-03 07:33:09 +03:00
Ilya Lavrenov
1d88cdc45e Fixed gtest build / usage in case of RelWithDebInfo (#4554)
* Fixed gtest build / usage in case of RelWithDebInfo

* Added more modules to fluid_preproc_tests tests
2021-03-03 07:27:23 +03:00
Ilya Lavrenov
f5da64db8a Fixed getting InputInfo name for empty object (#4564) 2021-03-03 07:24:09 +03:00
Ivan Tikhonov
6fb742bec4 Fix LowLatency transformation for Loop (#4557)
* unrolling for Loop operation, fix LowLatency transformation for Loop

* delete unnecessary includes

* update copyright

* fix centOS build, resolve review remarks
2021-03-03 07:21:06 +03:00
Aleksandr Korolev
74d763ebf6 [IE][VPU]: update the condition for tiling for HWops (#4482)
* The condition for tiling for HWops was changed. It fixes some performance degradation issues
2021-03-02 21:34:44 +03:00
Alexey Lebedev
1d5562c266 [IE Python] update python api readme (#4408)
* update python API readme.md

* Update Python API readme.md

* Update api_overview.md

* update IE Python README

* update IE Python README

* Update api_overview.md
2021-03-02 21:33:25 +03:00
Anastasia Kuporosova
6b4abc49a4 [PYTHON API] Add bin, bool, bf16 precisions (#4560) 2021-03-02 21:32:17 +03:00
Alexey Varyzgin
b04a11697e [VS2017] QueryState build error C4996 was fixed (#4547)
* disable and cleanup interp and resample that is covered by interpolate

* QueryState build error C4996 was fixed

Co-authored-by: chenhuwa <chenhu.wang@intel.com>
2021-03-02 21:08:09 +03:00
Ilya Churaev
77e80ddbb3 Fixed fuzzer issues (#4553)
* Fixed code style

* Revert redundant code

* Fixed fuzzer issues
2021-03-02 21:07:53 +03:00
Ivan Tikhonov
d4c5cb2375 Removing unnecessary order checking in Loop/TI operations (#4531)
* deleting a check of order of the input/output descs in ti/loop operations

* added ngraph_reader unit test

* unrolling for Loop operation, fix LowLatency transformation for Loop

* Revert "unrolling for Loop operation, fix LowLatency transformation for Loop"

This reverts commit 7188921ad7.
2021-03-02 18:10:41 +03:00
Anastasia Popova
9f5fad16e7 Added check that new name is unique. (#4516)
* Added check that new name is unique..

* Added unique names test.

* Fixed unique name check.

* Fixed bug.

* Reformat code.

* Fixed bug, extended tests.

* Uncomment tests.
2021-03-02 17:26:55 +03:00
Evgeny Lazarev
f88638006c Reverted changes in the Pad transformations caused a regression in the POT (#4552) 2021-03-02 16:00:11 +03:00
Elizaveta Lobanova
96b7b9441e [GNA] Fix issues with compilation and quantization of input-split-concat pattern (#4489) 2021-03-02 14:59:55 +03:00
Elizaveta Lobanova
1eb830d083 [GNA] Security fixes for 2021.3 (#4538) 2021-03-02 14:57:12 +03:00
Svetlana Dolinina
42c1c65454 fix calculation of memoryoffset shape (#4533)
* fix calculation of memoryoffset shape in 2 cases: after normalization layer (shape can be read from InputDim in loader) and after affincecomponent layer (shape saved in out-size based on weights shape)

* improve comments
2021-03-02 14:35:22 +03:00
Vladimir Gavrilov
473c944e6e Failed MO shape infer after SplitConcatPairToInterpolate transformation, when Concat has more than one producer (#4502)
* Fixes in the MO transformation SplitConcatPairToInterpolate.

* Small fix.

* Small fix.

* Added test for the case when inputs of Concat are two Splits.

* Added docstring to the function get_concat_after_split.

* Some fixes.

* Small fix.
2021-03-02 14:09:42 +03:00
Dmitry Polunin
4946d2e62c Added gstreamer1.0-x pkg for dlstreamer (#4512)
* Added gstreamer1.0-x pkg for dlstreamer

* Added va-driver pkg for dlstreamer

* Update install_openvino_dependencies.sh
2021-03-02 12:41:56 +03:00
Kate Generalova
2674dfeda4 doc: configure docker container for GPU (#4519)
* doc: configure docker container for GPU

* Update docs/install_guides/installing-openvino-docker-linux.md

Co-authored-by: Alina Alborova <alina.alborova@intel.com>

* Update docs/install_guides/installing-openvino-docker-linux.md

Co-authored-by: Alina Alborova <alina.alborova@intel.com>

Co-authored-by: Alina Alborova <alina.alborova@intel.com>
2021-03-02 12:18:35 +03:00
Mikhail Ryzhov
b9fe911ec2 [Wheel] Added configuration for openvono-dev (#4288)
* [Wheel] Added configuration for openvono-dev

* Added dependency on runtime package

* Added patterns for license  files

* Added mo package data

* added AC dependencies
2021-03-02 11:07:20 +03:00
Kate Generalova
03e68dd549 doc: add link to RHEL Docker repo (#4539) 2021-03-02 10:51:33 +03:00
Alexander Perepelkin
6c522fe76b Allow the framework to generate input data without infer request object (#4117) 2021-03-02 10:40:02 +03:00
Szymon Durawa
7e57ec54b3 Revise ADD operation reference implementation (#4453)
* Additional unit tests for Add op, add single layer serialization tests for elementwise ops.

* Format unit test file.
2021-03-02 07:37:13 +03:00
Ivan Tikhonov
f9e8c8e49a Replaced getInputs method with common ngraph API method to handle multi-output case (#4443)
* fix getInputs function in network_helper to get the correct output for nodes with multiple outputs

* removing unnecessary getInputs method as a duplicate of common ngraph API
2021-03-02 07:17:49 +03:00
Tomasz Jankowski
be614035d1 [ONNX] Fix unidirectional broadcast Add, Div, Mul, Sub v6 (#4462)
* Fix uni broadcast add_v6 op

* Add exception for dynamic rank

* Correct axes mapping in Div, Sub, Mul

It commonizes the approach from Add operator.

* Add unit tests to Div, Sub, Mul v6 ops

* Apply constness

* Improve add_v6 unit test readability

* Correct style

* Remove useless or redundant includes
2021-03-01 19:40:44 +03:00
Anton Chetverikov
7770701fe8 Update pooling extender for 3D cases (#4504)
* Update pooling extender for 3d cases

* Update error message
2021-03-01 18:54:47 +03:00
iliya mironov
cfa9facd17 Extend spec for CTCGreedyDecoderSeqLen (#4426)
* Extend spec for CTCGreedyDecoderSeqLen

* Update spec

* Update CTCGreedyDecoder v1 spec

* Fix spec
2021-03-01 18:47:21 +03:00
Alexander Zhogov
f2b8c0f799 Azure CI: Add -vvv for mount 2021-03-01 18:13:05 +03:00
Ilya Churaev
c160912b70 Fixed KW for reference impls (#4530) 2021-03-01 18:07:33 +03:00
Mikhail Ryzhov
3babad19be Added specific for Python3.8 way how to find libs (#4513)
On Windows, with Python >= 3.8, DLLs are no longer imported from the PATH.
os.add_dll_directory() can be used
2021-03-01 16:01:04 +03:00
Gorokhov Dmitriy
264b323199 [CPU] Fixed fallback on ref conv in case exceeding scratchpad limit (#4508) 2021-03-01 15:20:18 +03:00
Anton Chetverikov
96875ef411 Revert non-forward-compatible changes for PriorBox & PriorBoxClustered operations (#4501)
* Add conversion from bool to int

* Update specification

* fix codestyle

* Fix conversion error

* Resolve review comments
2021-03-01 13:50:33 +03:00
Gleb Kazantaev
1bdccb41df Telemetry for IE dependency warnings (#4431)
* Initial telemetry for IE dependency warnings

* Unified MO/IE version extraction; updated telemetry messages to use simplified versions

* Update telemetry

* Renamings; improvements; comments

* Turn On telemetry

* Added tests

* Added versions_mismatch flag

* plarform -> system
2021-03-01 13:30:40 +03:00
Jozef Daniecki
5f14fe9ca1 Fix NonZero output shape inference for static inputs. (#4406)
* Improved error checking in serialization dynamism resolving.

* Fix NonZero output type deduction to resolve also second shape.

* Add NonZero serialization SLT.

* Generalized shape size calculation.

* Refactored dynamic_to_static() in serialization.

* Fixed NonZero dynamic shape inference.
2021-03-01 13:29:37 +03:00
Kate Generalova
9592cdb834 install_deps_scripts: remove RHEL minor version check (#4518) 2021-03-01 12:59:16 +03:00
Roman Lyamin
b637b39179 [IE CLDNN] Fixed MVN-6 with negative axes (#4523) 2021-03-01 12:41:30 +03:00
Maxim Andronov
b224e688fe [IE TESTS] Update ConstantResultSubgraphTest (#4120) 2021-03-01 12:16:06 +03:00
Evgeny Lazarev
e065cf554a Fixed L2NormFusing transformation (#4526)
* Fixed L2NormFusing transformastion

* Refactor L2NormFusing transformation
2021-03-01 12:13:25 +03:00
Evgeny Lazarev
62fb80aa43 Fixed conversion of the TF OD API 2.0 SSD models (#4529) 2021-03-01 11:42:41 +03:00
Andrey Dmitriev
b2b350b851 [GNA] Tests for clamp layer (#4363)
* [GNA] Tests for clamp layer

* [GNA] Fix comments
2021-03-01 11:26:02 +03:00
Alexey Lebedev
7e3a2f6768 [IE PYTHON] update license (#4407)
* update license

* remove the first blank lines and undo changes in inference-engine/thirdparty/mkl-dnn

* test commit

* Update license in tools

* Undo changes in api_overview.md

* update ie_api.pyx and set interpreter in hello_query_device
2021-03-01 08:23:35 +03:00
Evgenya Stepyreva
a3458a2e0c Test Assign-ReadValue shape propagation while function changes input shape (#4515) 2021-03-01 07:18:30 +03:00
Tomasz Dołbniak
cadcd7c926 Remove a duplicate xfail marker for ONNX dropout tests (#4522) 2021-03-01 07:17:29 +03:00
Ilya Churaev
ca9540fda0 Removed getOVNameForOperation (#4514) 2021-03-01 07:13:34 +03:00
Maksim Kutakov
ae5e8caafe [CPU] Splitting order was fixed in the Split layer. (#4472) 2021-02-28 21:11:24 +03:00
Ivan Tikhonov
9b4cef4c13 Delete Reverse op that not included in opset6 from opset table (#4392) 2021-02-28 10:00:55 +03:00
Vladimir Gavrilov
b15a70caf7 Corrections in MO to fix performance drop in Interpolate-4 when mode=linear instead of linear_onnx (#4488)
* Written the transformation that replaces 'linear' mode of Interpolate-4 by 'linear_onnx' mode, when the input tensor rank is equal to 4.

* Fixed BOM-file.

* Fixed copyright year.

* Added message into assert.

* Small fix.
2021-02-27 08:49:47 +03:00
Alexey Suhov
5e43744001 Fix warnings with PDB override for RelWithDebInfo configuration (#4520) 2021-02-26 23:06:24 +03:00
hyunback kim
d72c20528e [IE CLDNN] Fix reduce accumulate issue in unittest. (#4448) 2021-02-26 18:53:54 +03:00
Svetlana Dolinina
a1ef9498a3 fix unintended shape change (#4510) 2021-02-26 18:29:29 +03:00
Bartosz Sledz
b0043bb599 ONNX Slice operator support types dynamically (#4507) 2021-02-26 16:28:51 +01:00
Ewa Tusień
f88f81c6ba OnnxBackendNodeModelTest XFAILs cleanup (#4432) 2021-02-26 15:34:24 +01:00
Katarzyna Mitrus
76fed9315e Legacy LSTM/RNN/GRU tests clean up (#4265) 2021-02-26 14:27:18 +01:00
Ivan Tikhonov
7cf7e1b5fa Reset Variable to dynamic state in revalidate_and_infer function of ReadValue op (#4430) 2021-02-26 14:01:29 +03:00
Alexey Varyzgin
67592d427e Simd build issue in VS2017 (#4496)
* disable and cleanup interp and resample that is covered by interpolate

* Simd build issue in VS2017

Co-authored-by: chenhuwa <chenhu.wang@intel.com>
2021-02-26 12:24:13 +03:00
Maxim Vafin
c635b949cd Improve axes input specification for MVN-6 (#4491)
* Improve axes input specification for MVN-6

* Apply feedback
2021-02-26 11:11:11 +03:00
Mikhail Ryzhov
2db51bb0d0 [Python] Fixed issues in runtime wheel (#4359)
* Added rpath for plugins

* Corrected dll pathes for PIP

* Fixed plugin install names

* Put libs to the sub-package

* Corrected libraries path according to the new location

* Added download and home page urls
2021-02-26 10:31:58 +03:00
Alexandra Sidorova
ab5d4aa3dc [CPU] Fixed MVN-6 with negative axes decomposition (#4494)
* [CPU] Fixed MVN with negative axes

* Added tests

* Added tests with unordered axes case
2021-02-26 10:27:09 +03:00
Yegor Kruglov
f7b6ad710f update output ports count depending on opset version (#4439) 2021-02-26 09:18:03 +03:00
Gleb Kazantaev
53a96f4a5a Added default value for broadcast to SquearedDifference operation (#4490) 2021-02-26 07:44:08 +03:00
Andrey Somsikov
dcce0f549c Add LeakSanitizer default suppressions list (#4473) 2021-02-26 06:32:42 +03:00
Maxim Andronov
cce3375d55 Revert "[CPU] Changed output blobs creation used output info (#3796)" (#4492)
This reverts commit a15246e1d0.
2021-02-25 23:06:19 +03:00
Ilya Churaev
1458ba392e Removed hardcoded shapes from LogSoftmax operation (#4475)
* Removed hardcoded shapes from LogSoftmax operation

* Added tests

* Fixed comments
2021-02-25 20:02:14 +03:00
Alexander Zhogov
c38e7a2986 Azure CI: Add verbose output for mount 2021-02-25 19:01:42 +03:00
Tomasz Dołbniak
24d2502f83 Check the inputs number before unsafe access (#4480) 2021-02-25 15:02:38 +01:00
Patryk Elszkowski
af712743ab Comparison of InputDescription and OutputDescription in SubGraph (#4123)
* draft - looks good, need merge with other branch

* apply suggestions from PR

* apply suggestions from PR

* add unit test - NotValidInputOrOutput

* rephraze equal for constant

* cleanup all TODOs

* Try to fix TI

* try to satisfy PR comments

* fix spelling

Co-authored-by: Patryk Elszkowski <patryk.elszkowki@intel.com>
2021-02-25 16:31:35 +03:00
Vladimir Paramuzov
8f4d2be537 [IE CLDNN] Enabled cpplint for cldnn and kernel selector (#4478) 2021-02-25 16:18:27 +03:00
Edward Shogulin
cec2f2fb9e [LPT] integrated fixes for release 2021.3 (#4460)
* [LPT] denormal handling in AddTransformation

* [LPT] ReshapeTransformation: 4D->3D after Convolution fix

* [LPT] fuse eltwise to fq fix

* [LPT] fuse mul to fq: mul by zero handling

* [LPT] FuseConvertTransformation: convert with unexpected precision

* [LPT] Disable constant folding on weights during reshape

* [LPT] new Q/DQ weigths prerequisites

* [LPT] AddTransformation (swapMultiplyAndAdd) constant precision definition workaround

Co-authored-by: Vladislav Golubev <vladislav.golubev@intel.com>
2021-02-25 16:00:19 +03:00
iliya mironov
c8450fabb5 Disabled unit test for CTCGreedyDecoder with fp16 input data (#4481) 2021-02-25 15:35:17 +03:00
Anton Dudchenko
74fe55f6d0 [IE][VPU]: Add config option to disable asynchronous DMA on device (#4421)
* [IE][VPU] Add config option to disable asynchronous DMA on device
* Parse option
* Update firmware
2021-02-25 14:48:33 +03:00
Taylor Yeonbok Lee
564be86407 [IE CLDNN] Added a new permute kernel optimized with tiling (#4424) 2021-02-25 12:54:28 +03:00
Bartosz Sledz
6c98171e23 Fix output names for group of Strided Slices to Variadic Split optimization (#4378)
* Add tests which reproduces issue

* Fix Output Names in StridedSlice optimization

* Fix codestyle

* Add check if at least one StridedSlice has Result operation as a consumer
2021-02-25 12:53:46 +03:00
iliya mironov
799f34238e Imironov/fix ctc greedy decoder pattern matcher (#4441)
* Fix puttern matcher condition

* Refactoring pattern matcher

* Update unit tests
2021-02-25 09:42:43 +03:00
Anton Pankratv
61422f97ac Moved preprocessing macro tools to separate library (#4464) 2021-02-25 07:32:48 +03:00
Andrey Somsikov
0646219f3e Translate app failures from cond comp tests (#4393) 2021-02-24 22:54:37 +03:00
Aleksandr Korolev
194de08cf3 [IE][VPU]: Remove legacy convert passes from Myriad Plugin (#4022)
* Replaced ie::NetPass::ConvertPrecision with ngraph::ConvertPrecision
* Fixed case with wrong behavior in merge_subsequent_dsr_operations.cpp
* Remove NGRAPH_RTTI from vpu/ngraph #49823
2021-02-24 22:37:45 +03:00
Andrey Dmitriev
c2f607745f [GNA] Import/Export memory layer name (#3252)
* [GNA] Added import/export names of memory layer

Added test

Added fix

[GNA] Added import/export names of memory layer

Added fix

test build

centOS fix

* Added fix version

* [GNA] Added export/import scale factor for memory layer

* [GNA] Fix comments
2021-02-24 19:05:09 +03:00
Krzysztof Bruniecki
304c31d10e [GNA] Enable Zero Padding (#4252)
* [GNA] Enable Zero Padding

   Fix CNN2D stride order
   Draft pooling

* Implement CNN2D FP32 mode in GNAPlugin

* Move padding flag to Policy

* Remove inactive output rotation code from CNN2D graph compiler routine (review)

* Add ConvReluSequence tests to gnaFuncTest as DISABLED
2021-02-24 19:03:40 +03:00
Konstantin Satunin
584185f854 Added badge for overall branch state
One badge for all checks: including GitHub actions, Azure DevOps, Jenkins
2021-02-24 18:19:01 +03:00
Konstantin Satunin
294987b235 Fixed badge for Public CI 2021-02-24 18:14:07 +03:00
Pavel Esir
162bdde251 [MO][TF] Fixed TFSliceToSlice conversion error on Win (#4367)
* [MO][TF] Fixed TFSliceToSlice conversion error on Win, replaced int32_max with ShapeOf, minor correction in comments

* review apply: added create_op_with_const_inputs

* review apply: renamed variables, updated typehints for int64_array, float_array, float32_array

* renamed to correct_ends

* returned back check_op_attrs=True
2021-02-24 16:34:43 +03:00
Victor Kuznetsov
7ba9723242 [Stress] Add precision field to MemCheck configs (#4362) 2021-02-24 14:56:09 +03:00
Tomasz Dołbniak
4d9ede42ca Floats comparison implementation in IE_Engines (#4342) 2021-02-24 12:10:00 +01:00
Evgeny Lazarev
5fa1e2140e Temporary disable telemetry (#4449) 2021-02-24 13:27:10 +03:00
Svetlana Dolinina
5ee00a989f add string constants '0'/'1' to bool normalizer (#4402)
* add string constants '0'/'1' to bool normalizer

* fix bug
2021-02-24 13:17:32 +03:00
Gladilov, Gleb
abe59efec9 [IE][VPU]: Enables Clamp for batch extraction (#4442)
Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>
2021-02-24 13:04:00 +03:00
Roman Vyunov (Intel)
a576fb6f39 [IE][VPU] Pad layer: enabling of 3D support (#4351)
* Enabling of 3D support for Pad layer
* Added tests to new test infrastructure
2021-02-24 12:14:39 +03:00
Ilya Lavrenov
ea2bbb29c5 Enabled SSE42 on ia32 by default (#4437) 2021-02-24 11:25:41 +03:00
Sergey Shlyapnikov
71c50c2249 [IE CLDNN] Fix to handle reshape on graph optimization stage (#4405) 2021-02-24 11:12:59 +03:00
Maxim Andronov
a15246e1d0 [CPU] Changed output blobs creation used output info (#3796) 2021-02-24 10:31:52 +03:00
Jade Cho
54a7ecb725 [IE CLDNN] Optimize reduce fsv16 primitive when out_x=out_y=1 (#4261) 2021-02-24 10:25:36 +03:00
Evgeny Lazarev
7420bb6cb0 Fix pad op with int input (#4438)
* Added operation ConvertLike to the MO

* Fixed transformations with Pad which insert Const with pad value of incorrect type

* Added constant folding to ConvertLike operation

* Fixed unit tests for Pad transformations to include ConverLike operations

* Update copyright year

* nGraph code style fix

* Added OV_ITT_SCOPED_TASK for ConvertLike constant folding
2021-02-24 09:56:36 +03:00
Jozef Daniecki
4d9797c1fe Fix U1 type constant comparison in compare_functions(). (#4461) 2021-02-24 09:37:36 +03:00
Ivan Tikhonov
afded195ba delete unnecessary check in validate function of TI (#4415) 2021-02-24 07:13:47 +03:00
dependabot[bot]
a6989bb047 Bump tox from 3.21.4 to 3.22.0 in /ngraph/python (#4452) 2021-02-22 17:03:23 +01:00
Konstantin Satunin
0682d773ca Unique locations for pdb files (#4446) 2021-02-22 11:41:03 +03:00
Gorokhov Dmitriy
b1549135ae [CPU] Added custom nspc <-> ncsp reorder implementation (#4377) 2021-02-21 15:14:16 +03:00
Konstantin Satunin
342ae0daa7 unique locations for pdb files (#4445) 2021-02-20 23:48:47 +03:00
Konstantin Satunin
f78240cf04 more seprated folders (#4444) 2021-02-20 21:13:22 +03:00
Elizaveta Lobanova
7d605e58e5 [GNA] Fix transposition to NHWC for models with splits and concats (#4419) 2021-02-20 18:16:11 +03:00
Konstantin Satunin
8f5453d70f Pyngraph independent locations for lib files (#4440)
* Make unique location for pyngraph lib files

* fix variable usage
2021-02-20 18:15:57 +03:00
Vladimir Zinoviev
23808f46f7 [LPT] Mixed precision (#4064) 2021-02-20 18:08:37 +03:00
Evgenya Stepyreva
2434190ae8 Review leftovers (#4274)
* Comment and type check

* test
2021-02-20 17:48:49 +03:00
Konstantin Satunin
f66607aee7 Make Python bridge independent (#4436) 2021-02-20 13:26:42 +03:00
Ilya Churaev
8397ed64f2 Enabled reduce tests (#4416) 2021-02-20 12:56:25 +03:00
Olesya Martinyuk
61f1950997 Infer tool code style patch (#4429)
* Moved input preparation to another function, cleared argparse, minor code improvements

* Minor changes in function description
2021-02-20 12:19:18 +03:00
Anna Khakimova
434a517846 * Fix for ia32 with sse42 issue. (#4433) 2021-02-20 11:52:01 +03:00
Maxim Vafin
bf6b061709 Fix MVN in MO (#4311)
* Fix MVN in MO

* Apply feedback and add test

* Remove unneeded import

* Apply review feedback

* Apply review feedback

* Fix issue with class name
2021-02-20 11:11:51 +03:00
Yegor Kruglov
7e3289cc58 added condition for removing input ports (#4396) 2021-02-20 10:26:37 +03:00
Anton Chetverikov
8c79d4134f Update Convert extender (#4409)
* Update Convert extender

* Update copyright year
2021-02-19 20:50:46 +03:00
Gorokhov Dmitriy
48144860d5 [CPU] Fixed CPU specific Interpolate test for BF16 precision (#4420) 2021-02-19 15:47:50 +03:00
Gleb Kazantaev
5d647e6fab Add IE Python Dependency To MO (#4151)
* Added script that check IE existance

* Updated install_prerequisites.sh to check and insall IE python dependency

* Execute MOC transformation pipeline in subprocess

* Updated path to offline_transformations.py

* Updated IE dependency search; added libs search support

* Updated install_prerequisites.bat to check IE dependency

* Print warning if MO and IE versions do not match

* Set env before subprocess run

* Add mean and meta info to serialized IR

* Fix pylin import issue

* Update BOM file; added intel headers

* use default serialization; code style fix

* Codestyle

* Added subprocess timeout

* Check e2e status

* Update install_prerequisites.sh logic

* Update MO version to be generated even without cmake execution

* Update install_prereq to extract release version from python

* Simplify pyhton code

* Reduce memory consumtion to its original value

* Added OV find and search logic for windows batch script

* Remove model reading to avoid excess memory consumtption

* IMproved logging messages; simplified code

* Improved warnign message incase when MO and IE versions mismatch

* Fix test import

* Check IE bindings in the beginnig of MO pipeline

* Changed warning message; added RelWithDebInfo path

* Recomendation to build IE from source

* Resolve PR comments

* Apply review comments; Added CheckAPI pass

* Added path to IE local libs

* ModelOptimizer -> Model Optimizer (+IE)

* OpenVINO -> OpenVINO (TM) Toolkit

* Updated install_prerequisites.bat with new logic

* Move offline_transformations.py to back folder; improve warning mesages experience

* Update install_prerequisites.bat

* Move back some unnecessary changes

* Fix BOM

* Disable import errors for pylint

* Fixed grammar in messages

* pylint disable import error

* Final grammar fixes in bat and sh files
2021-02-19 14:13:20 +03:00
Vladimir Paramuzov
a5aaa07721 [IE CLDNN] OpenCL headers update (#4345)
* [IE CLDNN] OpenCL headers update

* Add Win64 Release OpenCL.lib

* Update Windows ICD *.lib

* [IE CLDNN] Linux and Android libraries

* Update ICD for linux

* Update android ICD

* va.h stub

* Add ICD loader revision

* USM fix

* fixed ambiguous calls

* Updated licence files

* try fix centos

* fix x64 debug icd lib

Co-authored-by: Andrey Babushkin <andrey.babushkin@intel.com>
2021-02-19 13:19:45 +03:00
Roman Lyamin
01535161a6 [IE CLDNN] Added MVN-6 operation (#4190) 2021-02-19 12:24:52 +03:00
Pavel Esir
7dca134031 [MO] [TF] Added TF broadcast_to extractor (#4376)
* Added TF broadcast_to extractor

* updated Supported_Frameworks_Layers.md

* corrected name

* corrected op name in Supported_Frameworks_Layers.md

* added a space after BroadcastTo in Supported_Frameworks_Layers.md
2021-02-19 11:44:11 +03:00
Andrew Bakalin
a1f8fe3696 [VPU] Use nGraph value propagation in VPU private ops (#4291)
* [VPU] Update StaticShapeBroadcast

* [VPU] Update StaticShapeLoop

* [VPU] Update StaticShapeReshape

* [VPU] Update StaticShapeTopK

* [VPU] Get rid of evaluateTargetShape

* [VPU] Invalidate values before DTS

* [VPU] Update TopK tests

* [VPU] Review fixes

* [VPU] Review fixes
2021-02-19 11:23:18 +03:00
Vladimir Gavrilov
2b732ec1d7 Incorrect type of 'scales' input of the operation Interpolate-4 in some cases (#4375)
* Commit.

* Fixed element type of scales input in the MO transformation UpsampleToResample.

* Fixes in the transformation TFSliceToSliceReplacer.

* Fixes in tests.

* Small fixes.

* Reverted fixes in TFSliceToSliceReplacer.

* Small fix.

* Added tests for fractional scales in the transformation UpsampleToResample.
2021-02-19 10:52:41 +03:00
Maksim Shabunin
9559f6f301 Changed ngraph header to fix client build with VS2015 (#4386) 2021-02-19 10:19:52 +03:00
Gorokhov Dmitriy
bd431b2565 [CPU] [WA] Enforce linear_onnx mode in Intepolate node to avoid perf regressions (#4395)
- Fixed incorrect Interpolate fusing behavior for unsupported configurations
2021-02-19 10:13:35 +03:00
Maxim Andronov
f26c82bde3 [CPU] Supporting constant networks (#4379) 2021-02-19 09:38:20 +03:00
Alexey Varyzgin
4e9edd9128 [CPU] [BF16] Switched to Greedy Mode (#4236) 2021-02-19 09:36:49 +03:00
Liubov Batanina
ffe99fb66f Fixed Interpolate headers (#4403) 2021-02-19 08:39:19 +03:00
Ilya Churaev
e337fb0661 Fixed backward incompatible change (#4303)
* Fixed backward incompatible change

* Fixed ngraph unit tests
2021-02-19 08:37:18 +03:00
Bartosz Lesniewski
f90ed75db8 Fix comparison of constant with float NAN values (#4369)
* check bitwise equality before using the threshold method

* use std functions to check float class instead of reinterpret casting

* add unit test with nan f32 const value
2021-02-19 07:13:10 +03:00
Olesya Martinyuk
0c22a9e111 Add infer tool for cond compilation test(#4384) 2021-02-18 21:38:52 +03:00
Ilya Churaev
b4221948d2 Fixed undeclared identifier SWITCH_MKLDNNPlugin (#4391) 2021-02-18 19:18:19 +03:00
Ilya Churaev
317886a5d5 Revert redundant changes (PR:4262) (#4399)
* Revert "Add MVN fusion transformation (#4262)"

This reverts commit 1bfe79cf48.

* Revert back some changes
2021-02-18 19:02:56 +03:00
Andrey Dmitriev
f38666ac19 [GNA][SPEECH SAMPLE] Fix problem with calculate bitesize output frame (#4122) 2021-02-18 18:31:40 +03:00
Vladimir Paramuzov
c001e54403 [IE CLDNN] Added WA for interpolate mode (#4382) 2021-02-18 14:24:00 +03:00
Szymon Irzabek
2051fe2614 Allow enabling cpplint on Windows, fix Windows style after check (#4380) 2021-02-18 14:20:10 +03:00
azhogov
312dfbe78e Revert running MklDnnFunctionalTests via IB 2021-02-18 14:05:29 +03:00
Elizaveta Lobanova
c75c680e1c [GNA] Documentation update for 1D convolution and concat/split layers (#4249) 2021-02-18 12:49:50 +03:00
Alexander Zhogov
eb775a3833 Test IncrediBuild with OpenVINO tests (#2534)
* Test IncrediBuild with OpenVINO tests

* Fix

* Remove --gtest_print_time=1

* Move Stop IncrediBuild

* Add analyze_gtest_log.py

* fix

* Fix

* Fix

* fix

* Fix

* Fix

* CPU FuncTests Analyze IB

* Fix

* Remove unused pipelines

* Revert "Remove unused pipelines"

This reverts commit d99cdcf597.

* Update to master

* Exclude one test

* Enable test again

* Set testlevel 40 (was 128)

* Try gtest-parallel and /testlevel=24

* Fix issue

* Set /testlevel=8

* Set /testlevel=16

* Final fix
2021-02-18 12:21:33 +03:00
Nikolay Shchegolev
a5fce440e1 [CPU] Double registration of MVN6 decomposition. (#4388) 2021-02-18 11:11:02 +03:00
Jozef Daniecki
9d28767b72 BinaryConvolution specification review. (#4093)
* BinaryConvolution specification refactoring.

* Aligh tensor types to current CPU implementation.

* Remove !D & 3D case becuase CPU plugin supports only 2D case.

* Add pad_value to the example.

* Add  computation algorithm for mode 'xnor-popcount'.

* Computation formula refactoring.

* Fix typo in the description.
2021-02-18 10:38:34 +03:00
Anton Chetverikov
2c4afd8cd4 Tensor names support in MO IR Reader (#4194)
* Added attributes save modes

* Added tensor names to IR

* Reformat code

* Add support for tensor names in MO IR Reader

* Unit tests and code refactoring

* Fixed error

* Code refactoring

* Code refactoring

* Code refactoring

* Error fixed

* Error fixed

* Bug fixed

* Bug fixed

* Additional unit tests and comments

* Small update

* Update fake infer function

* Update names restoring

* optimize imports

* Add support for old-style constants and for commas in reader

* Added dest mode in Fuse Mul

* Update default values

* Fix missed debug info in some specific cases

* Fix a lot of issues with missedand wrong names provoding

* Resolve review comments

* Update test IR's

* Refactor and simplify code

* More simplification

* Remove unneccessary changes

* model-optimizer/mo/utils/ir_reader/layer_to_class_test.py

* Add separate tests for names restoring

* Update copyright year

* Apply review comments

Co-authored-by: Anastasia Popova <anastasia.popova@intel.com>
2021-02-18 10:38:04 +03:00
Maxim Vafin
1bfe79cf48 Add MVN fusion transformation (#4262)
* Add MVN fusion transformation

* Apply suggestions from code review

Co-authored-by: Gleb Kazantaev <gleb.nnstu@gmail.com>

* Apply review feedback

* Fix build

* Apply review feedback

Co-authored-by: Gleb Kazantaev <gleb.nnstu@gmail.com>
2021-02-18 06:36:32 +03:00
Michał Karzyński
ec9b5894fb [ONNX] Add support for BitShift operator (#4368) 2021-02-17 16:39:27 +01:00
Vladimir Paramuzov
45ae389842 [IE CLDNN] Fixed layout optimizer (#4325) 2021-02-17 18:25:16 +03:00
Andrew Bakalin
695d2a90ba [IE][VPU]: Fix injection in dynamic case (#4343)
* Redirect StageDependencies from injected stage to the parent of the injection.
* Change StageDependencyEdge to be Stage<->Stage connection. In fact, it affects only stages order, so it would be more natural (also more convenient) to represent it so.
* Add injectedStageDependencies to InjectionEdge to be able to distinguish those dependencies that were added to hwStage during the injection process and make the revertion correct.
2021-02-17 17:39:07 +03:00
Katarzyna Mitrus
7df5a98dde [ONNX] Update warning message for ONNX Constant node (#4355) 2021-02-17 14:40:47 +01:00
Evgeny Lazarev
f1d86b1455 Added comment to the TopK describing output order of equal elements (#4381)
* Added comment to the TopK describing output order of equal elements

* Fixed typo
2021-02-17 15:53:36 +03:00
Daniel
563425ce41 add Linux Mint 20.1 (X86_64) support (#4308)
* add Linux Mint 20.1 (X86_64) support

* update patch
2021-02-17 15:42:17 +03:00
Ilya Lavrenov
dd79dd755c CC: fixed issue with rebuild when only CC header is changed (#4370)
* CC: fixed issue with rebuild when only CC header is changed

* Updated submodule as well
2021-02-17 15:41:54 +03:00
iliya mironov
f670b7cb3a Add CTCGreedyDecoder mo support (#4009)
* Add CTCGreedyDecoder mo support

* Update copiright

* Update bom file

* Add transformation

* Fix code style

* Fix according to review

* Add CTCGreedyDecoder v6 to ConvertPrecision

* Hot fix

* Add replasment for ctc_greedy_decoder

* Fix test

* Fix

* Update ie transform

* Draft ctc lost replaser

* Add ctcloss replaser

* Update

* Refactoring code

* Update transformation

* Update decoder

* Remove comments

* Convert seq mask from int to float

* Fix unit test

* Add dynamic tests

* Refactoring code

* Fix py code style

* update style

* Disable ctcgreedydecoder transform for mkldnn plugin

* Add some comments

* Add transfor code comments

* Enable transform from differend plagins

* Fix mo

* fix tests

* Fix comment

* Fix convert precition

* Update comment

* Fix prcition

* Refactoring according to reviw

* Add ir reder extender

* Rename transformation

* Update bom file

* Fix mo replacer

* Fix tests

* Move transform to decomp

* Add check blank_index

* Rafactoring ctcloss

* Change dinemic rank check

* Fix ctclos extractor

* Remove comment

* Fix code style

* Refactoring pattern matcher for transformation CTCGreedyDecoder

* Disavle transform for vpu

* Refactoring according to review

* Refactoring code

* Disable transformation for cldnn

* Remove unused code

* Reverse transfomation

* Fix code style

* Hot fix transform

* Fix unit tests

* Update transform

* Enable transform in common pipline

* Fix names replasments for mo transformations

* Hot fix

* Fix
2021-02-17 14:38:51 +03:00
Ilya Lavrenov
edbb802e55 Removed some legacy code (#4371) 2021-02-17 13:57:14 +03:00
Evgeny Lazarev
2f9e215f7d Changed check for dimension size to be non-negative (#4328)
* Changed check for dimension size to be non-negative

* Added unit test for reading model with ShapeOf from scalar and fixed IE IR parser

* Added comment to the test

* Fixed ShapeOfFromScalar test

* Fixed incorrect merge

* Added test for a negative value of "dim" in IR
2021-02-17 12:19:44 +03:00
Vladimir Gavrilov
3b2506989e Fixed performance drop for Interpolate-4 (#4354)
* Commit.

* Reverted fix in the nGraph conversion of Intepolate-1 into Interpolate-4.

* Small fix.

* Added comment.

* Added TODO.
2021-02-17 10:58:08 +03:00
Maksim Kutakov
24aeb16fd1 [CPU BF16] OneHot layer extended with bf16 support. (#4171) 2021-02-17 10:52:23 +03:00
Michał Karzyński
66634a9939 Update ONNX compliance test list (#4360)
* Update ONNX compliance test list

* Update test_backend.py
2021-02-17 07:40:47 +03:00
Evgeny Lazarev
f8f60b2d83 Stick requirement version of astroid to be 2.4.2. Also fixed pylint issue with astroid==2.5 (#4365) 2021-02-16 21:34:51 +03:00
Polina Mishanina
d383bc0d83 Add try-except (#4357) 2021-02-16 19:47:38 +03:00
Yanglei Zou
d9140a0f83 Fix some bugs for ROI Align (#4212) 2021-02-16 18:25:13 +03:00
Irina Efode
36799dce86 [IE TESTS] Add Opset6 to the report (#4348) 2021-02-16 18:17:13 +03:00
Vladislav Golubev
8a4aa1bafa [LPT] StridedSliceTransformation accuracy degradation fix (#4300)
* [LPT] StridedSliceTransformation fix

* added comments
2021-02-16 16:41:37 +03:00
Tomasz Jankowski
5e17926604 [ONNX Editor] Add initializers for model inputs (#4025) 2021-02-16 14:12:27 +01:00
Andrew Bakalin
0a36e4e810 [VPU] Change data structure in processTrivialCases method (#4250)
* [VPU] Fix PR #4060

* [VPU] Review fixes
2021-02-16 14:39:56 +03:00
Tomasz Socha
185aaacc07 [ONNX] Add support for Softmax v11 in opset 7 models (#4340) 2021-02-16 11:58:39 +01:00
Mateusz Bencer
cc645d50e4 Resolve Klocwork issues (#4341) 2021-02-16 11:55:28 +01:00
Jan Iwaszkiewicz
a3af43c8e4 [ONNX] Minimum op xfail updated (#4332) 2021-02-16 11:43:07 +01:00
Katarzyna Mitrus
a980bc9bd9 Spec update (#4353) 2021-02-16 13:18:40 +03:00
Patryk Elszkowski
e1d983a12e XmlDeserializer - move to src file (#4347)
Co-authored-by: Patryk Elszkowski <patryk.elszkowki@intel.com>
2021-02-16 13:15:41 +03:00
Ilya Lavrenov
01b499b334 Hidden visibility for ONNX (#4233) 2021-02-16 13:06:41 +03:00
Andrey Sokolov
8278e3960f [IE][VPU]: support GatherElements* (Gather + GatherElements) (#4220)
Support (Gather+GatherElements) optimization for GatherElements layer.
Includes PR: #4140
2021-02-16 12:59:13 +03:00
Pavel Esir
22169a05b9 [MO] StridedSlice improvements (#4139)
* fix ss

* successfully converted

* successfully run moved infer and normalizer unit-tests

* successfully rewritten StridedSlice infer unittests

* int64 array

* Successfully converter crash-when-loading, xj_feauture and toy nets (cherry-picked maxpoolV4 and tf_broadcast_ext)

* successfully moved PermuteAttrs to general mechanism

* successfully converted xj_feauture and crash when loading with the new rewritten SS infer

* fixed get_shape_from_slice and moved to common utils

* fixed extending masks and some other

* some refactoring

* fixed extending masks in extractor, fixed licence year and some other code clearing

* corrected a couple of unittests

* fox permute for 5 rank slice and 4 rank inputs/

* WIP

* Added comments

* fixed StridedSlice in ProposalMutation.py

* rechecked shape_infer unittests added some new cases

* added shape_infer unit-tests after StridedSliceNormalizer pass and Permute unit-tests

* corrected unittests

* Applied review comments

* general permutations for inputs implemented, corrected ellipsis unrolling when shrink_axis is at the beginning, some other corrections

* removed code duplication in infer and normalizer, moved 'slices' attr normalizing to StridedSliceNormalizer.py

* removed some code duplication and other minor improvements

* Added tests

* minor corrections

* wider range of unittests added (froze the number)

* review comments applied

* enabled skipped unit-test

* comment corrections

* applied review comments: changed op -> type, added some asserts, corrected comments and other minor corrections

* sorted inputs, updated Supported_Frameworks_Layers.md, some minor
2021-02-16 11:48:49 +03:00
Andrei Kochin
d2548ddb60 [Docs] Add opset6 content and add opset reference (#4338)
* [Docs] Add opset6 content and add opset reference

Delta to opset5:
 * CTCGreedyDecoderSeqLen
 * GatherElements
 * MVN-1 -> MVN-6

* Update opset6.md

* adding ie_docs.xml based on @lazarevevgeny comment
2021-02-16 10:24:58 +03:00
Maksim Kutakov
274a70bd14 [CPU BF16] BF16 support was added to the SoftMax primitive. (#4279) 2021-02-16 09:41:21 +03:00
Mingyu Kim
75eca09abd [IE CLDNN] Yolo v4 bugfix from some model (#4260)
* Winograd conv seems to cause slight error
* Enable fsv16 path in case where RegionYolo exists
* Prefer bfyx from RegionYolo primitive
2021-02-16 09:08:15 +03:00
Vladimir Paramuzov
ad21c6d3a4 [IE CLDNN] Fixed dynamic batch for 2D layout (#3992) 2021-02-16 08:43:31 +03:00
Mingyu Kim
e22d946a56 Typo for cross-check tool (#4350) 2021-02-16 07:08:54 +03:00
Patryk Elszkowski
a73e997480 Refactoring FunctionsComparator - extract node comparison part (#4175)
* Refactoring FunctionsComparator - extract node comparison part

* try to fix logic and CentOS bulids

* Add negative test for precision

* Use fixed ngraph::descriptor::Tensor type instead template type

* reorganize ngraph_test_utils.cpp

* Cleanup after merge master into branch

Co-authored-by: Patryk Elszkowski <patryk.elszkowki@intel.com>
2021-02-16 07:04:19 +03:00
Elizaveta Gerashchenko
769bb77095 [IE CLDNN] ITT cldnn part (#4253) 2021-02-15 21:35:54 +03:00
Andrey Sazonov
a558a6f143 Fix GetConfig doc (#4333) 2021-02-15 21:13:34 +03:00
Michał Karzyński
ccc1a9f357 Rename dunder methods (#4334) 2021-02-15 18:34:21 +01:00
Ilya Churaev
c52c4916be Added a template for PRs (#4313) 2021-02-15 15:18:29 +03:00
Andrey Dmitriev
5866f713d9 [GNA] Added test for backward compatibility (#4315) 2021-02-15 14:46:56 +03:00
dependabot[bot]
01e4606bd0 Bump tox from 3.21.2 to 3.21.4 in /ngraph/python (#4227) 2021-02-15 11:55:33 +01:00
Ivan Novoselov
9e87ddfc55 Ngraph reference implementation: OneHot specifications review. (#4243)
* Reformulated, intermediate. No positive indices.

* Indices >= 0, depth > 0.

* Added the Types section and a more complicated example.

* Behavior for negative indices is undefined

* Wrap T1 & T2 with *

* Revert mkl-dnn to cae1e0b83

* T1: int32 or int64 only
2021-02-15 13:47:46 +03:00
Katarzyna Mitrus
30c52dce35 [SPEC] DeformablePSROIPooling specification update (#4282)
* DeformablePSROIPooling spec update

* Typo update

* Description update

* xml identation

* Review changes
2021-02-15 13:45:43 +03:00
Mateusz Bencer
d821ec47ce [ONNX] Handle optional outputs for Dropout and MaxPool (#4143) 2021-02-15 11:14:20 +01:00
Andrey Somsikov
4f79d9ccfc Force test use bash for setupvars.sh (#4321)
setupvars.sh is incomatible with sh shell.
2021-02-15 13:07:17 +03:00
Bartosz Sledz
01aaaf1138 Add support for custom ONNX operator PriorBoxClustered (#4202) 2021-02-15 10:31:30 +01:00
Katarzyna Mitrus
ead6427097 ONNX RNN/GRU enable dynamic input shape (#4241) 2021-02-15 10:30:46 +01:00
Tomasz Jankowski
b800f08c0c [ONNX] Remove linking libonnx from unit-test (#4298)
* Remove linking libonnx from unit-test

* Consider all flavors of protobuf libraries

* Avoid passing on NOTFOUND properties

* Set system deps for mac

* Revert include dirs set up
2021-02-15 07:35:03 +03:00
Bartosz Lesniewski
7c8b8e5dda Fix comparison of constant with short float NAN values (#4299)
* fix comparison of constant with short float NAN values

* adjust precision, remove elvises

* more templates

* add ir serialization  test with float16 const

* remove unused prototxt
2021-02-15 07:22:19 +03:00
Vladimir Paramuzov
51a7d7b799 [IE CLDNN] Fixed CTCGreedyDecoderSeqLenLayerTest gpu instances (#4326) 2021-02-14 21:30:04 +03:00
Marina Kolpakova
434e66d7fb [CPU] Refactors jitters for nGraph interop (#4255) 2021-02-14 15:40:34 +03:00
Roman Lyamin
d406a5af50 [IE CLDNN] Added CTCGreedyDecoderSeqLen operation (#4119) 2021-02-14 11:03:25 +03:00
Evgeny Lazarev
3f5ff2cfe5 Remove generic ie op (#4213)
* Removed legacy IE shape infer

* Removed GenericIE operation

* Removed legacy shape infer tests

* Removed legacy test with legacy IE reshape

* Fixed compilation issues related to removal of GenericIE

* Fixed one more compilation issue with clDNN

* Fixed test for reading experimental ops

* Updated tests and make IR Reader to load old experimenal and extension ops as opset6

* Change opset of some ops only if they are currently experimental/extension to avoid situation like opset1::Proposal -> opset6::Proposal

* Removed more legacy code

* Returned back code removed by mistake

* Fixed issues related to incorrect merge with master

* Merge fixes

* Fixed unit tests which starts to fail because now loading the model with unknown operation is failed earlier

* Removed incorrectly added code

Co-authored-by: Evgeny Lazarev <elazarev.nnov@gmail.com>
2021-02-13 21:15:46 +03:00
Alexander Zhogov
0442184d0d Azure CI: Disable IB stop 2021-02-13 09:07:41 +03:00
Yasunori Shimura
15d6a0ff48 DPC++ link error workaround. (#4192)
* DPC++ link error workaround.

OpenVINO C++ program failed to link when DPC++ compiler is used.
'make_shared_blob' causes 'unresolved external symbol' error on linking.
Commented out some __clang__ specific directives to workaround the issue in "ie_blob.h".

* DPC++ compatibility issue fix #2

1. Removed type-by-type template class definition for __clang__.
2. Modified TBlob() destructor. The 'unresolved reference' error occur again if I left 'virtual ~TBlob();' only. It seems it needs to be 'virtual ~TBlob() {};'.

* DPC++ compatibility fix #3 - Add DPC++ conditional code

Uses '__SYCL_COMPILER_VERSION' predefined macro to check if the compiler is a DPC++ or not.
Added conditional directive to switch code based of the detected compiler.
NOTE: User program must include <CL/sycl.hpp>, or the '__SYCL_COMPILER_VERSION' macro won't be defined and this fix won't take effect.

* DPC++ compatibility issue fix #4

Changed from #ifdef to #if + logical formulas.

* DPC++ compatibility issue fix #5

Added compiler check logic in src/ie_rtti.cpp

* DPC++ Compatibility issue #6 - ie_parameter.cpp

Added compiler check macro for DPC++ to ie_parameter.cpp as well.

Co-authored-by: Yasunori Shimura <yasunori.shimura@intel.com>
2021-02-13 08:44:25 +03:00
Anastasia Popova
eeb7835128 Result rename operation (#4242)
* Added result rename operation

* Optimize imports

* Added ResultRename to package_BOM

* ResultRename moved to the end of back phase, code refactoring

* Revert incorrect changes

* Optimize imports

* Added comments and optimized imports.
2021-02-12 22:44:21 +03:00
Alexander Zhogov
2bf0e88b30 Azure CI: Enable IB initiators as helpers 2021-02-12 21:49:22 +03:00
Maksim Doronin
fff10ea93a [IE][VPU]: Check memory capacity after finding the corresponding device (#4314)
This issue relates to multi-device mode.
While we are trying to allocate a graph on one of the devices we should check memory capacity only for the corresponding device, not for the last opened as far devices may have different memory capacity or the latest opened device may have still not sent its attributes (including memory capacity)
2021-02-12 18:00:15 +03:00
Maksim Kutakov
7454aa2d1a [CPU] MKLDNN NCHW pooling primitive performance fix. (#4235) 2021-02-12 17:44:57 +03:00
Artyom Anokhov
ef147905f1 [OpenVINO Scripts] Updated with RHEL8 (#4296)
* Updated install_NEO_OCL_driver.sh & install_openvino_dependencies.sh with rhel8 case

* install_NEO_OCL_driver: Fixed conditional

* script: Updated with actual revisions
2021-02-12 16:38:20 +03:00
Elizaveta Lobanova
f4c071f635 [GNA] Support 1d tensors (#4270) 2021-02-12 16:26:10 +03:00
Patryk Elszkowski
3dbecf01fc Fix TI deserialization (#4285)
* XmlDeserializer relay on parameter/result (input/output) index which is reported during inserting to function

Xml parameter/result order is irrelevant now.

* drop stack usage - just single class member

* try to fix CentOS build

* fix after review

* Drop std::map to custom structure

* reorder layers in TI in test IR which failed on current master

Co-authored-by: Patryk Elszkowski <patryk.elszkowki@intel.com>
2021-02-12 16:04:25 +03:00
Daria Mityagina
deaf1f9d93 [IE][nGraph]: Fix - Accuracy deviation on deeplabv3 (#4294) 2021-02-12 15:59:29 +03:00
Ivan Novoselov
45c8898321 [IE TESTS] Add OneHot SLT (#4059) 2021-02-12 14:53:08 +03:00
Evgeny Lazarev
bdc0dcfcf5 Fixed bom file and updated unit test (#4309) 2021-02-12 14:47:18 +03:00
Kate Generalova
1d4a3b1f34 doc: remove CentOS minor version from Docker (#4307) 2021-02-12 14:28:43 +03:00
Vladislav Golubev
06145e20fc [LPT] MatMulTransformation: support Quantize/Dequantize on weights (#4206)
* [LPT] NetworkHelper::isConstantPath functional tests

* [LPT] matMul 3D: support Q/DQ on weights
2021-02-12 13:02:07 +03:00
Piotr Rozen
3f6dbb8a00 [GNA] 4D StridedSlice, Clamp, InsertIdentityLayerPass, SubstituteScaleShiftBroadCastPass fixes (#4061)
* fixed: StrideSlice/Crop was broken when crop axis != dim.size() - 1 & added support for tensor dim > 2
fixed: clamp had hard coded upper & lower boundary to -50/50
fixed: InsertIdentityLayerPass was adding not necessary identities that was leading to exception when 2 identities was added to convolution output
fixed: SubstituteScaleShiftBroadCastPass caused invalid input tensor dimension overwrite - instead of overwrite currently reshape is injected

* updated copyright header dates

* updated copyright date

* fixed braces not at the end of line

* fixed braces in if else sequence

* shortened line length

* fixed issues reported in review

* fixed test - model in test assumed clamped range <-5,5> however code had hard coded value <-50,50>, which test assumed as correct result

* fixed smoke_MemoryEltwiseReshapeConcatTest/MemoryEltwiseReshapeConcatTest

* [GNA] Added test for crop 4d

Co-authored-by: Andrey Dmitriev <andrey.dmitriev@intel.com>
2021-02-12 12:27:00 +03:00
Maxim Kurin
f29da36b1b [IE][VPU][TESTS]: CTCGreedyDecoderSeqLen myriad test & fixes (#4177)
* Implements test for CTCGreedyDecoderSeqLen layer in Myriad plugin.
* Changes the way CTCSeqLen operation is generated. Moved random generation of SeqLen input from makeCTC function to the test. Made test to clamp test's parameters to be in valid range.
2021-02-12 11:50:26 +03:00
Ilya Lavrenov
5fe882e550 CVS-48367: Enable HoldersTestOnImportedNetwork test on GNA (#4230) 2021-02-12 11:45:51 +03:00
Patryk Elszkowski
0e4650399c ref_impl - Concat: buffer calculation of shape sizes (#4240)
* ref_impl - Concat: buffer calculation of shape sizes

* Update ngraph/core/reference/src/runtime/reference/concat.cpp

Co-authored-by: Gleb Kazantaev <gleb.nnstu@gmail.com>

Co-authored-by: Patryk Elszkowski <patryk.elszkowki@intel.com>
Co-authored-by: Gleb Kazantaev <gleb.nnstu@gmail.com>
2021-02-12 08:14:18 +03:00
Maxim Vafin
d91b9fd8da Fix backward compatibility of MVN in MO (#4289) 2021-02-11 22:36:31 +03:00
iliya mironov
3db73ec552 Update mobilenetv3 doc support (#4256)
* Update mobilenetv3 doc support

* Fix doc layout
2021-02-11 22:33:36 +03:00
Nikolay Tyukaev
5c6970b6e5 update layouts (#4301)
Co-authored-by: Nikolay Tyukaev <ntyukaev_lo@jenkins.inn.intel.com>
2021-02-11 21:30:52 +03:00
Andrey Somsikov
9d57d4f52c Fix cond comp environment setup (#4290)
source command may not be available in sh.
2021-02-11 21:29:46 +03:00
Rafal Blaczkowski
3eb0b5c90d Add visible export (#4222)
Co-authored-by: Alexander Zhogov <alexander.zhogov@intel.com>
2021-02-11 19:02:58 +03:00
Jan Iwaszkiewicz
7ff8f8eba4 WA for GCC 7.5 pybind warning (#4277)
* WA for GCC 7.5 pybind warning

* Move compiler flag to ngraph/python
2021-02-11 18:41:23 +03:00
Maksim Makridin
f8d36c55a8 Fixes for Object Detection SSD samples docs (C++ and Python) (#4286)
* Fixes for Object Detection SSD samples docs (C++ and Python)

* fixes from code review

* Fixes for Object Detection SSD samples docs (C++ and Python)

* fixes from code review

* fixes from code review
2021-02-11 17:51:53 +03:00
Evgenya Stepyreva
08ac8d9af9 Reverse input channels fusion (#4276)
* Side fix found while working on Windows machine.

* Fix for non-fused Reverse Input Channels subgraph
2021-02-11 14:27:08 +03:00
Nadezhda Ageeva
4e3d7d23fc Adds support of user layouts to benchmark_app (#4002)
* Adds support of user layouts to benchmark_app

* Keep snake_case for python

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
2021-02-11 12:57:05 +03:00
Ilya Lavrenov
2a2ef7d989 Removed ngraph-specific variable with flags (#4232) 2021-02-11 12:14:14 +03:00
Victor Kuznetsov
1da8f65b45 Add removing of statistics file in time_tests (#4275) 2021-02-11 12:02:39 +03:00
Evgenya Stepyreva
851d090117 Dynamism leftovers (#4165)
* SubGraphOp shape inference and cloning fixed. WAs deleted

* Fix naming in OneHot->IE transformation

* Check for number of incomming/outcommit HostTensors and check for nullptrs in evaluates and bound evaluators

* move validate_host_tensor_vector into ngraph namespace

* RT propagation

* style
2021-02-11 11:37:44 +03:00
Andrew Bakalin
51b62921e8 [VPU] Fix PR #4140 (#4251) 2021-02-11 10:57:50 +03:00
Andrey Somsikov
8da7f22f1d Activate OV environment from cond comp test_infer (#4244) 2021-02-11 09:59:37 +03:00
Roman Vyunov (Intel)
b7212b9f34 [IE][VPU]: MVN-6 native partial support (#4238)
* Adding of partial support of MVN-6 operation to VPU Plugin (support restricted by MVN-1 interface)
* Disabling of MVN-6 decomposition for VPU Plugin
* Enabling of test cases for this operation
* Disabling of deprecated MVN tests while investigation is go on
2021-02-10 21:31:13 +03:00
Alexander Zhogov
7f60c3f82d Actions CI: Remove unused requirements 2021-02-10 19:44:45 +03:00
azhogov
a0db6bc660 Azure CI: Set max timeout for Mac 2021-02-10 18:15:51 +03:00
iliya mironov
0341edcfa0 Update mxnet version (#4081) 2021-02-10 17:19:06 +03:00
Evgenya Stepyreva
a313c0c3ee Dequantize (Sub, Mul) to FakeQuantize (#4189)
* Dequantize (Sub, Mul) to FakeQuantize

* disable for CPU/GPU
2021-02-10 17:08:11 +03:00
Ilya Churaev
a327b72481 Removed redundant memcpy calls. Share weights from original blob (#4259)
* Removed redundant calls of memcpy. Share weights from original blob

* Fixed nGraph tests
2021-02-10 16:39:15 +03:00
Jan Iwaszkiewicz
63f3a5d99c Change class member init (#4266) 2021-02-10 14:13:16 +01:00
Jan Iwaszkiewicz
7af2959bd0 [ONNX] Convert to integral type in OneHot op (#4229)
Co-authored-by: Tomasz Dołbniak <tomasz.dolbniak@intel.com>
2021-02-10 14:03:54 +01:00
Gabriele Galiero Casay
73e29c61d8 Refactor GroupConvolutionBackpropData to inherit from Op (#4226)
* Refactor GroupConvolutionBackpropData to inherit from Op

* Remove nGraph suppress deprecated macros
2021-02-10 14:41:21 +03:00
Evgeny Latkin
44c05a71c9 [IE][VPU]: ConvND: fix errmsg of groups > 1 (#4199)
Fix error message if attempting grouped 3D convolution (groups > 1 is not supported for 3D conv)
2021-02-10 12:24:10 +03:00
Jozef Daniecki
4a7c81e09b Add opset6 to serialization. (#4247)
* Add opset6 to serialization.

* Add MVN Serialization SLT.
2021-02-10 12:04:37 +03:00
Evgeny Lazarev
66f4c69b90 Telemetry sender and MO instrumentation (#3804)
* Draft implementation of the telemetry sender utility

* Examples of sending telemetry from the MO

* More statistic about the model.

* Intentional broken file to fail Mask-RCNN ONNX model conversion

* Added joined list of ops used

* Added requests to the requrements file and update BOM to include necessary files related to telemetry

* Send telemetry alwasys

* Refactored usage of GUID usage in the telemetry

* Enabled sending telemetry always

* Simplified function "TelemetryBackend.send"

* Use other approach to send information about session to GA

* Added automatic registration of the telemetry backends and allow to choose it during the telemetry class instantiation

* Added "requests" as a requirement. Wrapped usage of requests module to not crash the app

* Added timeout for sending data to GA. Increased the queue size to 1000

* Finalize Telemetry class implementation

* Do not fail MO if non-critical component is not installed and updated Telemetry GA with the default property

* Added sending version to a separate event

* Use default TID to send the data

* Set lower bound for the requests module which does not contain vulnerabilities

Co-authored-by: Evgeny Lazarev <elazarev.nnov@gmail.com>
2021-02-10 10:51:31 +03:00
Victor Kuznetsov
73f846648c change tempfile usage (#4245) 2021-02-10 10:23:31 +03:00
azhogov
c508a8d035 Azure CI: Increase timeout for Mac to 300 min 2021-02-10 09:31:43 +03:00
Vitaliy Urusovskij
ba5da4231f Remove use of -f key which isn't defined in openvino/**/sea_runtool.py (#4257) 2021-02-10 08:53:11 +03:00
Evgeny Lazarev
48aa1c35b3 Removed legacy IE shape infer (#4211)
* Removed legacy IE shape infer

* Removed legacy shape infer tests

* Updated tests and make IR Reader to load old experimenal and extension ops as opset6

* Change opset of some ops only if they are currently experimental/extension to avoid situation like opset1::Proposal -> opset6::Proposal

Co-authored-by: Evgeny Lazarev <elazarev.nnov@gmail.com>
2021-02-10 07:55:48 +03:00
Maxim Kurin
929fa26e2e [TESTS] Behavior test check input layout propagation (#4239) 2021-02-10 01:12:18 +03:00
Bartek Szmelczynski
78c045b7ae Remove ops from Node Converter- part 2 (#4181)
* remove NodeConverter for Interpolate and ScaleShiftIE

* add SpecificCreators for Interpolate and ScaleShiftIE

* add commented lines to check if tests will pass

* remove comments to check if tests will pass

* checking if tests are avaiable for ResampleV2

* remove NodeConvertor for ExecutionNode

* remove nodeCovnertor for ResampleV2 and add SLT for serialization

* remove shufflechannels op from node converter

* enable visitor api for resamplev2

* remove nodeconverter class

* add missing newline

* remove interpolate sslt- sporadic fails

* remove unnecessary interpolate specific creator

* Add interpolate specific creator

Co-authored-by: blesniewski <bartosz.lesniewski@intel.com>
2021-02-09 22:13:08 +03:00
Ilya Churaev
91f05008db Remove v0 multiply (#4221)
* Remove v0 multiply

* Fixed code style
2021-02-09 22:09:44 +03:00
Andrey Zaytsev
8da9d17059 Feature/azaytsev/compile tool doc updates (#4237)
* Added info on DockerHub CI Framework

* Feature/azaytsev/change layout (#3295)

* Changes according to feedback comments

* Replaced @ref's with html links

* Fixed links, added a title page for installing from repos and images, fixed formatting issues

* Added links

* minor fix

* Added DL Streamer to the list of components installed by default

* Link fixes

* Link fixes

* ovms doc fix (#2988)

* added OpenVINO Model Server

* ovms doc fixes

Co-authored-by: Trawinski, Dariusz <dariusz.trawinski@intel.com>

* Updated openvino_docs.xml

* Updated Compile tool documentation, added extra description, removed FPGA related info

* Integrated review comments

Co-authored-by: Trawinski, Dariusz <dariusz.trawinski@intel.com>
2021-02-09 18:34:16 +03:00
Vladimir Paramuzov
aeff338c2f [IE CLDNN] Fixed performance of grouped convolutions (#4210) 2021-02-09 18:20:50 +03:00
Nikolay Tyukaev
f65a6f5424 Fix Doc CI (#4246)
* fix doc ci

* update

* fix
2021-02-09 18:03:00 +03:00
Andrew Bakalin
61c72fe1d6 [VPU][Benchmark app] Support trivial networks (#4060)
* [BENCHMARK APP] Support I64 input filling

* [VPU] Support trivial networks

* [VPU] Add test cases

* [VPU][Samples] Review fixes

* [Benchmark] Support scalar generating in python benchmark app

* [VPU] Allocate shape for unused inputs robustly

* [VPU] Make processing trivial cases more efficient

* [VPU] Rename isUsed->isConsumed

* [VPU][Tests][Samples] Review fixes

* [VPU] Process trivial cases at the very beginning

* [VPU] Review fixes
2021-02-09 16:00:41 +03:00
Vladimir Gavrilov
2c4c3a777a Implement reference nGraph implementation for "Interpolate-4" with 5D tensor support in the "linear_onnx" mode (#3948)
* Commit.

* Written the structure InfoForLinearONNXMode5D that contains info to perform interpolation in 'linear_onnx' mode for 5D tensors.

* Started to write the method get_info_for_linear_onnx_mode5D() that returns info for calculations of 'linear_onnx' mode in 5D case.

* Written the method InterpolateEvalHelper::get_info_for_linear_onnx_mode5D().

* Code style fix.

* Started to write calculation of 5D case of 'linear_onnx' mode.

* Written the method void InterpolateEval<T>::linear_onnx5D_func(const T* input_data, T* out).

* Added dispatching of 4D/5D cases of the mode 'linear_onnx'.

* Fixed code style.

* Some fixes.

* Code style fixes.

* Now linear_onnx_func throws an exception for incorrect input rank.

* Code style fix.

* Started to write tests for evaluation of 'linear_onnx' mode in the 5D case.

* Added first test for linear_onnx 5D.

* Small fixes.

* Written tests for evaluation of Interpolate-4 in linear_onnx 5D case.

* Some code style fixes.

* Small fix.

* Corrected documentation.

* Started to write generic implementation of 'linear_onnx' mode, for any ranks.

* Written the draft of a generic (for all ranks) implementation of 'linear_onnx' mode.

* Small fixes.

* Small fix.

* Small fix.

* Small fix.

* Code style fix.

* Small fix.

* Code style fix.

* Some fixes.

* Some fix.

* Small fix.

* Small fix.

* Code style fix.

* Added check for axes correctness into a generic implementation of the 'linear_onnx' mode.

* Now 5D case of the 'linear_onnx' mode is calculated using generic function.

* Code style fix.

* Deleted unused variable.

* Added debug prints.

* Small fix.

* Some fixes.

* Code style fix.

* Now all ranks are processed by a generic implementation in the 'linear_onnx' mode.

* Deleted name of missed test.

* Deleted 4D case implementation of the 'linear_onnx' mode.

* Reverted change in tests.

* Added needed 'const' modifiers and added a comment about the variable 'axis_idx_offset'.

* Small fixes.
2021-02-09 14:23:50 +03:00
Maxim Vafin
deca4fc443 Fix wrong attributes for Pad (#4216) 2021-02-09 14:11:39 +03:00
Anton Chetverikov
c1a606d507 Update L2NormToNorm transformation (#4154)
* Removechanges added by mistake

* Update transformation

* Refactor tests, add more cases

* Rename variable

* Refactor and rename transformation

* Update tests, add more cases
2021-02-09 14:07:08 +03:00
Nikita Kudriavtsev
14cd2d52dd [IE Myriad] Fix for myriadInferTests_nightly.NCHW_Input (#4141) 2021-02-09 13:03:56 +03:00
Anton Pankratv
91dcb515a3 Simplified cancel behavior (#4224) 2021-02-09 12:55:24 +03:00
Michał Karzyński
751ac1aef4 Add support for custom ExperimentalDetectron ops to ONNX Importer (#4030) 2021-02-09 10:31:32 +01:00
Alexander Zhogov
8be170a02a Azure CI: Set ONNX timeout 90 2021-02-09 12:18:37 +03:00
Andrew Bakalin
9d0c02dbd7 [VPU][NGraph][Tests] Merge Gather & GatherElements (#4140)
* [VPU] Introduce ExpGatherElements operation

* [VPU] Enable DTS for ExpGatherElements

* [VPU] Introduce MergeGatherGatherElements transformation

* [IE TESTS] Generate inputs in parameters order

* [NGRAPH] Support dynamic output tensor case in Squeeze evaluate

* [VPU] Fix allocator for dynamic input

* [VPU] Add test on inference

* [VPU] Add test on function compare

* [VPU][NGraph][Tests] Review fixes

* [VPU][NGraph] Fix tests

* [VPU] Review fixes
2021-02-09 11:55:57 +03:00
Andrew Bakalin
2d560d465f [IE][VPU]: Support negative strides for StridedSlice (#4178)
* Remove asserts on negative stride
* Update firmware
* Add test cases
2021-02-09 11:21:15 +03:00
Ilya Lavrenov
0c39d5b1b6 Added coverage for template plugin (#4234) 2021-02-09 11:03:44 +03:00
Victor Kuznetsov
a6d9842152 mv getBatchSize to cnnNetwork scope (#4231) 2021-02-09 10:47:44 +03:00
Dmitry Navalny
14d3310b32 [MO] pip packaging (#3123)
* [MO] pip packaging

* Use subprocess

* Remove MANIFEST.in

* Fix comments

* Fix requirements.txt duplication

* Add license
2021-02-09 10:47:14 +03:00
Roman Kazantsev
636f5c44b0 [MO] Support TF2 Keras ConvLSTM2D operation (#4197)
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2021-02-09 10:11:38 +03:00
Kate Generalova
9df13811ff add libglib2.0-dev dependency for DL Streamer draw_face_attributes sample (#4223) 2021-02-09 10:02:07 +03:00
Ivan Tikhonov
6789c158fd New versions of Assign/ReadValue ops (#4055)
* new versions of assign/read value, squashed commits

* Assign/ReadValue base classes, code style

* update ie_ir_parser and conversion

* low latency transformation update to support Loop op

* ngraph code style

* fix build, refactoring

* fix unit tests

* fix unit tests again

* fix unit tests

* fix code style

* update comments

* ngraph codestyle

* fix low latency tests

* fix failed unit tests

* fix incorrect version of submodule

* fix review remarks

* ngraph code style

* fix ngraph tests

* fix low latency unit tests
2021-02-09 09:50:55 +03:00
Pavel Esir
7eac2a1452 [MO][TF] Add Tensorflow Pooling V2 (#3911)
* [MO][TF] Add Tensorflow Pooling V2

* corrected extractor

* applied review comments

* remove empty line in PoolV2ToAttributedPool.py

* MaxPool attributes extraction fix
2021-02-09 09:46:32 +03:00
Ilya Churaev
3831a84fbd Removed redundant code from csv collector (#4225) 2021-02-09 06:39:27 +03:00
Alexander Zhogov
f0d87585c2 Azure CI: Add NFS share for ONNX (#4218)
* Add NFS share

* install nfs-common

* no timeout

* no msft download

* Disable 'Get MSFT models'
2021-02-09 01:22:37 +03:00
Alexander Zhogov
819650b4e1 CI: Add building documentation (#4215)
* Add Build Doc

* Add doxygen

* Add graphviz texlive

* Add lxml

* Add Upload doc

* ubuntu-20.04

* Build doxygen

* Fix

* exit 0

* Add nproc

* Change build dir name
2021-02-08 22:29:49 +03:00
Vladislav Golubev
7aaaa293d5 [LPT] StridedSlice support in ConcatTransformation & ConcatMultiChannelsTransformation (#3950)
* [LPT] ConcatTransformation: supported StridedSlice

* [LPT] Concat with StridedSlice funcional tests
2021-02-08 22:22:44 +03:00
Mikhail Ryzhov
e2c67bd508 Enabled wheel packaging (#3582)
* Added onnx support for C samples

* Added wheel packaging configuration

* ADD cmake option

* Small refactoring

* Fixes for linux env

* Fixed macOS issues

* removed test code

* Added requirements file

* Added myriad plugin

* [PIP] Runtime wheel packaging v2

* Added rpath logic

* Setting rpath for bindings

* Formatting fixes

* Move target project 1 directory above

* Added target dependencies

* Added blacklist for runtime libs

* Corrected blacklist scope

* Added wheel packaging configuration

* ADD cmake option

* Small refactoring

* Fixes for linux env

* Fixed macOS issues

* removed test code

* Added requirements file

* Added myriad plugin

* [PIP] Runtime wheel packaging v2

* Added rpath logic

* Setting rpath for bindings

* Formatting fixes

* Move target project 1 directory above

* Added blacklist for runtime libs

* Changed lib exstention om macOS

* ADD cmake option

* Revert "ADD cmake option"

This reverts commit 36f98c713bb337a160f9af6c7c79c4371fdfc45f.

* Revert "Changed lib exstention om macOS"

This reverts commit 80086fe1230b64fbcf396de82bc731c10f738eae.

* Revert "Merge branch 'feature/wheel_pack' of https://github.com/mryzhov/openvino into feature/wheel_pack"

This reverts commit 7560d9ab55edc1f8877b83821542570060fb13d8, reversing
changes made to c287798f994dcefc074a06ff7c3ef86222674cc7.

* Revert "Added onnx support for C samples"

This reverts commit 26c595ac136d99bd576d307d33ca15feb15f81e4.

* Fixed merge issues

* Fixed typo in mac tool

* Code review fixes

* Simplified deps and added fatal error

code review fixes

* Removed test data

* Fixed setup.py review comments

* Removed apache 2.0 license

* Review fixes

* fixed pylint issues

* Fixed python api install directory

* Using cmake detected python binary

* Changed wheel build directory

* Renamed subdir from install to wheel

* Removed pylint log

* Made license, description and requirements configurable by cmake options

Those files may be changed in CI

* Changed variable name

* Glob instead of os.walk

* Corrected package name in description

* Added wheel building instructions to readme

* small typo fix

* Changes to support CI build

1) Setup.py can be run without cmake build
2) Wheel metadata can be set by environment variables
3) Cmake build uses configuration from .env file

* Removed unused file
2021-02-08 19:16:28 +03:00
Ilya Lavrenov
7626d90f41 Removed remnants of old CPU CC (#4214) 2021-02-08 17:46:03 +03:00
Maxim Vafin
a157cc2a55 Support ":" in node name for mean/scale application (#4082)
* Support ":" in node name for mean/scale application

* Apply review feedback
2021-02-08 16:51:53 +03:00
Vladislav Volkov
2ad7db7b25 Optimizations for precision conversion operations in nGraph reference implementations (#3974)
* FP16->FP32 conversion vectorization

* int8->FP16 conversion vectorization in nGraph
2021-02-08 16:21:45 +03:00
Tomasz Socha
fc30d6e551 [nGraph] Update list of skipped tests (#4185) 2021-02-08 14:18:59 +01:00
Ilya Churaev
0b60ecb2d3 Remove sea collectors (#4191)
* Removed redundant collectors

* Remove isea filter

* Remove the code from IntelSEAPI

* Removed shell=True

* remove asserts

* Refactored command line arguments
2021-02-08 15:26:48 +03:00
Elizaveta Lobanova
42c8d1c45f [GNA] Support of constant trivial networks (#4169) 2021-02-08 15:25:46 +03:00
Anton Romanov
2db879207f Change default device in speech_sample to CPU (#4008) 2021-02-08 15:13:11 +03:00
Irina Efode
bd967a1b91 [IE TESTS] Move ROI SLT class to the shared lib (#4198)
* [IE TESTS] Move ROI SLT class to the shared lib

* [IE Tests] Fix Ci

* Fix ci
2021-02-08 13:56:34 +03:00
Jozef Daniecki
0acd153a6c Group convolution backprop data (#4113)
* GroupConvolutionBackpropData: Added backend unit tests

* GroupConvolutionBackpropData: Refactor SLT and added tests for 1D

* GroupConvolutionBackpropData: Added Serialization tests

* GroupConvolutionBackpropData: Added GroupConvolutionBackpropData reference implementation

* GroupConvolutionBackpropData specification refactoring.

* GroupConvolutionBackpropData: Added validation node checks for the op

* GroupConvolutionBackpropData: Copyright year fixed

* GroupConvolutionBackpropData: Enhanced output shape inference with dynamic shapes

* GroupConvolutionBackpropData: Remove redefinition of helper variables

* Spec refactoring: add ticks to types and layouts.

* Minor refactoring.

* GroupConvolutionBackpropData: Moved backend tests from GroupConvolution to corresponding file

* GroupConvolutionBackpropData: Improved output shape inference for fully dynamic inputs

* GroupConvolutionBackpropData: Clean up type_prop tests

* Fix banner in GroupConvolution shared test class.

Co-authored-by: ggalieroc <gabriele.galiero.casay@intel.com>
2021-02-08 13:38:14 +03:00
Ilya Lavrenov
500df585d1 Fixed github issue #4172 (#4201)
* Fixed github issue #4172

* Simplified tests

* Added instances to HETERO plugin
2021-02-08 12:30:54 +03:00
Jozef Daniecki
f5fb37cc21 DeformableConvolution specification refactoring. (#4101)
* DeformableConvolution specification refactoring.

* Add ticks to types and layouts.

* Removed 1D and 3D Convolution type.

At the current moment CPU plugin and MXnet implemenatations supports
only 2D case.

* Fix examples section.

* Fix offests input layout description.
2021-02-08 12:25:30 +03:00
Maksim Kutakov
7387642a98 [CPU] A new transformation that adds a convert layer if there is no reorders that support the data type conversion. (#3498) 2021-02-08 11:58:48 +03:00
Andrey Somsikov
db065d525e Fix cond comp artifacts path (#4200) 2021-02-08 11:18:27 +03:00
Gladilov, Gleb
785828d321 [IE][VPU]: Fixes BinaryEltwise DTS on empty input (#3879)
Makes DTS for BinaryEltwise produce empty output tensor in case if at least one input is empty. As criteria for empty tensor ReduceMin is used (assuming all shape's values are non-negative).

Tests are changed accordingly. Trying to add a new test case on inference with empty input, reference version failed, so those tests are left unchanged.
2021-02-08 10:28:57 +03:00
Bartosz Lesniewski
132b47394c Remove ops from Node Converter- part 1 (#4166)
* remove cropie op from node converter

* remove eltwise from node converter, enable visitor api

* remove ceiling op from node converter

* remove powerie, reluie, fullyconnected from node converter

* remove unused node converters

* join relu and reluie specific creators

* add missing eltwise types to node conversion

* fix eltwise type

* change power ops scale parameter passing for better precision
2021-02-08 07:21:54 +03:00
Ilya Churaev
e7465d329e Update oneDNN. Added a fix for CC (#4196) 2021-02-08 07:10:10 +03:00
Bartosz Lesniewski
210ad8194a Proposal reference implementation (#3924)
* Reference implementation for Proposal, enable CPU SLT

* code style fix

* add type prop test for invalid anchor count

* add unit test

* fix shapes in attribute test

* temp workaround- disable maring end of boxes list

* Disable CPU smoke test- spec misalignment

* code style fixes

* add some details to the specification

* disable myriadx proposal slt

* review changes, using usigned int and size_t

* improve proposal op shape inference to cover dynamic too, add unit test coverage

* remove unused variable in test body

* remove batch size in tests where its not used

* add post nms topn initialization in tests where it was missing

* review comments

* style fix

* style fix 2

* add tests, remove unused variables, change shape inference checks

* style fix

* add input tensors type checks and test coverage

* align input type in attribute and ngraphreader tests to match specification

* fix wrong dimension in error message

* proposalv4 ref impl

* enable single layer and unit tests for proposalv4 ref impl

* align output termination with cpu, enable cpu slt

* custom slt compares to detect less-than-predicted number of boxes

* custom slt compares to detect less-than-predicted number of boxes

* Clarify output termination in spec

* review comments

* smaller input data for unit tests

* add check for batch_dim being static

* disable gpu slt for proposal

* test data style fix

* test data style fix 2

* add type section to specification

* shape inference improvement

* multiply expected 1st dim in tests by post_nms_topn

* add checks and testcases for dynamic ranks

* indentation, review comments

* reduce code redundancy in ref implementation

* remove comment

* Fix typo in proposal1 spec

* Fix typo in proposal4 spec
2021-02-08 07:09:54 +03:00
Ryan Loney
56b6e1065b Update install_prerequisites.bat (#4205)
* Update install_prerequisites.bat

Removed warning language to show that you can optionally install protobuf to speed up model conversion. It should not be a warning.

* Update install_prerequisites.bat
2021-02-07 10:13:44 +03:00
Anastasia Popova
cfc3b563a5 Tensor names in IR (#4089)
* Added attributes save modes

* Added tensor names to IR

* Reformat code

* Unit tests and code refactoring

* Fixed error

* Code refactoring

* Code refactoring

* Code refactoring

* Error fixed

* Error fixed

* Bug fixed

* Bug fixed

* Additional unit tests and comments

* Added dest mode in Fuse Mul
2021-02-06 09:31:47 +03:00
Piotr Szmelczynski
9695076bde Maxpool spec update (#3758)
* Update spec

* Update outputs section

* Update rounding_type section

* Update spec

* Update input section

* add newline

* fix one xml example

* fix indentation

* Update detailed description

* Update detailed description

* Update spec

* Change reference name

* add new line

* Update spec

* fix typo

* fix style

* fix example 5 description

* Update spec

* Add Types section

* Refactor xml examples

* Update xml examples and add bfloat16 to supported types

* Update supported types
2021-02-05 21:04:53 +03:00
Vladimir Gavrilov
c1136cd7b0 Completely transition of MO to Interpolate-4 (#970)
* Refactored infer function and function supported_attrs for the layer Interpolate.

* Small change.

* Deleted unneeded checks in transformations ResizeToInterpolate2D and ResizeToInterpolate3D.

* Small fix in the extractor of ONNX Resize.

* Now the extractor of TF ResizeBilinear generates Interpolate-1 again, because 'axis' in final version of Interpolate-4 specification is an input but is not attribute.

* Now the extractor of TF ResizeNearest generates Interpolate-1 again, because 'axis' in final version of Interpolate-4 specification is an input but is not attribute.

* Added static method get_axis into class Interpolate.

* Refactored class CanBeFused in the transformation InterpolateSequenceToInterpolate.

* Fixed transformation InterpolateSequenceToInterpolate according to the last version of the specification of Interpolate-4.

* Started to write support of Interpolate-4 in the transformation InterpolateWithConcat.

* Added support for Interpolate-4 into the transformation InterpolateWithConcat.

* Added support for Interpolate-4 into the transformation InterpolateConcat.

* Added support for Interpolate-4 into the transformation InterpolateReshapeWA.

* Added support for Interpolate-4 into the transformation InterpolateTranspose.

* Started to add test for opset4 case of the transformation InterpolateSequenceToInterpolate.

* Added test for InterpolateSequenceToInterpolate (test_2d_interpolate_sequence_1_opset4_case).

* Added test for InterpolateSequenceToInterpolate (test_2d_interpolate_sequence_4_opset4_case).

* Added another test for InterpolateSequenceToInterpolate (test_2d_interpolate_sequence_5_opset4_case).

* Added another test for InterpolateSequenceToInterpolate (test_3d_interpolate_sequence_1_opset4_case).

* Finished addition of tests for opset4 case of InterpolateSequenceToInterpolate.

* Small change.

* Now opset is only opset1 or opset4 in the transformation InterpolateTranspose.

* Small fixes in transformations ResizeToInterpolate2D and ResizeToInterpolate3D.

* Deleted reading of unused ONNX attributes.

* Fixed docstring of the transformation InterpolateV1ToInterpolateV4.

* Added node name in assert about axes input.

* Fixes in the definition of the operation ONNXResize11.

* Now Interpolate-4 cannot have 'extension' as opset.

* Now the transformation InterpolateV1ToInterpolateV4 uses find_and_replace_pattern but not replace_sub_graph.

* Fixed tests for transformations InterpolateReshapeWA and InterpolateConcat.

* Fixed some tests.

* Rewritten operation Interpolate-4 class according to new variant of documentation.

* Some fixes in ONNXResize11 operation class.

* Now the transformation ONNXResize11ToInterpolate generates Interpolate-4 with 4 inputs.

* Now the transformation UpsampleToResample generates Interpolate-4 with 4 inputs.

* Now the transformation NearestNeighborUpsampling generates Interpolate-4 with 4 inputs.

* Now transformations ResizeToInterpolate2D and ResizeToInterpolate3D generate Interpolate-4 with 4 inputs.

* Now the transformation SplitConcatPairToInterpolate generates Interpolate-4 with 4 inputs.

* Now the transformation UnsqueezeTileReshapeBlockToInterpolate generates Interpolate-4 with 4 inputs.

* Now the transformation InterpolateV1ToInterpolateV4 generates Interpolate-4 with 4 inputs.

* Some fixes.

* Fixed the transformation InterpolateSequenceToInterpolate according to new variant of Interpolate-4 specification.

* Fixed typos.

* Added shape_calculation_mode to supported_attrs.

* Small fixes.

* Added operation ONNXResize10 and the transformation ONNXResize10ToInterpolate4.

* Fixed function correct_scales_using_dst_shape.

* Some fixes in InterpolateSequenceToInterpolate.

* Fixed bug in the method __call__ of the class CanBeFused: now self.accumulated_axes is correctly cleared in all cases.

* Small change.

* Fixed tests for the transformation SplitConcatPairToInterpolate.

* Now transformations InterpolateWithConcat, InterpolateReshapeWA, InterpolateConcat support Interpolate-4.

* Fixed the transformation InterpolateTranspose for the case of Interpolate-4.

* Written the back transformation InterpolateV4AxesCorrection to convert 'axes' input of Interpolate-4 from NHWC to NCHW layout.

* Added PermuteInput in Interpolate-4 infer.

* Fixed typos.

* Deleted the transformation InterpolateAxesCorrection.

* Now Interpolate-4 permutes axis, not shape in input port 3.

* Small fix.

* Some fix.

* Fixed bug in the transformation UpsampleToResample.

* Added some debug prints.

* Added more debug prints.

* Now ONNX Upsample-9 operation is read as ONNXResize10.

* Small fix.

* Small fixes.

* Fixed tests for the transformation SplitConcatPairToInterpolate.

* Deleted debug prints.

* Deleted some debug prints.

* Fixes in the transformation UnsqueezeTileReshapeBlockToInterpolate and its tests.

* Small fix in the transformation InterpolateSequenceToInterpolate.

* Started to write nGraph transformation to convert Interpolate-1 to Interpolate-4.

* Deleted redundant files.

* Small fixes.

* Small fix.

* Written draft of the transformation Interpolate-1 -> Interpolate-4.

* Small fix.

* Now ONNX Importer reads Resize-10 as Interpolate-4.

* Fixes in the test onnx_model_resize10_import_only.

* Small fix in the test for the conversion Interpolate-1 -> Interpolate-4.

* Small fixes.

* Fixed NGraphReaderTests for Interpolate.

* Some fixes.

* Deleted class for Resample operation.

* Fix in the transformation NearestNeighborUpsampling: fixed precision of the input 'scales' of generated Interpolate-4.

* Fixed typo.

* Now the TF operations ResizeBilinear is readed as internal MO operation TFResizeBilinear. This internal operation is converted into Interpolate-4.

* Small fix in BOM-file.

* Added checks of existence of attributes of TF  ResizeBilinear operation.

* Small fixes in the conversion of the internal MO operation  TFResizeBilinear to Interpolate-4.

* Small fixes.

* Small fixes.

* Now the transformation ONNXResize10ToInterpolateV4 calculates sizes input as input_shape * (scales + epsilon).

* Added the internal MO operation TFResizeNearestNeighbor.

* Fixes in the transformation SplitConcatPairToInterpolate and its tests.

* Fixes in the transformation UnsqueezeTileReshapeBlockToInterpolate and its tests.

* Written the transformation that converts the internal operation TFResizeNearestNeighbor into Interpolate-4.

* Now MO reads the TF operation ResizeNearestNeighbor as the internal MO operation TFResizeNearestNeighbor.

* Small fix.

* Now the specification of Interpolate-4 clarifies that the mode linear_onnx supports only 2D or 4D input tensors.

* Small fix.

* Some fixes.

* Moved the transformation ONNXResize10ToInterpolateV4 to the front stage.

* Deleted infer function and function supported_attrs for ONNXResize10 operation.

* Deleted supported_attrs() for TFResizeBilinear and TFResizeNearestNeighbor.

* Some fixes.

* Fixes in the shape infer function of the nGraph operation Interpolate-4. Now 'axes' input can be non-constant.  In the such case, all elements of the output shape are Dimension::dynamic().

* Deleted corner cases processing in transformations TFResizeBilinearToInterpolateV4 and TFResizeNearestNeighborToInterpolateV4.

* Rewritten the function replace_resize_bilinear.

* Written inner MO operation TFResize that covers TF operations ResizeBilinear and ResizeNearestNeighbor.

* Now TF operations ResizeBilinear and ResizeNearestNeighbor are read as an internal operation TFResize in MO. Transformations TFResizeNearestNeighborToInterpolateV4 and TFResizeBilinearToInterpolateV4 are fused into one transformation TFResizeToInterpolateV4.

* Some changes in the shape infer function of nGraph op Interpolate-4.

* Small fix.

* Some changes.

* The transformation TFResizeToInterpolateV4 is moved to the front stage.

* Deleted redundant assert.

* Deleted transformations ResizeToInterpolate2D and ResizeToInterpolate3D.

* Some renaming.

* Small change.

* Deleted .copy() in the shape infer function of the internal operation TFResize.

* Small fix.

* Small fixes.

* Added comment about the case when the input 'axes' of Interpolate-4 is non-constant.

* Written test for Interpolate-4 shape infer, for the case when the input 'axes' is non-constant and shape_calculation_mode = scales.

* Some fixes.

* Small fixes.

* Small fix.

* Added yet another test for the case of non-constant 'axes' input of Interpolate-4 (when shape_calculation_mode = sizes).

* Added some comment.

* Small fix.

* Reverted changes for InterpolateWithConcat.

* Added type checks for all inputs of nGraph operation Interpolate-4.

* Added u32 and u64 to supported element types of sizes and axes inputs of nGraph operation Interpolate-4.

* Fixed some functional tests.

* Some changes.

* Added helper function float32_array.

* Now the MO transformation InterpolateV1ToInterpolate preserves names of layers.

* Small fix.

* Small fix.

* Reverted some change.

* Small fixes.

* Small fix.

* Small fix.

* Small fix.

* Small fix.

* Reverted changes in the nGraph reader tests for Interpolate-1.

* Some revert.

* Fixed some copyright year.
2021-02-05 19:20:26 +03:00
Alexander Zhogov
bd3884b602 Azure CI: Increase build speed on Linux (#4124)
* EPHEMERAL_WU2, F8s_v2

* D16ds_v4

* Set LIN_VMSS_VENV_F16S_WU2
2021-02-05 18:41:01 +03:00
Alexander Zhogov
a3dc2649e2 Azure CI: Enable nGaph ONNX check (#2631)
* GitHub CI: Add nGraph ONNX check

* Fix job name

* Fix commands

* Enable nGraph Docker

* Fix

* Fix

* Fix

* Remove Actions

* Decrease a number of workers for executing models tests

* Enable "Docker run tests"

* Unset parallel execution

* Add cloning models

* Update model_zoo_preprocess.sh cmd

* Fix model_zoo_preprocess.sh cmd

* Add share

* ls -alR /mnt/onnxtestdata

* Change path

* move clone models

* Update script

* Add wget

* Update

* Update to master

* Update

* Update

* clone into tmp

* Enable clone

* Fix

* Use model_zoo_preprocess

* Add copy to share

* Enable tests

* Get MSFT

* Run tests

* Try 16 cores

* rub tests

* list models

* run tests

* Run tests, no --model_zoo_xfail

* Run tests, -n 8

* Run tests, -n 1

* Run tests, -n 4

* Run tests, -n 2

* Run with -n 1

* Update info

* First try to run onnx ci:
 * disable MSFT models for first try,
 * try to align onnx_models

* Enable steps

* Update cmake

* Add destination for cmake build

* Try to fix cmake build

* set ninja and instal dependencies

* Revert changes from Blaczkowski, Rafal

* Add swapfile 15 GB, run on AMD CPU 16 cores, 64 GB RAM

* Enable model_zoo_preprocess.sh

* Add reference-if-able

* Update

* test_zoo_models.py -n 8

* Fix clone

* Set LIN_VMSS_VENV_EPHEMERAL_WU2, F8s_v2

* git clone --single-branch

* test_zoo_models.py -n 6, D16as_v4

* -n 4

* clean

* -n 2

* -n 4, swap 48 GB

* E16ds_v4 (16-128), -n 8

* -n 8

* Set LIN_VMSS_VENV_ONNX_WU2

* -n 4

* del -n 16 for ut

Co-authored-by: rblaczko <rafal.blaczkowski@intel.com>
2021-02-05 17:48:16 +03:00
Dmitrii Denisov
d323e43e69 Update install_openvino_dependencies.sh (#4183)
* Update install_openvino_dependencies.sh

Added python packages for CentOS 7

* Update install_openvino_dependencies.sh
2021-02-05 17:45:21 +03:00
Kate Generalova
6c3c0cca24 Skip installing numa pkg in OCL driver script (#4180)
fix internal issue #41229
fix syntax issues
2021-02-05 15:35:16 +03:00
Elizaveta Lobanova
4393525313 [GNA] 1D convolution support for native NCHW models (#4067) 2021-02-05 14:55:11 +03:00
Maxim Vafin
08a527602f Extend LayerNorm pattern to support onnx bert (#4137)
* Extend LayerNorm pattern to support onnx bert

* Fix test

* Fix test
2021-02-05 14:26:24 +03:00
Tomasz Socha
65e2b4af3f [ONNX Importer] Switch to opset6 (#4112) 2021-02-05 11:15:13 +01:00
Gladilov, Gleb
90347c2033 [IE][VPU]: Enables Loop Support (#4157)
* Enables StaticShapeLoop -> CNN conversion as TensorIterator
* Enables visit_attributes API for StaticShapeLoop
* Enables Loop support in TensorIterator parser
* Fixes LoopStart/LoopEnd serialization
* Fixes dynamic iterations count for LoopEnd
* Updates firmware on Loop fixes
2021-02-05 11:36:17 +03:00
Maxim Vafin
abf37e1caf Fix performance regression due to copying of opset (#4184) 2021-02-05 11:25:09 +03:00
Maksim Makridin
e47186aad6 Modifications for Object Detection SSD Python sample (#3976)
* Modifications for Object Detection SSD Sample Python

* Fixes for tests

* Changing the way output checks are processed
2021-02-05 11:10:30 +03:00
Evgenya Stepyreva
47127fb021 opset1::OneHot Fix shape infer function for dynamic input shape case (#4163) 2021-02-05 10:10:40 +03:00
Vladislav Volkov
6083c7fa6b Fix for switches conditional compilation (#4168) 2021-02-05 09:42:13 +03:00
Yury Gaydaychuk
bf05b4d4f6 [CPU] Disabled inplace for const input in Scatter node (#4148) 2021-02-04 22:42:58 +03:00
Alexey Varyzgin
1bd7b37419 [CPU] BF16 Deconvolution support (#4048)
* disable and cleanup interp and resample that is covered by interpolate

* [BF16] Deconvolution was enabled

* Deconvolution tests were added

* Copyright year was fixed

* Friendly name usage for tests

* Test inherited from CPUTestsBase

* Fusing tests were added

* oneDNN was updated

* Gemm and 1x1 were added with tests

* Number of channels not aligned on vector length was done for blocked cases

* DW deconvolution case was added with tests

* oneDNN changes for BF16 deconvolutions were squashed

Co-authored-by: chenhuwa <chenhu.wang@intel.com>
2021-02-04 22:19:01 +03:00
Tomasz Socha
937c332978 [ONNX][Tests][Python][Models] Increase tolerance for some models (#4150) 2021-02-04 15:54:11 +01:00
Anton Pankratv
945da5ff4f Removed template from base (#4045)
Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
2021-02-04 17:43:20 +03:00
Maxim Vafin
e80e5e7ae5 Add python API for MVN-6 (#3816)
* Add python api for MVN-6

* Fix code style

* Fix codestyle

* Apply feedback

* Fix test
2021-02-04 17:36:19 +03:00
Ilya Lavrenov
367cacd2f2 CVS-43973: added HWC layout (#4147)
* CVS-43973: added HWC layout

* Added test
2021-02-04 15:16:31 +03:00
Jozef Daniecki
2d979accab Added BIN precision convertion to ngraph's u1. (#4160)
* Added BIN precision convertion to ngraph's u1.

* Add test to check if serialization works with BIN precision.
2021-02-04 14:41:54 +03:00
Anton Pankratv
54c889f876 Implemented base cancelation implementation (#3805) 2021-02-04 11:19:44 +03:00
Mingyu Kim
04760cb59a [IE CLDNN] Added ScatterElementsUpdate op support (#4105) 2021-02-04 11:16:27 +03:00
Ilya Churaev
939ddeac41 Moved ittapi to thirdparty (#4164) 2021-02-04 11:13:44 +03:00
Ilya Lavrenov
956c6dd35f Extracted toolchain to build with static runtime from OneCore toolchain (#3045)
* Static runtime

* Fixed cldnn compilation with static runtime

* Added separate toolchain for static runtime

* Added toolchain itself
2021-02-04 11:08:30 +03:00
Gladilov, Gleb
47b1244b25 [IE][VPU]: Enables WA for Loop creation (#4153)
Loop operation constructor call is not sufficient to
create Loop operation, such methods as set_special_body_ports,
set_sliced_input and other may need to be called as well.
set_special_body_ports must always be called since it specifies
required attribute body_condition_output_idx. If it has not been
done before validate_and_infer_types call - exception will be thrown
that this required attribute is not set.

Recently, validate_and_infer_types call has been added to
set_sliced_input implementation. As a result, if Loop has sliced
inputs, they must be specified not earlier set_special_body_ports,
otherwise program will fail.

Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>
2021-02-04 10:46:42 +03:00
Andrey Somsikov
9b5b2bb002 Add collector path for cond. comp. tests (#4159) 2021-02-04 10:35:24 +03:00
Chenhu Wang
db84033aa8 [CPU] Introduced Load/Store emitters (#3567)
- Created emitters for jitted load and store and apply to MVN node
- MVN template function removed
- Optimized tiles processing in MVN node implementation
2021-02-04 10:21:26 +03:00
Ilya Lavrenov
69e3ca5ec7 Re-used XML utils (#4170) 2021-02-04 08:42:16 +03:00
Bartek Szmelczynski
18a65b5330 Serialization dynamic layer bug (#3982)
* remove if statement which checks if there is no dynamic shape

* remove reshaping for genericIE operation

* back to the previous version with reshape

* remove blank space

* add plugin_api to cmake in order to use generic_ie.hpp in serialize file

* add SLT for serialization for NonMaxSupperesion operator

* revert the removal of if check for dynamism

* remove the left over from CMakeLists

* fix CmakeLists removal fail

* remove redundant parenthesis

* add test which failed in the first place and fixes to it

* fix wrong spaces
2021-02-04 07:21:37 +03:00
Svetlana Dolinina
dc1b605b7f Ngraph: add methods for removing parameters from Function (#3854)
* added methods for parameters

* added tests

* remove parameter from low latency

* Revert "remove parameter from low latency"

This reverts commit 86a91ddcb0.

* comment added

* fix style

* review fix

* extended comments

* style fixes

* review fixes

* test fix

* added full pipeline test
2021-02-04 06:59:06 +03:00
Tomasz Socha
4563101c5a [ONNX Importer] Onnx importer support for brocker names (#4087)
* ONNX Importer changes

* Unit tests

* Style

* Don't set tensor names for result output tensor

* Review fx I

* fix

* Style

Co-authored-by: Vladislav Volkov <vladislav.volkov@intel.com>
2021-02-04 06:53:27 +03:00
Georgiy Manuilov
ff4227cf53 Add missing header for std::tolower (#4156)
* Add missing header for std::tolower

Missing header causes syntax error when compiling for Windows using Visual studio 2017. Closes #4155

* Reordered STL header includes in order to pass style check
2021-02-04 06:52:29 +03:00
Ilya Churaev
22543c4e3f Fixed cc compilation (#4161) 2021-02-04 06:38:16 +03:00
Ilya Churaev
748780e392 Supports tensor names with delimiter (#4085)
* Supports tensor names with delimiter

* Fixed comments

* Allow to use different delimiters
2021-02-04 06:38:05 +03:00
Artyom Anokhov
da9d42f63b setupvars.bat: Removed "setlocal enableDelayedExpansion", updated checking python_version (#4162) 2021-02-03 21:16:54 +03:00
Anton Pankratv
0a63b9214a Used std::string as API paramters (#4050) 2021-02-03 19:21:39 +03:00
Polina Brzezinskaya
64312bc067 [IE][VPU]: Fix SEGFAULT when calling GetExecGraphInfo() from imported network (#3769) 2021-02-03 18:03:56 +03:00
Ilya Lavrenov
75ed35836f Properly enabled ia32 build (#4145)
* Properly enabled ia32 build

* Fixed OpenCV_DIR env check
2021-02-03 17:26:50 +03:00
Edward Shogulin
f57f1fafc7 [LPT] Q/DQ support integration (#3575)
* [ MO ] New INT weights form

	Ticket #34096

	FQ = Quantize -> Dequantize =
	= FQ` -> Convert(int8) -> Convert(src_dtype) -> FQ =
	= Constant(int8) -> Convert(src_dtype) -> FQ =
	= Constant(int8) -> Convert(src_dtype) -> Subtract(zero_point) -> Multiply(scale)

* [LPT] Q/DQ representation support

Co-authored-by: Evgenya Stepyreva <evgenya.stepyreva@intel.com>
2021-02-03 17:05:34 +03:00
Nikolay Shchegolev
8d7c9de090 [CPU] Enable MVN-6 operation. (#3400) 2021-02-03 16:49:37 +03:00
Jozef Daniecki
4b1efeb858 Group convolution (#3995)
* GroupConvolution SLT style refactoring.

* Add GroupConvolution 1D SLT.

* Add GroupConvolution Serialization SLT.

* Add GroupConvolution ref impl to evaluates_map.

* Add GroupConvolution ref impl.

* Fix compilation on master.

* GroupConvolution specification update.

* Readability refactoring.

* Specification refactoring.

* Added 'output' section in GropuConvolution spec.
2021-02-03 16:07:01 +03:00
Kate Generalova
8b800cc539 add cl_compiler, dl_streamer and opencv deps to install dependencies script for Ubuntu (#4136)
* add cl_compiler, dl_streamer and opencv deps to install dependencies script for Ubuntu

libgl1 - for opencv package from PyPi
vainfo - for gstreamer-vaapi plugin
libtinfo5 - for cl_compiler tool

* remove old DL Streamer deps script

internal fix #40514

* add gstreamer tools as DL Streamer, opencv optional install dependency
2021-02-03 15:51:53 +03:00
Patryk Elszkowski
3ad1360f5f Compare function - compare attributes - unit test (#4092)
* Enable node attributes comparing in SLT

* Add values of compared values to error message

* Switch from op version to set

* Test for Constant node

* Compare clamp min max attribute tests

* try to fix CentOS build

* use HasSubstr matcher from gMock

* add more tests

* Add DummyConstan op to check if validation handle different types

* use new Function comparison API

* Add test for unsupported type

Co-authored-by: Patryk Elszkowski <patryk.elszkowki@intel.com>
2021-02-03 15:24:25 +03:00
iliya mironov
1419e05032 Add python api for CTCGreedyDecoder (#3947)
* Add python api for CTCGreedyDecoder

* Fix code style

* Fix unit test

* Fix code style

* Fix unit tests

* Fix python tests

* Fix python tests

* Fix python tests

* Fix according to code review

* fix

* Fix api

* fix unit tests

* Fix unit test

* Fix python api
2021-02-03 14:53:53 +03:00
Anton Chetverikov
1b8930c4cb Remove redundant attributes in back_edges for TI and Loop layers (#4133)
* Remove redundant edge attrs for loop layer

* Update copyright year
2021-02-03 14:50:47 +03:00
Ilya Lavrenov
e71aae9d29 Fixed CVS-47120 (#3919) 2021-02-03 14:27:02 +03:00
Ilya Lavrenov
be772c58bb Fixed "Reverse input channels" case for common Plugin API (#4142)
* Added preprocessing for GetBlob

* Fixed preprocessing tests

* Added more test cases

* Skipped tests on GPU
2021-02-03 14:21:33 +03:00
Vladimir Paramuzov
a54d9780c5 [IE CLDNN] FP16 fused eltwise fix (#4028) 2021-02-03 13:46:58 +03:00
Kamil Magierski
9ff8e262ee Dynamic Batch Test (#3936)
* Dynamic Batch Test

Whitespace fixes

style fixes

Include path fix

whiteline fix

Review comments implementation

* MacOS build fix

* Move dynamic batch test to configuration_tests

* change test namespace
2021-02-03 13:16:48 +03:00
Vladimir Gavrilov
6cf8a9f935 Network reading failure in IE for operations ExperimentalDetectronPriorGridGenerator and ExperimentalDetectronROIFeatureExtractor (#4014)
* Commit.

* Small fix in validation of the nGraph operation ExperimentalDetectronPriorGridGenerator.

* Fixes in the validation of the nGraph operation ExperimentalDetectronROIFeatureExtractor.

* Added more tests for shape infer function of the nGraph operation ExperimentalDetectronPriorGridGenerator.

* Code style fix.

* Added more tests for shape infer function of the nGraph operation ExperimentalDetectronROIFeatureExtractor.

* Fixes in the test type_prop.detectron_roi_feature_extractor_intervals_1.

* Some code style fixes.

* Started to rewrite the test type_prop.detectron_roi_feature_extractor_intervals_1 as a parametrized test.

* Added some tests to parametrized test of ExperimentalDetectronROIFeatureExtractor.

* Some code style fixes.

* Small code style fix.

* The test type_prop.detectron_roi_feature_extractor_intervals_1 was rewritten as a parametrized test.

* Deleted the method run_roi_feature_test().

* All type_prop tests for ExperimentalDetectronROIFeatureExtractor are parametrized.

* Added parametrized variant of the test detectron_grid_generator_dynamic_shapes_intervals_1.

* Small fix.

* Some changes.

* Some fixes.

* Now we have two parametrized tests of ExperimentalDetectronROIFeatureExtractor shape infer, not one.

* Code style fix.

* Deleted duplicate of tests.

* Yet another test is parametrized.

* Small fix.

* Deleted some duplicates of tests.
2021-02-03 13:15:21 +03:00
Ilya Churaev
b6c289ece4 Add sea to OpenVINO (#4042)
* Add IntelSEAPI

* Fixed Windows build

* Fixed Windows

* Removed ETLRelogger

* Fixed linux compilation

* Fixed macOS build

* Small fixes

* Enabled OV codestyle

* Removed Android support

* Update license

* Fixed compilation for Windows

* Removed parse_jit function

* Fixed script for header generation

* Remove bandit hints

* Moved itt collector to thirdparty

* Try to fix hits for Windows

* Removed more hits
2021-02-03 13:13:56 +03:00
Nikolay Shchegolev
4d9a030ff2 [CPU] Enable CTCGreedyDecoderSeqLen. (#3890) 2021-02-03 12:36:41 +03:00
Vladislav Golubev
d681582251 [LPT] MatMul: 3D quantization support (#3391)
* [LPT] MatMul: supported 3D quantization
[LPT] MatMul with constant: propagate subtract
[LPT] LayerTransformation:added canBeTransformedSpecialDimension for transformations that support not only per-channel/per-tensor quantization
[LPT] plugin tests: added 3D test-cases

* reshape_fully_connected naming fix

* [LPT] NetworkHelper: replaced onWeights with isConstantPath
[LPT] MatMulTransformation cpuFuncTests tests: rtPrecision check

* [LPT] constant folding FQ on weights if child operations aren't supported
[LPT] convolution with incorrect weights tests refactoring
[LPT] fq on weights with unsupported operations tests
2021-02-03 09:11:06 +03:00
Patryk Elszkowski
461a71b641 ngraph Constant operator - add const for c-tor input parameters (#4091)
Co-authored-by: Patryk Elszkowski <patryk.elszkowki@intel.com>
2021-02-03 07:50:50 +03:00
Andrey Somsikov
359c2ca018 Upgrade pyyaml to the latest (#4134) 2021-02-03 07:07:01 +03:00
Maxim Kurin
9ad6513f76 [Hetero] Update layout in inputs info (#4131) 2021-02-03 01:39:34 +03:00
Mateusz Tabaka
da4c50f4ff Fuse x * HSigmoid(x) to HSwish(x) (#4121)
* Fuse x * HSigmoid(x) to HSwish(x)

* use pattern_value_map

* switch to opset6

* get rid of dynamic_pointer_cast
2021-02-02 22:23:44 +03:00
Ilya Lavrenov
685bf830d5 Fixed cldnn compilation with static runtime (#4070) 2021-02-02 20:11:40 +03:00
Alexander Zhogov
804010bb1b Azure CI: Disable 3 failed IE UT old 2021-02-02 18:00:11 +03:00
Maxim Vafin
75763b8e67 Extend GELU merger patterns (#4130) 2021-02-02 17:59:12 +03:00
Dmitry Kurtaev
5c08312ade [Docs] Add a note about --hparams for EfficientDet (#4079) 2021-02-02 17:51:07 +03:00
Maxim Vafin
0b3ff5edc2 Add MO support for MVN-6 (#3772)
* Add MO support for MVN-6

* Apply review feedback

* Apply review feedback

* Enable MVN-6 decomposition

* Fix shape_infer issue

* Fix MVN6 decomposition

* Fix build

* Fix tests

* Small fix

* Add MVN-6 reader test

* Apply feedback

* Apply review feedback

* Fix onnx test failure
2021-02-02 17:45:56 +03:00
Ilya Churaev
6a0bc80137 Fixed CNNNetwork iterator for some corner cases with Memory (#4084)
* Fixed CNNNetwork iterator for some corner cases with Memory

* Fixed tests
2021-02-02 16:58:51 +03:00
Mikhail Letavin
ac7c847187 [IE CLDNN] Fix most of clDNN LSTM unit tests (#3810) 2021-02-02 16:42:45 +03:00
Roman Kazantsev
5ab628d776 Fix TF2 Keras RNN support (#4116)
It adds support for Bidirectional RNNs and avoids use of ONNX primitives from MO-TF.

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2021-02-02 16:00:11 +03:00
Patryk Elszkowski
fe4c48e432 Compare function: change API to a class (#4077)
Co-authored-by: Patryk Elszkowski <patryk.elszkowki@intel.com>
2021-02-02 15:43:55 +03:00
Maksim Kutakov
f0398212f8 [CPU] Split layer nspc -> ncsp special case put back. (#3839) 2021-02-02 15:40:50 +03:00
Tomasz Jankowski
cc000e57e0 Enable GatherElements tests on IE_CPU (#4044) 2021-02-02 12:59:44 +01:00
Taylor Yeonbok Lee
38fab0265d [IE CLDNN] Fixed scatter update op & reshape kernel (#4106) 2021-02-02 14:57:32 +03:00
Andrey Somsikov
9c1651b5ad Fix SELECTIVE_BUILD=COLLECT build under sh (#4108)
SEAPI build fails with `pushd: not found`
2021-02-02 14:50:06 +03:00
Gladilov, Gleb
1f707610d6 [IE][nGraph][VPU]: Enables DTS for Loop (#3838)
* [IE][nGraph]: Enables const overload for SubGraphOp::get_function
* [IE][nGraph]: Deletes SubGraphOp copy constructor

SubGraphOp has clone_with_new_inputs function for
deep coping, while default copy constructor does
some kind of shallow one. In order to avoid
confusion, copy constructor is deleted since it's
unused anyway.

* [IE][nGraph]: Enables protected Loop copy constructor

Additional clone method is introduced in order to reuse
Loop::clone_with_new_inputs implementation.
Loop::clone_with_new_inputs implementation at the same
time is refactored, since there were extra job that
does not needed to be done there.

* [IE][VPU][nGraph]: Introduces StaticShapeLoop

StaticShapeLoop is a class derived from Loop
to override validate_and_infer_types method
in order to propagate upper-bounds through the
function instead of dynamic tensors.

It uses maximum_value estimation to get
upper-bound for iterations count in case if
it is dynamic.

* [IE][VPU][nGraph]: Refactors function validators in DTS

The same approach (nGraph operation to functor map) as
for DTS shape functors is used since validation is
operation type specific.

* [IE][VPU][nGraph]: Enables DTS for Loop

Only loops with inputs dynamic in batch
(iterations count) and static body are supported.
2021-02-02 13:06:34 +03:00
Mikhail Kozlov
6390d32c4c Fix write output blob for Windows (#4126) 2021-02-02 12:56:25 +03:00
Evgenya Stepyreva
f1ffe4f9fd nGraph value propagation (#3368)
* partial value and shape propagation

* TopK k propagation

* stylish commit

* style again

* Precalc Folding and broadcasting fix

* style

* Self review

* forgetting the unused values

* deleting unused variables

* Review

* self review

* disaster mistake fixed

* tests corrected

* mod to be inferred while creation

* LPT test fix

* tests fixes

* fix

* tests

* dynamic backend fix

* comments

* disable propagation
2021-02-02 12:03:56 +03:00
Bartosz Lesniewski
b97a986048 Remove ops from Layer Creator/ Node Converter - part 9 (#4019)
* remove variadicsplit op from layer creator

* remove reorgyolo op from layer creator

* remove psroipooling op from layer creator

* remove empty layer creator list and not used creator

* missing endline

* add reorgyolo case to ops missing in opset1

* remove trivial creators
2021-02-02 11:55:26 +03:00
Mateusz Tabaka
4e601eb315 Move Extension tests from ieFuncTests to cpuFuncTests (#3927)
* Move Extension tests from ieFuncTests to cpuFuncTests

* Move extension directory up
2021-02-02 11:55:14 +03:00
Maxim Andronov
c56f3cd170 [CPU] Fix NormalizeL2 + Multiply (#4047) 2021-02-02 11:43:35 +03:00
Andrey Zaytsev
235cd56e54 Feature/azaytsev/cherry picks from 2021 2 (#4069)
* Added info on DockerHub CI Framework

* Feature/azaytsev/change layout (#3295)

* Changes according to feedback comments

* Replaced @ref's with html links

* Fixed links, added a title page for installing from repos and images, fixed formatting issues

* Added links

* minor fix

* Added DL Streamer to the list of components installed by default

* Link fixes

* Link fixes

* ovms doc fix (#2988)

* added OpenVINO Model Server

* ovms doc fixes

Co-authored-by: Trawinski, Dariusz <dariusz.trawinski@intel.com>

* Updated openvino_docs.xml

* Added Intel® Iris® Xe Dedicated Graphics, naming convention info (#3523)

* Added Intel® Iris® Xe Dedicated Graphics, naming convention info

* Added GPU.0 GPU.1

* added info about Intel® Iris® Xe MAX Graphics drivers

* Feature/azaytsev/transition s3 bucket (#3609)

* Replaced https://download.01.org/ links with https://storage.openvinotoolkit.org/

* Fixed links
# Conflicts:
#	inference-engine/ie_bridges/java/samples/README.md

* Benchmarks 2021 2 (#3590)

* Initial changes

* Updates

* Updates

* Updates

* Fixed graph names

* minor fix

* Fixed link

* Implemented changes according to the review changes

* fixed links

* Updated Legal_Information.md according to review feedback

* Replaced  Uzel* UI-AR8 with Mustang-V100-MX8

* Feature/azaytsev/ovsa docs (#3627)

* Added ovsa_get_started.md

* Fixed formatting issues

* Fixed formatting issues

* Fixed formatting issues

* Fixed formatting issues

* Fixed formatting issues

* Fixed formatting issues

* Fixed formatting issues

* Updated the GSG topic, added a new image

* Formatting issues fixes

* Formatting issues fixes

* Formatting issues fixes

* Formatting issues fixes

* Formatting issues fixes

* Formatting issues fixes

* Formatting issues fixes

* Formatting issues fixes

* Formatting issues fixes

* Formatting issues fixes

* Formatting issues fixes

* Formatting issues fixes

* Formatting issues fixes

* Revert "Formatting issues fixes"

This reverts commit c6e6207431.

* Replaced to Security section

* doc fixes (#3626)

Co-authored-by: Nikolay Tyukaev <ntyukaev_lo@jenkins.inn.intel.com>
# Conflicts:
#	docs/IE_DG/network_state_intro.md

* fix latex formula (#3630)

Co-authored-by: Nikolay Tyukaev <ntyukaev_lo@jenkins.inn.intel.com>

* fix comments ngraph api 2021.2 (#3520)

* fix comments ngraph api

* remove whitespace

* fixes

Co-authored-by: Nikolay Tyukaev <ntyukaev_lo@jenkins.inn.intel.com>

* Feature/azaytsev/g api docs (#3731)

* Initial commit

* Added content

* Added new content for g-api documentation. Removed obsolete links through all docs

* Fixed layout

* Fixed layout

* Added new topics

* Added new info

* added a note

* Removed redundant .svg
# Conflicts:
#	docs/get_started/get_started_dl_workbench.md

* [Cherry-pick] DL Workbench cross-linking (#3488)

* Added links to MO and Benchmark App

* Changed wording

* Fixes a link

* fixed a link

* Changed the wording

* Links to WB

* Changed wording

* Changed wording

* Fixes

* Changes the wording

* Minor corrections

* Removed an extra point

* cherry-pick

* Added the doc

* More instructions and images

* Added slide

* Borders for screenshots

* fixes

* Fixes

* Added link to Benchmark app

* Replaced the image

* tiny fix

* tiny fix

* Fixed a typo

* Feature/azaytsev/g api docs (#3731)

* Initial commit

* Added content

* Added new content for g-api documentation. Removed obsolete links through all docs

* Fixed layout

* Fixed layout

* Added new topics

* Added new info

* added a note

* Removed redundant .svg

* Doc updates 2021 2 (#3749)

* Change the name of parameter tensorflow_use_custom_operations_config to transformations_config

* Fixed formatting

* Corrected MYRIAD plugin name

* Installation Guides formatting fixes

* Installation Guides formatting fixes

* Installation Guides formatting fixes

* Installation Guides formatting fixes

* Installation Guides formatting fixes

* Installation Guides formatting fixes

* Installation Guides formatting fixes

* Installation Guides formatting fixes

* Installation Guides formatting fixes

* Fixed link to Model Optimizer Extensibility

* Fixed link to Model Optimizer Extensibility

* Fixed link to Model Optimizer Extensibility

* Fixed link to Model Optimizer Extensibility

* Fixed link to Model Optimizer Extensibility

* Fixed formatting

* Fixed formatting

* Fixed formatting

* Fixed formatting

* Fixed formatting

* Fixed formatting

* Fixed formatting

* Fixed formatting

* Fixed formatting

* Fixed formatting

* Fixed formatting

* Updated IGS, added links to Get Started Guides

* Fixed links

* Fixed formatting issues

* Fixed formatting issues

* Fixed formatting issues

* Fixed formatting issues

* Move the Note to the proper place

* Removed optimization notice
# Conflicts:
#	docs/ops/detection/DetectionOutput_1.md

* minor fix

* Benchmark updates (#4041)

* Link fixes for 2021.2 benchmark page  (#4086)

* Benchmark updates

* Fixed links

Co-authored-by: Trawinski, Dariusz <dariusz.trawinski@intel.com>
Co-authored-by: Nikolay Tyukaev <nikolay.tyukaev@intel.com>
Co-authored-by: Nikolay Tyukaev <ntyukaev_lo@jenkins.inn.intel.com>
Co-authored-by: Alina Alborova <alina.alborova@intel.com>
2021-02-02 11:29:12 +03:00
Mateusz Tabaka
ecb6d8604e Add Add->Clamp->Div->Mul to HSwish fusion (#4027)
* Add Add->Clamp->Div->Mul to HSwish fusion

* use opset4 NS instead of op::v0, don't copy constants RT info

* use opset4 in tests
2021-02-02 11:12:21 +03:00
Jozef Daniecki
c1b0b03750 Convolution (#3922)
* Move Convolution and ConvolutionBackpropData ref impls into separate files.

* Add convolution unit tests.

* New convolution reference implementation.

* Remove unused convolution ref impl argument.

* Fix style.

* Revert "Remove unused convolution ref impl argument."

This reverts commit 739065d0d0.

* WA for arm-plugin: additional include with ConvolutionBackpropData.

* Style format in Convolution SLT CPU instantiation.

* Add 1D Convolution SLT CPU tests.

* Add Convolution Serialization SLT.

* Update source banners with 2021 date.

* Specification review.

* Readability improvement in padding detection.

* Refactoring regarding Tensor usage.

* Iteration over tensor slices made more readable.

* Code refactored to use only one convolution implementation.

3D convolution is used to compute also in 1D & 2D case (parameters,
inputs and filters shapes are adjusted accordingly).

* Removed Tensor abstraction.

* Name unnamed namespace as convolution_details.

* Refactoring: replaced std::next + negative index with std::prev.

* Specification refactoring.

* Revert "Name unnamed namespace as convolution_details."

This reverts commit cea526ec49.

* Added new convolution() overload.

* Fix legacy convolution() overload (needed for kmb-plugin).

* Reduced number of template type arguments in convolution ref impl.

* Added 'output' section in Convolution spec.

* Remove floating round type configuration.
2021-02-02 11:05:39 +03:00
Aleksandr Pertovsky
d754e9b311 [CPU] CumSum tensors with rank >= 6 support. (#3859) 2021-02-02 10:45:52 +03:00
Maxim Andronov
537179b235 [CPU] FakeQuantize decomposition (#3741) 2021-02-02 09:37:02 +03:00
Gleb Kazantaev
cca0d568e0 WrapType Improvements (#4040)
* Extended WrapType to consume multiple types; Added variadic wrap_type support

* Updated transformations to use wrap_type

* Fix BatchNormDecomposition

* Added tests
2021-02-02 09:27:05 +03:00
Michał Karzyński
3a86b3a17e Update ONNX dependency to v 1.8.1 (#4114) 2021-02-02 07:05:26 +03:00
Nikolay Tyukaev
0ecc360664 fix comments ngraph api - master (#3519)
* fix comments ngraph api

* remove whitespace

* fixes

Co-authored-by: Nikolay Tyukaev <ntyukaev_lo@jenkins.inn.intel.com>
2021-02-02 07:01:58 +03:00
Evgenya Stepyreva
a6ea479688 [DOC] ShapeInference.md update. slyalin comments (#3355) (#4104)
* [DOC] ShapeInference.md update. slyalin comments

* Apply suggestions from code review

Co-authored-by: Alina Alborova <alina.alborova@intel.com>

* Apply suggestions from code review

Co-authored-by: Alina Alborova <alina.alborova@intel.com>

* Update docs/IE_DG/ShapeInference.md

Co-authored-by: Alina Alborova <alina.alborova@intel.com>

Co-authored-by: Alina Alborova <alina.alborova@intel.com>
2021-02-01 23:52:54 +03:00
Alexander Zhogov
2457225e08 Azure CI: Disable nGraph Mac tests IE_CPU/GRUSequenceOp.onnx_model_gru* 2021-02-01 19:53:20 +03:00
Chenhu Wang
4570550636 [CPU] Interpolate node: 5d support for onnx_linear mode (#3471) 2021-02-01 19:25:57 +03:00
Gladilov, Gleb
79fa676e35 [IE][VPU]: Fixes Extract Dynamic Batch (#3978)
LCA (Least Common Ancestor) search procedure must
take sub-graph without external connections to be able
to count depths of nodes. Previously, just 2 steps of
removing external connections were executed (1 time for
top sub-graph and 1 time for bottom one). In case if
originally top sub-graph had no external connections,
but bottom one had, after removing external nodes from
bottom sub-graph, some of the nodes from top sub-graph
could became external. In order to prevent that, removing
external connections must always be a loop until no
external connections found in both top and bottom sub-graphs.

Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>
2021-02-01 16:43:04 +03:00
Nikolay Tyukaev
4aa6f6a168 docs copy code button (#4017)
* copy code button

* copy code button updates
2021-02-01 14:57:55 +03:00
Ewa Tusień
80781ff359 Add MVN-6 op to ONNX importer (#4012) 2021-02-01 12:39:39 +01:00
Eugeny Volosenkov
1a787cb3ba Re-implement caffe old-style extractors with extractor extensions (#3675)
* move crop extractor

* Add concat_ext.py

* Add roipooling_ext.py

* Add roipooling_ext

* Add scale extractor

* Add scale extractor

* Add bn_ext.py and dropout_ext.py

* Add bn_ext.py and dropout_ext.py

* Add bn_ext.py and dropout_ext.py

* Fix bn.ext.py

* Sort fix

* Fix bn_test.py

* rename to batchnorm_ext

* Add bn_ext

* Fix batchnorm_ext.py

* small fix

* Small fix
2021-02-01 13:17:17 +03:00
Anna Likholat
a6a5635a59 added log extractor for tf (#4090) 2021-02-01 11:26:03 +03:00
Anastasia Kuporosova
8cb25fdb98 [Python API] Support of FP16 blobs (#3893)
* [Python API] Support of FP16 blobs

* test_Blob refactoring

* support fp16 for exec_net.infer method

* add precisions

Co-authored-by: anastasia.kuporosova <akuporos@akuporos.inn.intel.com>
2021-02-01 09:12:32 +03:00
Sergey Lyubimtsev
abaf155b42 Prevent targets installation for 3rd party libs (mkl-dnn) (#4096) 2021-01-31 12:54:50 +03:00
Vitaliy Urusovskij
8abbfbc855 Design test config and integrate in CC tests (#4051) 2021-01-29 16:54:19 +03:00
Evgeny Lazarev
3669205a44 Added support for the MxNet op take (#4071) 2021-01-29 15:48:33 +03:00
Yury Gaydaychuk
7500bbd3b1 [CPU] ROIPooling with 1x1 pooled shape in bilinear mode fixed (#4020) 2021-01-29 15:09:39 +03:00
Vladislav Volkov
4b64c64c62 Suppressing warning about unused variables for selective build of MKLDNN plugin. (#4039) 2021-01-29 13:11:50 +03:00
Patryk Elszkowski
450f01280a [compare_function] compare ops attributes (#3966)
* [compare_function] compare ops attributes value by value

* Storage cleanup

* Add comparison for:
- SubGraphOpInputDescription
- SubGraphOpOutputDescription
- SpecialBodyPorts

* cleanup

* Report error on unhandled types

* Change comparison of floating-point to general approach

Co-authored-by: Patryk Elszkowski <patryk.elszkowki@intel.com>
2021-01-29 12:30:57 +03:00
Anton Chetverikov
6b54e738d7 Update operation attributes (#3814)
* Allign attribute values in spec

* Fix wrong attribute name in spec

* Add `get_boolean_attr` function

* Add get_type function

* Update conv attrs

* Update copyright year

* Add missed attrs, update copyright year

* Fix year in copyright

* Update ir parser for RegionYolo layer

* Remove wrong changes for BinaryConvolution

* Remove get_type function as it no more needed

* Update check for reduce ops

* Fix error in reduce attrs

* Update ir_engine to work with bool attrs

* Update DetectionOutput operation

* Update PSROIPooling

* remove redundant attrs from spec

* Update get_boolean_attr function

* Update Reduce operations

* Update DetectionOutput specification

* Update specification for missed attrs

* Apply comments

* Fixconst renumbering logic

* Fix typo

* Change default value to fix broken shape inference

* Add additional asserts

* Add comment

* model-optimizer/mo/utils/ir_reader/layer_to_class.py

* Sort imports

* Sort imports

* Update year in copyright

* Update const

* Remove changes from const restoring

* Rename function

* remove unnecessary changes

* model-optimizer/mo/front/extractor_test.py

* Fix year in copyright

* Add soft_get

* Fix exclude-pad attribute name for AvgPool operation

* Update exclude_pad attribute values

* Remove useless comment

* Update examples in specification

* Remove file added by mistake

* Resolve comments

* Resolve comments

* Add return value

* Allign global_pool attribute
2021-01-29 10:08:06 +03:00
Gorokhov Dmitriy
a8b921791e [CPU] Disabled input zero point fusing into fp32 Convolution (#4056) 2021-01-29 08:38:58 +03:00
Vladislav Volkov
a67a72084f -no-unused-XXX options added for selective build mode (#3702) 2021-01-29 06:53:42 +03:00
Ilya Churaev
2ebae7cf30 Introduce the Broker API to map original framework names to OV (#3800)
* Added tests

* Fixed tests

* Added tests to check addOutput method

* Added support of port names in the IR

* Update copyrights

* Deprecate tensor name

* Fixed comments

* Enabled functional tests for GPU, GNA and Myriad

* Fixed get_tensor().get_names()

* Added unit test to check tensor names

* Fixed code style

* Skip add output test for GNA

* Added serialization support

* Added PythonAPI

* Fixed tests

* Fixed tests

* Fixed typo

* Try to disable GNA test

* Fixed tests

* Removed unused variables

* Fixed tests

* Update documentation

* Fixed comment
2021-01-29 06:28:31 +03:00
Yury Gaydaychuk
b0f5a339e1 Proposal test uses special run() method to check exception throwing (#4062)
* proposal test uses special run() method to check exception throwing

* validate() removed from run()
2021-01-28 21:16:13 +03:00
Maksim Shabunin
08c4ac5372 Refactor install_openvino_dependencies script: extra options and cleanup (#3868)
* Refactor install_openvino_dependencies script: extra options and cleanup

* install_dependencies: added more python tools

* install_openvino_dependencies: extra OS checks

Verify consistency for future edits

* install_openvino_dependencies: clarify messages
2021-01-28 20:15:06 +03:00
Ilya Lavrenov
5f982ca6ac Removed obsolete ie_profiling.hpp (#4043) 2021-01-28 20:04:52 +03:00
Ilya Lavrenov
117c04def1 Fixed compilation of ngraph python on some compilers (#4015)
* Fixed compilation of ngraph python on some compilers

* Fixed ONNX importer dependencies compilation for gcc 5.4.0 and 5.5.0
2021-01-28 18:58:10 +03:00
Anton Romanov
17eff0cd04 Added copy tools dir for all OS (#4007) 2021-01-28 15:17:50 +03:00
Andrey Somsikov
81da815dd8 Add conditional compilation tests (#3996) 2021-01-28 13:27:07 +03:00
Ilya Lavrenov
78585c2fe8 Updated readme.md (#4052) 2021-01-28 12:05:19 +03:00
Yury Gaydaychuk
a1422a49d7 [CPU] PSROIPooling node enhancements (#3851)
- bf support for PSROIPooling
- nhwc, blocking formats support
- code refactor & performance improvements
- cpu specific tests
2021-01-28 11:55:54 +03:00
Edward Shogulin
46f0775c09 [LPT] Add NormalizeDequantization function in NetworkHelper (#3458)
* [LPT] Add NormalizeDequantization function in NetworkHelper.

* [LPT] Handling subtract constant index in makeDequantization

* [LPT] Extend Add and Multiply transformations with normalizeDequantization.

* [LPT] Add/Subtract simplify normalizeDequantization call

* [LPT] normalizeDequantization: usage replace_node instead of copy assignment

* [LPT] Update lpt paths

* [LPT] normalizeDequantization completion + refactoring

Co-authored-by: Aleksandr Pertovsky <aleksandr.pertovsky@intel.com>
2021-01-28 11:30:52 +03:00
Aleksandr Pertovsky
885a493336 [LPT] Handle empty dequantization in MultiplyToGroupConvolution (#3818)
Add const
2021-01-28 11:23:30 +03:00
Ilya Lavrenov
f88840d500 Fixed compilation with ENABLE_V7_SERIALIZE (#4037) 2021-01-27 18:40:31 +03:00
Elizaveta Lobanova
65053df07c [GNA] Convolution without --disable_nhwc_to_nchw option for TF models. (#3918) 2021-01-27 17:15:34 +03:00
Andrey Dmitriev
1902e14ba0 [GNA] Fix import model with header version 2.1 (#4023)
[GNA] Fix import model with header version 2.1

Added fix version import

Added template test

Added test for backword compatibility

added test
2021-01-27 15:06:29 +03:00
Artyom Anokhov
344494a935 [Scripts] setupvars.bat: Added logic for passing '-pyver' option (#4026)
* setupvars.bat: Added logic for passing '-pyver' option as we already have in Linux* setupvars

* setupvars.bat: Fixed python_version name in echo
2021-01-27 12:51:55 +03:00
Mateusz Bencer
b90f908c58 Enable Bersquad-10 in ONNX CI (#3889) 2021-01-27 10:22:16 +01:00
Gleb Kazantaev
b6d9dba444 Generic LoadTime Optimizations (#4011)
* Updated container passes to return false to avoid excess function validation

* Added support for nested GraphRewrite registration

* Updated passes to use MatcherPass; Reorganized CommonOptimizations pipeline

* Disable node validation when graph is not modified
2021-01-27 11:53:11 +03:00
Alexey Suhov
68f2507811 [dependencies.cmake] Add license to tbb archive (#4018) 2021-01-27 00:33:27 +03:00
Vladislav Golubev
9371393311 [IE CLDNN] StridedSliceTransformation removed from GPU plugin (#4016) 2021-01-26 18:44:29 +03:00
Bartosz Sledz
247606baf6 Add support for nonconstant optional NMS-5 inputs (#3640) 2021-01-26 14:41:28 +01:00
Gorokhov Dmitriy
d58b4c65c8 [CPU] Plugin migration on oneDNN (v1.6) (#3725) 2021-01-26 16:31:10 +03:00
Mikhail Treskin
0284cd69a8 Remove Fake Quantize OP decomposition (#3506)
* Remove Fake Quantize OP decomposition

* Fix FQ OP inheritance
2021-01-26 14:53:31 +03:00
Andrey Dmitriev
9817b22295 [GNA] Fix ParseBlobName and message for output layer names (#3527) 2021-01-26 14:23:36 +03:00
Ilya Churaev
2931cabf44 Add a target to fetch and build Intel SEAPI (#3915) 2021-01-26 13:16:51 +03:00
Andrew Bakalin
0772bbd302 [IE COMMON] Fixes for EliminateUnsqueezeGather transformation (#4013) 2021-01-26 12:42:36 +03:00
Michał Karzyński
f76e1d9d56 Update ONNX build dependency to v 1.8 (#3716) 2021-01-26 10:37:06 +01:00
dependabot[bot]
c203e7e95f Bump tox from 3.20.1 to 3.21.2 in /ngraph/python (#4003) 2021-01-26 10:25:35 +01:00
Szymon Durawa
0791987491 Add Loop serialization, SLT and regular test. (#3980)
* Add Loop serialization, SLT and regular test.

* Remove loop test from SerializationTensorIteratorTest, add bin for test loop xml.

* Remove metadata section from loop xml file.

* Remove m_num_iterations initialization, it is done during validate_and_infer_types().
2021-01-26 12:25:06 +03:00
Nikolay Shchegolev
245bc33e8a [CPU] GatherElements implementation. (#3860) 2021-01-26 09:53:20 +03:00
Mateusz Tabaka
d5aa6d4fa1 Move ClampFusion before HSwishFusion and HSigmoidFusion (#3994)
HSwishFusion and HSigmoidFusion use Clamp in their patterns,
so that change allows for even more fusions.
2021-01-25 22:36:47 +03:00
Andrew Bakalin
09e2231720 [IE Common][VPU]: Fix small input size inference for dynamic model (#3847)
* eliminate Unsqueeze+Gather pair, when Gather gathers data by 1 dimension which was previously added by Unsqueeze which is actually doing nothing.
* calculate K only once in StaticShapeTopK. The problem happens when we have ShapeOf->Concat->ReduceMin subgraph for K evaluation. If we have a pretty small input size, the value that we received from ShapeOf may be less than one that it is concatenated with (e.g. ShapeOf 283 vs const 300), so ReduceMin returns 283. After ShapeOf elimination we don't have a chance to propagate 283 so we get 300 as a result and shape inference fail then. There are no problems with bigger input sizes just because ShapeOf always propagates value >300 and there are no such mismatch.
2021-01-25 19:17:32 +03:00
Sergey Lyubimtsev
ce0537bd1f [CMake] Fixes for TBB tmp location (#3997)
* fixes for TBB tmp location:

- DL_SDK_TEMP path is not normalized, that leads to paths check mismatch in CMake conditions
- TBB is not downloaded again in a case tmp location is cleaned up and build restarted (TBB_DIR and TBBROOT are cache variables)

* use reset_deps_cache & update_deps_cache for TBB_DIR var.

* single  reset_deps_cache call
2021-01-25 19:06:12 +03:00
Edward Shogulin
cb266db570 [LPT] Disabling failed on GPU LPT StridedSlice plugin tests (#4001) 2021-01-25 18:13:42 +03:00
Szymon Durawa
0157800887 Remove layerCreator for logical ops. (#3970)
* Remove layerCreator for logical ops.

* Remove visit_attributes() for LogicalOr op.
2021-01-25 15:17:56 +03:00
Pavel Esir
efa5b6063a [nGraph] Fix bound check for reference GatherElements (#3981)
* fix bound check for reference GatherElements

* apply review comments
2021-01-25 15:10:52 +03:00
Jan Iwaszkiewicz
647104f602 [nGraph][ONNX] WA for currently unsupported precisions (#3964) 2021-01-25 13:08:15 +01:00
Irina Efode
aa775cc0a1 [IE TESTS] Remove TEST_P(Range... from lib with shared_classes (#3999) 2021-01-25 14:45:05 +03:00
Anton Chetverikov
a4f28ffe3e Fix restoring constant ops with old numbering (#3951)
* Add check to correct restoring constant ops with old numbering

* Resolve comments

* Update comment
2021-01-25 14:41:30 +03:00
Piotr Szmelczynski
96b2ffa9ab Revise topk (#3819)
* Add visit_attribute and node validation check

* add type_prop test for default values

* style-apply

* Update node validation check for index_element_type

* Update type_prop test for default index_element_type

* Add index_element_type attribute to TopK_1 spec
2021-01-25 14:19:59 +03:00
Irina Efode
d3f0242f58 [IE TESTS] Remove random weights generation of blobs (#3998) 2021-01-25 14:09:45 +03:00
Ilya Lavrenov
8311b98222 Pre-deprecation of ICNNNetwork (#3887)
* Deprecated ICNNNetwork

* MKLDNN plugin: partially

* MYRIAD plugin: partially

* Fixed Myriad Plugin

* Improved GNA; fixed MKLDNN

* Fixed tests

* Fixed GNA

* Fixed unit tests linkage

* Removed ICNNNetwork from tests

* Removed obsolete tests
2021-01-25 14:09:03 +03:00
Sergey Lyubimtsev
298506fb14 Demo scripts improvements. (#3954)
* Demo script improvements.

 - Detect Visual Studio version installed into not-default location
 - Fix change directory for a case VS and OpenVINO resideds on different disks
 - Align indents

* fix indents
2021-01-25 12:23:07 +03:00
Bartosz Lesniewski
a7de2e7214 Remove ops from Layer Creator/ Node Converter - part 8 (#3979)
* remove equal op from layer creator

* remove greaterequal op from layer creator

* remove lstmcell op from layer creator

* remove psroipooling op from layer creator

* add missing newline

* alignment
2021-01-25 11:55:47 +03:00
Vladimir Paramuzov
a161ac35a0 [IE CLDNN] Disabled eltwise fusion to const node when second input is in data flow (#3993) 2021-01-25 10:34:18 +03:00
Vladimir Paramuzov
32ee3b9ac5 [IE CLDNN] Disabled v3 -> v1 conversion for Broadcast (#3991) 2021-01-25 10:24:53 +03:00
Bartek Szmelczynski
cdb9edddfc Missing attr seriazliation (#3920)
* add override method for int since attribute keep_top_k from detection_output requires it

* remove if statement to prevent gtest tests duplicate names for avg_pool

* add single layer tests for seriazliation for AvgPool, PriorBoxClustered and DetectionOutput operators

* add apropiate styling of the code
2021-01-25 08:42:22 +03:00
iliya mironov
c083e7fb63 Imironov/ref ngraph ctc gready decoder (#3867)
* Add ctc gready decoder sec len op to ngraph

* Remove some comments

* Add second constructor

* Fix code style

* Fix code style

* Add unit tests

* Add tests to cmake

* Fix according to review

* Fix code style

* fix

* Change input layoyt

* Fix code style

* Add unit tests

* Add 3 input tensor check

* Update shell impl

* Fix code style

* Fix code style

* Add doxy gen

* Fix code style

* Update doxigen

* Update constructor description

* Fix code style

* Refactoring code

* fix code style

* Optimize op constructor

* Add macros. Optimize code for validate_and_infer_types

* Refactoring code

* Fix code style

* Fix code style

* Fix check blanck_index shape

* Fix code style

* Add ref impl

* Fix unit test for dynemic case

* Fix code style

* Fix copyryting

* reverse changes

* Update copyrite

* Add ref implemintation

* rollback

* Fix code style

* Fix code style

* Fix

* Add unit tests

* Refactoring ref impl

* Refactoring code style

* Fix code style

* Fix code style

* fix unit tests

* Refactoring code

* Refactoring code

* Fix code style

* Refactoring unit tests

* Fix style

* Fix style
2021-01-25 08:19:03 +03:00
Gleb Kazantaev
94b2cc1dad Python API For compare_functions (#3938)
* Added python API for compare_functions

* Fixed compare_funcion constant comparision, graph traversal

* Add tests for python API functions

* Move CompareNetworks to separate python module

* Update python API tests

* Added dev package support

* ENABLE_TESTS

* Update constant comparator

* Fix merge conflict
2021-01-22 23:37:50 +03:00
Vladislav Golubev
2d39555191 ConcatTransformation naming fix (#3965)
* concat naming fix

* [LPT] concat with child and output plugin tests
2021-01-22 23:02:16 +03:00
Nikolay Tyukaev
c3347e1788 delete unwanted doc script (#3960) 2021-01-22 22:17:17 +03:00
Ilya Lavrenov
9cfe909e1e Unused variables (#3963)
* Added -Wused-variable flag

* Fixes for clang compiler

* Removed wrong -Wno-error from protobuf compilation

* More fixes
2021-01-22 17:41:15 +03:00
Jozef Daniecki
86bf2c2bba Add missing types in convertIE2nGraphPrc() test util function. (#3957) 2021-01-22 16:29:09 +03:00
Szymon Durawa
49cd55a5cc Visitor api loop deserialization (#3894)
* Add on_adpater() implementation for special body parts.

* Remove NodeConverter and LayerCreator for Loop. Add WA for different number of inputs during Loop init by constructor and visit_attributes().

* Format files.

* Implement use case external_port_id=-1 for output port_map,change API for map_type_in_function.

* Replace GetStrAttr() with GetInt64Attr().

* Correct WA for input_offset when using visitorAPI. It shall search all input descriptions for duplicated indexes.

* Apply proper file format.

* Throw exception when input_offset < 0.

* Add more detailed description for input_offset WA.
2021-01-22 14:39:38 +03:00
Piotr Szmelczynski
d2ef8bf2f9 Revise reduce mean (#3786)
* Update spec

* create type_prop tests

* add reduce_mean type_prop tests to CMakeList

* Update spec

* fix typo

* Add dynamic type_prop tests

* style fix
2021-01-22 14:21:39 +03:00
Piotr Szmelczynski
e346bdde14 Maxpool fix bug (#3718)
* style-apply

* Update spec

* Remove maxpool back_prop method

* style-apply
2021-01-22 14:19:34 +03:00
Ilya Lavrenov
1044ed4352 Added export / import for Template and Hetero plugins (#3940)
* Added export / import for Template and Hetero plugins

* Added WA for Apple RTTI
2021-01-22 14:17:44 +03:00
Patryk Elszkowski
cce0328947 Cleanup in ngraph_test_utils.hpp/cpp (#3959)
Co-authored-by: Patryk Elszkowski <patryk.elszkowki@intel.com>
2021-01-22 13:02:33 +03:00
Patryk Elszkowski
5993383e31 [BUG] Serialize loses runtime info (#3903)
* rt_info serialization for ngraph::Node

* add test for it info serialization

* try to fix centos build

Co-authored-by: Patryk Elszkowski <patryk.elszkowki@intel.com>
2021-01-22 10:58:51 +03:00
Bartosz Lesniewski
9a5267f47b Remove ops from Layer Creator/ Node Converter - part 7 (#3961)
* remove result op from layer creator

* remove squareddifference op from layer creator

* remove regionyolo op from layer creator

* fix indentation
2021-01-22 06:15:33 +03:00
Maxim Vafin
71253153ac Add MVN-6 reference implementation and tests (#3896)
* Add MVN-6 reference implementation and tests

* Return old version reference

* Apply feedback

* Fix build
2021-01-21 21:08:32 +03:00
Ilya Lavrenov
4f932ade9d Fixed CVS-47220 (#3958) 2021-01-21 20:44:12 +03:00
Piotr Szmelczynski
9857f6368d Revise abs (#3931)
* remove type_prop test file for abs operator

* add abs operator to unary_ops

* remove abs type_prop from CMakeList
2021-01-21 18:58:21 +03:00
Vladimir Gavrilov
31dec9addf Implement ExperimentalDetectronTopKROIs and ExperimentalDetectronGenerateProposalsSingleImage operations as nGraph operations (#3680)
* Commit.

* Written the header file for the nGraph operation ExperimentalDetectronTopKROIs.

* Written an implementation file of the nGraph operation ExperimentalDetectronTopKROIs.

* Small fix.

* Added the nGraph operation ExperimentalDetectronTopKROIs into the table of ops of opset6.

* Written the header file for the nGraph operation ExperimentalDetectronGenerateProposalsSingleImage.

* Code style fix.

* Written cpp-file of the nGraph operation ExperimentalDetectronGenerateProposalsSingleImage.

* Now the operation ExperimentalDetectronGenerateProposalsSingleImage is read as nGraph operation.

* Code style fix.

* Fix in ngraph/ops.hpp

* Added NGRAPH_OP_SCOPE to the nGraph class ExperimentalDetectronGenerateProposalsSingleImage.

* Added NGRAPH_OP_SCOPE to the nGraph class ExperimentalDetectronTopKROIs.

* Code style fix.

* Small fix.

* Added NGraphReshapeTests of ExperimentalDetectronGenerateProposalsSingleImage when ExperimentalDetectronGenerateProposalsSingleImage is considered as opset6 operation.

* Changed copyright year to 2021.

* Deleted the method ExperimentalDetectronTopKROIs::set_max_rois.

* Deleted redundant virtual.

* Now ExperimentalDetectronTopKROIs::validate_and_infer_types() handles all cases when input 0 and input 1 have static/dynamic rank independently.

* Code style fix.

* Small fix.

* Started to write shape infer tests for the nGraph operation ExperimentalDetectronTopKROIs.

* Written shape infer tests for the nGraph operation ExperimentalDetectronTopKROIs.

* Code style fix.

* Added checks of input shapes into ExperimentalDetectronGenerateProposalsSingleImage::validate_and_infer_types(). Started to write tests for ExperimentalDetectronGenerateProposalsSingleImage::validate_and_infer_types().

* Small fix.

* Fixes in ExperimentalDetectronGenerateProposalsSingleImage::validate_and_infer_types(). Written draft tests for ExperimentalDetectronGenerateProposalsSingleImage::validate_and_infer_types().

* Code style fix.

* Fixes in reshape tests for ExperimentalDetectronGenerateProposalsSingleImage.

* Added Doxygen documentation to the nGraph operation class ExperimentalDetectronGenerateProposalsSingleImage.

* Deleted methods validate_scores_shape and validate_deltas_shape of op::v6::ExperimentalDetectronGenerateProposalsSingleImage.

* Deleted methods validate_input_rois_shape and validate_rois_probs_shape of op::v6::ExperimentalDetectronTopKROIs.

* Added class descriftion for nGraph operations ExperimentalDetectronTopKROIs and ExperimentalDetectronGenerateProposalsSingleImage.
2021-01-21 18:55:29 +03:00
Roman Kazantsev
bacb8420f0 [MO] Implement TensorFlow 2 While and Keras RNN support in MO (#3573)
* [MO] Implement TensorFlow 2 While support in MO

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

* Add extractors for both While and StatelessWhile and do minor changes

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

* Improve update_body_graph function and manage graph names properly

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

* Fix a map for original name of parameters from body and cond

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

* Implement draft version of support of TF2 Keras RNN

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

* Implement Keras LSTM and GRU support in MO

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

* Improve code for Keras RNN support

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

* Finalize implementation of TF2 Keras RNN support in MO

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

* Apply the first part of the comments after review #1

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

* Avoid use of explicit values of port indices in the transformation

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

* Finalize code after the first-round review

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

* Apply comments after the second-round review

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2021-01-21 17:39:57 +03:00
Ilya Lavrenov
61ccde700f Refactored VPU tests not to use old interfaces (#3888)
* Refactored VPU tests not to use old interfaces

* Added except of exceptions

* Commented failing part of HDDL tests
2021-01-21 15:05:12 +03:00
Svetlana Dolinina
05d97fa24a Fixed issue with run stateful network with several infer requests on MKLDNNPlugin (#3711) 2021-01-21 15:01:03 +03:00
Ilya Churaev
88b200ea5b Don't add a new Result operation if output port is already connected to Result (#3934) 2021-01-21 13:42:32 +03:00
Patryk Elszkowski
187813a3f6 [BUG]Add extra op clone to have default inputs/outputs set. (#3855)
* Add extra op clone to have default inputs/outputs set.

* Call `validate_and_infer_types` after clone for TensorIterator and Loop

* Add gtest to check if default values works with dynamic shapes

* Apply suggestions from PR.

Co-authored-by: Patryk Elszkowski <patryk.elszkowki@intel.com>
2021-01-21 13:02:21 +03:00
Anastasia Kazantaeva
afb32262c1 Update OV telemetry message for 2021.3 (#3926)
* Update OV telemetry message for 2021.3

* Fixed missprint
2021-01-21 12:48:33 +03:00
Victor Kuznetsov
1217d26f2f rename time test config (#3923) 2021-01-21 12:32:15 +03:00
Gleb Kazantaev
08eea31f45 Remove deprecated classes/methods usage from Legacy/Tests/VPUPlugin (#3907)
* Fix legacy converter for Mul/Add/Sub ops

* Updated VPU plugin to use pass_config;Updated tests to avoid legacy classes/methods

* Updated VPU pipeline
2021-01-21 12:06:07 +03:00
Mateusz Tabaka
c6c1503ba1 Add PadFusion transformation (#3785)
* Add PadFusion transformation

Ticket: 46482

* set pad explicit

* fuse ifs

* address review comments

* fix signed to unsigned comparison warning

* add MATCHER_SCOPE
2021-01-21 11:58:00 +03:00
Gleb Kazantaev
8d345a78de Added SubGraphOp support in compare_function (#3943) 2021-01-21 11:23:09 +03:00
Ilya Znamenskiy
72c3e0e4a6 [IE CLDNN] Convolution fsv16 improvements several fixes after code review (#3637) 2021-01-21 11:06:43 +03:00
Mateusz Bencer
d4f774f3c7 update manifest (#3939) 2021-01-21 09:06:11 +01:00
Irina Efode
a3234593db [IE TESTS] Fix passrate in report (#3904)
* [IE TESTS] Fix passrate in report

* add skip
2021-01-21 11:05:10 +03:00
Sergey Shlyapnikov
573a13b252 [IE CLDNN] Kernel Selector improvements (#2998) 2021-01-21 11:04:00 +03:00
Gabriele Galiero Casay
e026d54ed2 Develop ConvertLike Reference Implementation (#3857)
* ConvertLike: Develop reference implementation

* ConvertLike: Enable single layer tests for GPU plugin

* ConvertLike: Enable bf16 precision for evaluate method

* ConvertLike: Add unit tests

* ConvertLike: Add dynamic shape test case

* ConvertLike: Remove unnecessary ngraph namespace and using declaration for v1::ConvertLike

* ConvertLike: Simplified reference::convert by using std::enable_if
2021-01-21 08:31:10 +03:00
Vladislav Golubev
ef72e21213 [LPT] StridedSlice Transformation (#3817)
* [nGraph] evaluate_strided_slice: replace read_vec to host_tensor_2_vec

* [LPT] StridedSliceTransformation
2021-01-21 00:15:37 +03:00
Vladislav Vinogradov
bad4e97d9b Extend and fix input/output precisions support in functional tests (#3933)
* Use actual blobs type to get nGraph element type,
  when generating inputs and calculating reference results.
  It will allow to run tests with `undefined` preset and
  use real type, returned from the device to generate and process input.
  It also fixes the case with several inputs with different type.
* Extend `convertOutputPrecision` function to fully support
  conversions from/to fp16/bf16 types.
  The device might return blobs in that formats, so they need to be
  supported by the testing framework.
2021-01-20 20:08:33 +03:00
Mateusz Tabaka
d4488b9dfc Add ReluFakeQuantize transformation (#3811)
* Add ReluFakeQuantize transformation

* address review comments

* replace constant with any_input

* use MATCHER_SCOPE macro
2021-01-20 18:50:19 +03:00
Ilya Znamenskiy
33005b7741 [IE CLDNN] Convolution b_fs_zyx_fsv16_imad tuning improvements (#3011) 2021-01-20 18:36:46 +03:00
Vladimir Gavrilov
318db6eccc Implement ExperimentalDetectronROIFeatureExtractor operation as nGraph op (#3739)
* Commit.

* Written the header file of the nGraph operation ExperimentalDetectronROIFeatureExtractor.

* Started to write cpp-file for the nGraph operation ExperimentalDetectronROIFeatureExtractor.

* Deleted in_ports_count attribute for the MO operation ExperimentalDetectronROIFeatureExtractor.

* Written validate_and_infer_type() method of ngraph::op::v6::ExperimentalDetectronROIFeatureExtractor.

* Code style fixes.

* Code style fixes.

* Small fixes.

* Code style fixes.

* Now operation ExperimentalDetectronROIFeatureExtractor is read as nGraph operation ExperimentalDetectronROIFeatureExtractor.

* Implemented op::v6::ExperimentalDetectronROIFeatureExtractor::clone_with_new_inputs().

* Added macro NGRAPH_OP_SCOPE to the cpp-file of the nGraph operation ExperimentalDetectronROIFeatureExtractor.

* Fixes in some tests.

* Code style fix.

* Fixed yet another test for ExperimentalDetectronROIFeatureExtractor.

* Added tests for reading ExperimentalDetectronROIFeatureExtractor as operation from opset6.

* Added more test for reading ExperimentalDetectronROIFeatureExtractor as operation from opset6.

* Started to write shape infer tests for the nGraph operation ExperimentalDetectronROIFeatureExtractor.

* Corrected ngraph/test/CMakeLists.txt.

* Small changes.

* Code style fix.

* Small fixes.

* Added ctor of ExperimentalDetectronROIFeatureExtractor with NodeVector as argument.

* Added setting the attribute in_ports_count when the MO operation ExperimentalDetectronROIFeatureExtractor is creating in the MO transformation ONNXMaskRCNNTransformation.

* Added shape infer for the second output of the nGraph operation ExperimentalDetectronROIFeatureExtractor.

* Written shape infer tests for nGraph operation ExperimentalDetectronROIFeatureExtractor (case when input shapes are partially dynamic).

* Small fixes.

* Code style fix.

* Deleted redundant &expected_channels.

* Code style fix.

* Small refactoring.

* Small fixes.

* Small changes.

* Small fixes.

* Deleted attribute distribute_rois_between_levels of ExperimentalDetectronROIFeatureExtractoe.

* Deleted attribute preserve_rois_order of ExperimentalDetectronROIFeatureExtractoe.

* Deleted attribute image_id of ExperimentalDetectronROIFeatureExtractoe.

* Now MO generates attribute 'aligned' of ExperimentalDetectronROIFeatureExtractor only with values 'true' or 'false'.

* Small fix.

* Fix in the conversion of the attribute 'aligned' of MO operation ExperimentalDetectronROIFeatureExtractor to string.

* Tabs were replaced by spaces in some XMLs.

* Tabs were replaced by spaces in ngraph_reshape_tests.cpp.

* Fixed copyrights.

* Applied small patch to IREngine from PR https://github.com/openvinotoolkit/openvino/pull/3814.

* Tabs were replaced by spaces in cnn_ngraph_impl_tests.cpp.

* op::v6::ExperimentalDetectronROIFeatureExtractor::validate_and_infer_types() was rewritten using operator & for channels.

* Added tests for input shapes of op::v6::ExperimentalDetectronROIFeatureExtractor in the case when inputs shapes consist of intervals.

* Fixes in test type_prop.detectron_roi_feature_extractor_intervals.
2021-01-20 16:20:54 +03:00
Alexander Perepelkin
562e01843f Fix virtual inheritance for class PadLayerTest (#3912) 2021-01-20 15:17:25 +03:00
Alexander Zhogov
cbc77f7b7d Azure CI: Add install (#3876)
* Azure CI: Add install
2021-01-20 14:28:51 +03:00
Andrey Sokolov
db5cd6751d [IE][VPU][Tests]: Fix ROIPooling test (#3705)
* fix initialization bug of spatial_scale in tests (affected input generating)
* fix input generating for bilinear ROI Pooling
* correct parameters for myriad tests:
    * myriad plugin does not support batch for this layer;
    * decrease threshold since myriad uses fp16 calculations
2021-01-20 14:17:19 +03:00
Gleb Kazantaev
278773945c Added PythonAPI For LowLatency Transformation (#3910) 2021-01-20 13:29:02 +03:00
Andrew Bakalin
7c4f435335 [IE][VPU][Tests]: Support DTS for GatherElements (#3688)
* Support DTS for GatherElements
* Extract GatherBase to a common part
* Introduce tests on inference
* Introduce tests on function comparing
* Disable failing tests
2021-01-20 12:16:46 +03:00
Andrey Sokolov
e08ad2989e [IE][VPU]: Fix buffer size calculation bug (#3825) 2021-01-20 12:07:06 +03:00
Yury Gaydaychuk
1aeb7fb089 [CPU] ROIAlign: fixed misprint in input width value (#3853) 2021-01-20 11:16:02 +03:00
Mateusz Bencer
4e33dac7fa Set output blobs precision for IE tests (#3905)
* Calling SetPrecission on cnn network outputs

* added tests

* get_output_name refactor

* add missing test file

* run tests on all backends (or disable if backend is not available)

* fixed tests

* fixed TestEngine
2021-01-20 10:26:41 +03:00
Gleb Kazantaev
a5c6ed8e03 Fixed import module name (#3906) 2021-01-19 19:36:07 +03:00
Vitaliy Urusovskij
1e858830e2 Change json.loads to json.load for --db_metadata (#3871) 2021-01-19 18:33:00 +03:00
Maksim Kutakov
21e17dad4f [IE TESTS][CPU] I8 and U8 precisions was enabled in the reverse sequence single layer test. (#3722) 2021-01-19 17:04:12 +03:00
Tomasz Jankowski
35384a63a6 [nGraph][ONNX] Extend ONNX Importer for operation "GatherElements-6" (#3822) 2021-01-19 14:42:24 +01:00
Ilya Lavrenov
7e54cdba15 Fixed cmake 'message' for multiple arguments (#3901) 2021-01-19 15:35:31 +03:00
Szymon Durawa
4f5230bb03 Visitor api ti serialization (#3777)
* Add on_adapter(Function) for serialization.

* Add port_map and back_edges serialization.

* Add 2  unit tests for TI serialization.

* Convert lambda expression into function pointer.

* Add single layer test for tensor iterator.

* Add limitation for file name length during serialization.

* Add file name length limitation for Serialize().

* Add WA for LSTMCell v0 in serialize class, new test class for TI serialization with dynamic weights, add bin path to SerializationParams, replace call to ngfunction_2_irv10 with visitor.on_attribute().

* Remove hacks for TI from ngfunction_2_irv10(), validate buffers in port_map.

* Changed year in new added test files.

* Add check for version of LSTMv0 WA, add assert for model read from file.

* Remove append_copy for xml Function, changed comparison for LSTMvo WA.

* Update second WA for LSTMCell v0 with version check.

* Remove find_child when searching for port_map and back_edges.
2021-01-19 15:26:29 +03:00
Sergey Shlyapnikov
f7e0d90292 [IE CLDNN] Eltwise b_fs_yx_fsv16 mixed presicion support (#3734) 2021-01-19 15:17:03 +03:00
Sergey Shlyapnikov
559b509b15 [IE CLDNN] Change memory reset rules (#2909) 2021-01-19 15:15:24 +03:00
Vladimir Paramuzov
e9775c1023 [IE CLDNN] Added missing pointer type case for blocked read (#3866) 2021-01-19 14:17:50 +03:00
Ilya Churaev
94b98c484c Fix nGraph doxygen for master (#3899)
* Changed style of some headers

* Fixed shared buffer

* Remove chrome_trace

* Fixed comment
2021-01-19 13:39:32 +03:00
Vladimir Paramuzov
9cc58fc66a [IE CLDNN] Changed weights layout used in the plugin (#3858)
Before this patch constant with weights could be not detected if
it wasn't directly connected to Conv/Deconv layer.
Now weights always uses common data format (bfzyx) in the plugin which is
converted into weights format later (goiyx, oiyx, etc), so weights sub-graph
can now contain anything
2021-01-19 13:06:20 +03:00
Vladislav Vinogradov
e88de8f822 Fix signed/unsigned comparison warnings (#3900)
They are treated as error, which leads to build failure.
Tested on Ubuntu 20.04, gcc 9.3.0.
2021-01-19 12:55:15 +03:00
Maksim Kutakov
c20c3a9e3d [IE TESTS][CPU] Fusing tests added to the CPU specific single layer tests. (#3015) 2021-01-19 11:51:08 +03:00
Nikita Kudriavtsev
ab66eab652 [IE][VPU][DTS]: shrink mask support for StridedSlice and test (#3835) 2021-01-19 11:46:59 +03:00
Gorokhov Dmitriy
2bfc941cf1 [CPU] Runtime precision for execution graph (#3886) 2021-01-19 11:25:28 +03:00
Ilya Churaev
e82018221c Added CC macro to transformations (#3795)
* Added CC macro to transformations

* Fixed typo

* Added MATCHER_SCOPE

* Fixed review comments

* Try to remove MATCHER_CALLBACK_SCOPE

* Fixed matcher name

* Fixed MATCHER_SCOPE

* Added documentation

* Fixed typo

* Fixed CC for linux

* Fixed names

* Fixed docs

* Fixed typo

* FIxed comments

* Add more CC macros
2021-01-19 10:19:25 +03:00
Vladislav Volkov
3baa305e0a Improvements for subnormal floats zeroing in CPU plugin (#3797) 2021-01-19 09:58:30 +03:00
Ilya Lavrenov
f3f1b7002d Deprecated IVariableState interface (#3884) 2021-01-18 16:58:35 +03:00
Mateusz Bencer
4d98d7ceee ONNX tests mismatch error (#3836) 2021-01-18 12:39:32 +01:00
Ilya Lavrenov
cc1e8b9146 Fixed -Wall warnings on ARM build (#3885) 2021-01-18 13:59:28 +03:00
Bartosz Sledz
928201bee4 Add support for ONNX Operator ReduceSum v13 and revise other Reduce operators (#3605) 2021-01-18 10:47:40 +01:00
Vladimir Gavrilov
e20a58d770 Implement ExperimentalDetectronDetectionOutput and ExperimentalDetectronPriorGridGenerator operations as nGraph ops (#3374)
* Commit.

* Started to write nGraph operation ExperimentalDetectronDetectionOutput. Written draft of the header file.

* Written draft of the cpp-file for nGraph operation ExperimentalDetectronDetectionOutput.

* Small fix.

* Added reading of ExperimentalDetectronDetectionOutput as nGraph operation.

* Some fix.

* Unregistered old shape infer function of the operation ExperimentalDetectronDetectionOutput.

* Written the header file for the operation ExperimentalDetectronPriorGridGenerator.

* Small refactoring.

* Small fix.

* Added set_output_size(3) into op::ExperimentalDetectronDetectionOutput::validate_and_infer_types().

* Added check for number of inputs of ExperimentalDetectronDetectionOutput.

* Reverted some changes.

* Changed IR for ExperimentalDetectronDetectionOutput serialization test.

* Written cpp-file of nGraph operation ExperimentalDetectronPriorGridGenerator.

* Small fix.

* Some fixes.

* Fixes in type and shape infer functions of the MO operation ExperimentalDetectronDetectionOutput.

* Now ExperimentalDetectronPriorGridGenerator is readed as nGraph operation.

* Fixed the infer function of the nGraph operation ExperimentalDetectronPriorGridGenerator.

* Started to write tests for the shape infer function of the nGraph operation ExperimentalDetectronDetectionOutput.

* Written the draft of the test for the shape infer function of the nGraph operation ExperimentalDetectronDetectionOutput.

* Small fix.

* Fixed ngraph/test/CMakeLists.txt.

* Started to write tests for the shape infer function of the nGraph operation ExperimentalDetectronPriorGridGenerator.

* Now the shape infer function of the nGraph operation ExperimentalDetectronPriorGridGenerator performs correctly case dynamic input shapes with static ranks.

* Continued to write test for the nGraph operation ExperimentalDetectronPriorGridGenerator.

* Small fixes.

* Written tests for the shape infer function of the nGraph operation ExperimentalDetectronPriorGridGenerator (case when input shapes are partially dynamic).

* Added test for reading ExperimentalDetectronDetectionOutput as an operation from opset6.

* Some fixes.

* Added some debug outputs.

* Deleted inserted debug output.

* Small fixes.

* Small fix.

* Small fix.

* Small change.

* Added comments to attributes of ExperimentalDetectronDetectionOutput.

* Reverted changes.

* Deleted shape infer for output port 3.

* Small fixes.

* Deleted redundant keyword 'virtual'.

* Deleted redundant usings in header files of nGraph operations ExperimentalDetectronDetectionOutput and ExperimentalDetectronPriorGridGenerator.

* Some fixes.

* Small change.

* Now GridGenerator::validate takes three args (input partial shapes).

* Small fix.

* Deleted some usings.

* Small code style fix.

* Reverted changes in validate_and_infer_types() and validate() of op::v6::ExperimentalDetectronPriorGridGenerator.

* Added description of the class ExperimentalDetectronDetectionOutput.

* Added some comments into the header file of the nGraph operation ExperimentalDetectronPriorGridGenerator.

* Some fixes.

* Added some comments to the class of the nGraph operation ExperimentalDetectronPriorGridGenerator.

* Now the MO operation ExperimentalDetectronDetectionOutput has the attribute 'version' as 'opset6'.

* Now the MO operation ExperimentalDetectronPriorGridGenerator has the attribute 'version' as 'opset6'.

* Some fixes in the MO class ExperimentalDetectronDetectionOutput.

* Fixes in the shape infer function of the nGraph operation ExperimentalDetectronPriorGridGenerator.

* Renamed test XML model for ExperimentalDetectronDetectionOutput serialization tests.

* Added validation of input shapes for the nGraph operation ExperimentalDetectronDetectionOutput.

* Small fixes in the XML models for serialization testing of ExperimentalDetectronDetectionOutput.

* Added tests of shape infer function of the nGraph operation ExperimentalDetectronDetectionOutput for the case when input shapes are partially dynamic.

* Added tests of shape infer function of the nGraph operation ExperimentalDetectronDetectionOutput for the case when some input shapes have dynamic ranks.

* Small fixes.

* Small fix in the MO operation ExperimentalDetectronDetectionOutput shape infer function.

* Fixes in op::v6::ExperimentalDetectronDetectionOutput::validate_and_infer_types().

* Code style fix.

* Small refactoring.

* Added NGRAPH_OP_SCOPE into ExperimentalDetectronDetectionOutput nGraph class.

* Added NGRAPH_OP_SCOPE to the nGraph class ExperimentalDetectronPriorGridGenerator.

* Small fixes.

* Some refactoring.

* Small fix.

* Small fixes.

* Reverted some changes in ExperimentalDetectronDetectionOutput::validate_and_infer_type().

* Now VPU reads the attribute class_agnostic_box_regression of ExperimentalDetectronDetectionOutput as Bool.

* Now MO generates attribute  'class_agnostic_box_regression' of ExperimentalDetectronDetectionOutput only with values false or true.

* Small fix.

* Tabs were replaced by spaces in some XMLs.

* Fixed copyrights.

* Refactoring in op::v6::ExperimentalDetectronDetectionOutput::validate_and_infer_types().

* Refactoring in op::v6::ExperimentalDetectronPriorGridGenerator::validate_and_infer_types().

* Small fixes.

* Started to write ExperimentalDetectronPriorGridGenerator shape infer tests for the case when dynamic input dimensions are intervals.

* Deleted redundant 'return'.

* Written tests for interval values of input shapes of op::v6::ExperimentalDetectronPriorGridGenerator.

* Code style fix.

* Code style fix.
2021-01-18 12:16:40 +03:00
Alexander Perepelkin
f5085d3216 Enable calculation of reference data without prior run of infer request (#3856) 2021-01-18 12:12:07 +03:00
Ilya Lavrenov
fa599b25bb Proper cpplint target for object libraries (#3883) 2021-01-18 11:56:35 +03:00
Maxim Vafin
af5eccc6ae Add MVN-6 related transformations (#3710)
* Add MVN decomposition transformation

* Add MVN-1 to MVN-6 transformation

* Apply review feedback

* Apply review feedback

* Fix build

* Fix if statement and add 5D tests

* Apply review feedback

* Apply review feedback

* Apply feedback

* Revert "Apply feedback"

This reverts commit 039fefbff9.

* Apply review feedback

* Apply review feedback

* Fix build issue

* Apply review feedback

* Apply review feedback

* Apply feedback
2021-01-18 10:34:01 +03:00
Anton Chetverikov
d462626826 Update MO extensions enabling/disabling mechanism (#3873)
* Add id for NormalizeToNarmalizeL2 transformation

* Update copyright year

* Update extensions enabling/disabling mechanism

* Remove copyright change

* Copyright year

* Update documentation

* Revert missed year in copyright
2021-01-18 10:32:02 +03:00
Aleksandr Korolev
2117020cbb [IE][VPU]: changing condition in HW tiling (#3695) 2021-01-18 10:27:44 +03:00
Gleb Kazantaev
99b83e9238 Remove deprecated methods usage from transformation library (#3881)
* Remove deprecated methods usage from transformation library

* graph_rewrite_callback -> matcher_pass_callback

* Clean-up legacy library from deprecated methods usage

* Update func tests
2021-01-18 06:25:58 +03:00
Gleb Kazantaev
aa73eb2424 Offline transformation API (#3408)
* Added offline transformations library

* Added python API for calling MOCTransformations

* Added CF flag for MOC Transformations

* Divided offline api to separate independent module

* Update MOC pipeline to execute only fusions

* Disable CF for PriorBox ops

* Clean-up

* Added python test

* Removed transformation pipeline as it is not ready yet

* Remove not related to this PR changes

* Fixed build for dev package case; renamed to offline_transformations_api

* Removed unrelated changes

* Removed excess exports from cmake

* Removed useless custom command from cmake
2021-01-18 00:15:44 +03:00
Liubov Batanina
3a21c99b48 Replaced size_t with int64_t (#3744) 2021-01-16 00:39:01 +03:00
Tomasz Socha
8271c515f7 [ONNX Importer] move null_node to private scope (#3877) 2021-01-16 00:33:46 +03:00
Alexander Zhogov
6e5ef86dd1 Azure CI: Prepare for updating IB ver (#3085)
* Add install_ib_console.bat
2021-01-15 21:40:39 +03:00
Tomasz Dołbniak
52034a0613 ONNX model editor - replacing input shapes (#3844) 2021-01-15 17:26:44 +01:00
Ilya Lavrenov
567ef8a4f0 Fixed warnings generation for ngraph API (#3864) 2021-01-15 19:12:14 +03:00
Gabriele Galiero Casay
a555908858 Develop Bucketize Reference Implementation (#3693)
* Bucketize: Revise op class and add type_prop unit tests

* Bucketize: Develop reference implementation

* Bucketize: Add unit tests

* Bucketize: Add single layer test and cpu instantiation

* Bucketize: Add unit test with empty buckets for INTERPRETER

* Bucketize: Typo in buckets element type check

* Bucketize: Add custom generated inputs in single layer test class

* Bucketize: Use random_device to generate seed for data blob

* Bucketize: Remove unsupported f64 precision

* Bucketize: Add function description

* Bucketize: Remove randomness of inputs generation by using static seed

* Bucketize: Support different precisions for data and bucket inputs

* Bucketize: Refactor type_prop tests and improve backend unit test coverage
2021-01-15 17:51:58 +03:00
Maksim Makridin
a280a3abcc Adding docs for maacOS samples building (#3862) 2021-01-15 17:25:05 +03:00
Mateusz Tabaka
bab68b65c7 Add Clamp fusion transformation (#3756)
* Add Clamp fusion transformation

It fuses Maximum->Minimum subgraph to Clamp operator.

Ticket: 44783

* address review comments

* update year in headers
2021-01-15 17:11:45 +03:00
Krzysztof Bruniecki
00c57a3bdf Enable CNN2D tests for GNa Lib 2.1.0.1048 (#3529)
Enable tests including rectangular kernel and multiple kernels
  Pad filters to 16B
  Fix style space after if before ( needed
  Fix PRETTY_FUNCTION double def
  Fix canMatchWith1AsyncThread
  Fix ifdefs for gna 2.0
  Add and fix mock
  Simplify and fix condition for Rotate features
  Refine commnets in GNA CONV tests file
  Apply review, Refactor ConvolutionPrimitive
  Refine CNN enforce legacy
  Add debug print
  Move debug dump definitions
  Add new metric for GNA library version
  Add coments on FP32
2021-01-15 16:56:37 +03:00
Mateusz Tabaka
69af75e483 Allow FakeQuantize with output_low scalar to be transformed (#3812)
* Allow FakeQuantize with output_low scalar to be transformed

* add test case with scalar
2021-01-15 16:16:53 +03:00
Maksim Makridin
9211dc07bc Enhancing Object Detection Sample SSD C Sample docs to cover the use of ie_network_reshape() for setting the batch size (#3875) 2021-01-15 15:20:47 +03:00
Nikolay Tyukaev
ab94f60cb9 doc files copyright (#3843)
* doc files copyright

* fix indentation
2021-01-15 15:15:17 +03:00
Ilya Lavrenov
a0df6152a8 Added -Wall for IE Core libraries (#3852) 2021-01-15 12:51:01 +03:00
Anastasia Kuporosova
320aafbb59 [Python API] Small fixes in tests and change of format string to f-string (#3865) 2021-01-15 12:48:58 +03:00
Nikita Kudriavtsev
5d63b5f41f [IE][VPU]: Fixed the calculation of timeout for x32 system (#3842) 2021-01-15 12:17:28 +03:00
Nikita Kudriavtsev
e9a52d39ac [IE][VPU]: Added MYRIAD_THROUGHPUT_STREAMS in default config (#3861) 2021-01-15 12:08:59 +03:00
Tomasz Socha
cf358a9d0d [ONNX Importer] Reduce amount of ONNX Importer public includes. (#3837)
* Initial moving

* ONNX Importer is private now - CMakeLists.txt

* ONNX Importer is private now - Includes

* Make some files visible

* Style apply

* Review fix

* Public headers have a prefix now

* Style

* hide more headers
2021-01-15 09:48:15 +03:00
Andrey Somsikov
cc9c480554 Fix sanitizer build (#3869) 2021-01-15 09:42:31 +03:00
Bartosz Lesniewski
2e09cd653a Attributes have different values in MO and NGraph IRs (#3793)
* regionyolo do_softmax attribute

* add serialization single layer tests for normalizel2 and reshape

* add prelu sslt, change letter size in op name to align with MO

* add shufflechanels sslt, add workaround to serialize the op with proper opset number

* add broadcast sslt, change attribute string representations to lowercase

* add pad sslt, change attribute string representations to lowercase

* Unify sslt name prefixes

* add prelu name translation for serialization

* change expected type of regionyolo do_softmax attribute to bool

* transform autobcast type attr to lowercase, add unit test, add special opset mapping in serialization

* style fix

* fix indentation

* fix indentation 2

* Possibility of different opset assignment for different op versions

* Update header dates in  modified files

* Match special opset to type_info_t instead of a string

* Adjust the comment to match the code
2021-01-15 07:17:12 +03:00
Sergey Lyubimtsev
fa41a799b5 Inconsistent inference results for hello_classification sample between Windows and Linux (44369) (#3849)
* Fix image load issue

* remove extra line
2021-01-14 17:22:41 +03:00
Alexey Varyzgin
26d0d2c240 [BF16] Simulation mode was added to documentation (#3649)
* [BF16] Simulation mode was added to documentation

* Update Bfloat16Inference.md

Co-authored-by: Anastasiya Ageeva <anastasiya.ageeva@intel.com>
2021-01-14 16:58:59 +03:00
Evgeny Lazarev
dbad8809bf MO dev guide refactoring (#3266) (#3595)
* Release mo dev guide refactoring (#3266)

* Updated MO extension guide

* Minor change and adding svg images

* Added additional information about operation extractors. Fixed links and markdown issues

* Added missing file with information about Caffe Python layers and image for MO transformations dependencies graph

* Added section with common graph transformations attributes and diagram with anchor transformations. Added list of available front phase transformations

* Added description of front-phase transformations except the scope-defined and points defined. Removed legacy document and examples for such transformations.

* Added sections about node name pattern defined front phase transformations. Copy-pasted the old one for the points defined front transformation

* Added description of the rest of front transformations and and all middle and back phase transformations

* Refactored Legacy_Mode_for_Caffe_Custom_Layers and updated the Customize_Model_Optimizer with information about extractors order

* Added TOC for the MO Dev guide document and updated SVG images with PNG ones

* Fixed broken link. Removed redundant image

* Fixed broken links

* Added information about attributes 'run_not_recursively', 'force_clean_up' and 'force_shape_inference' of the transformation

* Code review comments

* Added a section about `Port`s

* Extended Ports description with examples

* Added information about Connections

* Updated MO README.md and removed a lot of redundant and misleading information

* Updates to the Customize_Model_Optimizer.md

* More updates to the Customize_Model_Optimizer.md

* Final updates for the Customize_Model_Optimizer.md

* Fixed some broken links

* More fixed links

* Refactored Custom Layers Guide: removed legacy and incorrect text, added up-to-date.

* Draft implementation of the Custom layer guide example for the MO part

* Fixed broken links using #. Change layer->operation in extensibility documents

* Updated Custom operation guide with IE part

* Fixed broken links and minor updates to the Custom Operations Guide

* Updating links

* Layer->Operation

* Moved FFTOp implementation to the template extension

* Update the CMake for template_extension to build the FFT op conditionally

* Fixed template extension compilation

* Fixed CMake for template extension

* Fixed broken snippet

* Added mri_demo script and updated documentation

* One more compilation error fix

* Added missing header for a demo file

* Added reference to OpenCV

* Fixed unit test for the template extension

* Fixed typos in the template extension

* Fixed compilation of template extension for case when ONNX importer is disabled

Co-authored-by: Alexander Zhogov <alexander.zhogov@intel.com>
2021-01-14 16:28:53 +03:00
Vladimir Paramuzov
08afa4fd97 [IE CLDNN] Performance / accuracy fixes (#3729)
- Added linear_onnx mode support into resample_opt kernel.
- Fixed byxf layout check.
- Added Resample + Eltwise fusing support
- Update dequantize merge pass to work with eltwise instead of scale
- Fixed uninitialized m_maxBatch value for query mode
- Fixed missing AddPrimitiveToProfiler for DeformablePSRoiPooling
- Fixed 0d gather
- Added WA for Resample+Eltwise fusing

Co-authored-by: Gleb Kazantaev <gleb.nnstu@gmail.com>
2021-01-14 15:10:11 +03:00
Vladislav Volkov
93e9eefaec Broken first inference time counter (#3848) 2021-01-14 15:03:34 +03:00
Krishna Prabhakaran
a9748062be [IE][VPU]: Remove protocol checks for updating memType and watchdog flag (#3762)
Remove protocol checks for updating memType and watchdog flag. This has been verified by Microsoft on their target platform with 2 ma2085 over PCIE. The target was able to run openVino sample with these changes.
2021-01-14 14:50:01 +03:00
iliya mironov
5408f611e9 Add ctc gready decoder sec len op to ngraph (#3499)
* Add ctc gready decoder sec len op to ngraph

* Remove some comments

* Add second constructor

* Fix code style

* Fix code style

* Add unit tests

* Add tests to cmake

* Fix according to review

* Fix code style

* fix

* Change input layoyt

* Fix code style

* Add unit tests

* Add 3 input tensor check

* Update shell impl

* Fix code style

* Fix code style

* Add doxy gen

* Fix code style

* Update doxigen

* Update constructor description

* Fix code style

* Refactoring code

* fix code style

* Optimize op constructor

* Add macros. Optimize code for validate_and_infer_types

* Refactoring code

* Fix code style

* Fix code style

* Fix check blanck_index shape

* Fix code style

* Fix unit test for dynemic case

* Fix code style

* Fix copyryting

* reverse changes

* Update copyrite
2021-01-14 14:14:32 +03:00
Mateusz Tabaka
20b9d390e1 [ONNX] don't hardcode broadcast shape in Mul, Add, Sub, Div (opset <= 6) operators (#3679) 2021-01-14 11:24:37 +01:00
Alexander Zhogov
3c90a8e421 Azure CI: Add OpenCV env path on Windows (#3834)
* Set common Test ENV on Windows
2021-01-14 12:41:54 +03:00
Gorokhov Dmitriy
8c1d0b02ba [CPU] Added vector size tiles alignment for quntization buffers (#3776) 2021-01-14 12:11:16 +03:00
Elizaveta Lobanova
84c06e0856 [GNA] Fixing issues for convolution single-layer tests (#3586) 2021-01-14 11:59:31 +03:00
Elizaveta Gerashchenko
d2303262a2 [IE CLDNN] Added ITT counters in the plugin (#3719) 2021-01-14 09:56:18 +03:00
Vladimir Paramuzov
036259481d [IE CLDNN] Fixed factory registration in concurrent environment (#3833) 2021-01-14 09:36:14 +03:00
Piotr Szmelczynski
9ddbfac6b1 Avgpool revise (#3674)
* Update the spec

* add unit-tests

* add avgPool unit-tests to CMakelist

* Remove second constructor and change the first one to take default values for rounding_type and pad_type

* add type_prop test for default values

* add 5d input single layer test instances

* add type_prop tests

* Require input to be 4D or 5D

* add validation check for pads size

* Update few tests to take 5D input instead of 6D

* Update validate_and_infer_types method

* Update infer_batched_pooling_forward and try_apply_auto_padding methods

* Update auto_padding_spatial_dims_dynamic type_prop test for binary_conv, conv, deformable_conv, group_conv and max_pool

* style-apply

* add validation check for kernel size

* add xfail for avgpool python backend test

* style-apply

* remove avgpool backend test from xfail list

* Update spec

* Allow the 3D input

* Update type_prop test with 3D input

* style-apply

* Remove xfail_issue_38709

* fix typo

* Update spec

* Update outputs section in spec

* Update spec

* fix typo

* clean file

* Update detailed description and fix xml examples

* fix exclude-type typo

* fix typo in outputs section
2021-01-14 00:23:26 +03:00
Vladislav Volkov
b9447dfedf V10Parser node factory improvements (#3824)
* Supported opsets check improvement

* Optimization of V10 nodes creation in nGraph

* Redundant type checking in opset removed

* opset2 existance check added
2021-01-13 19:45:51 +03:00
Vladislav Vinogradov
927ac47e2d Add log_level option to compile_tool (#3831)
It will allow to turn on IE logging from CMD line
without extra configuration file.
Might be usefull for debugging.
2021-01-13 19:45:25 +03:00
Tomasz Dołbniak
bd299d3daf ONNX model editor class with input types modification support (#3714) 2021-01-13 15:02:01 +01:00
Tomasz Dołbniak
303c549791 nGraph copyright update for 2021 (#3832) 2021-01-13 16:43:04 +03:00
Elizaveta Lobanova
36edd1fb38 [GNA] Fix handling of permutes around convolution for a case with 1 channel (#3481)
Fix of concat scale factors calculation causing infinite loop during memory layer requantization

Fix of copy layer unsupported batch size
2021-01-13 16:12:19 +03:00
Gladilov, Gleb
1601c7fdbd [IE][VPU]: Enables Extract Dynamic Batch Transformation (#3715)
* [IE][nGraph]: Enables begin/end iterators for PartialShape

It's convenient to be able to use STL algorithms on
PartialShape since semantically PartialShape is a
sequence of Dimensions.

* [IE][VPU][nGraph]: Introduces tree utilities

Introduces Depth-First-Search and Breadth-First-Search
utilities for tree traversal. Templated arguments
makes them extensible for different use-case scenarios.

BFS is designed in way to make it possible to guarantee
node will be visited only after all its predecessors
have been visited:

       a
      / \
     b   c
     |   |
     d   |
     \  /
       e

There with accordingly provided functors (NumEntries) it's
guaranteed node "e" will be visited after "d" and "c".
Such a property is important for nodes depth evaluation.

* [IE][VPU][nGraph]: Fixes printTo for nGraph type

For some reason if printTo for nGraph type is
usual function it's not picked up by VPU_THROW_UNLESS
triggered inside DynamicToStaticShape transformations.

Making it template specialization does the job.

* [IE][VPU]: Introduces SliceConfiguration class

SliceConfiguration is a class that's intended
to express the result of operation slicing by
batch. The result of slicing is configuration
that specifies what to do with each data object
associated with operation. There are two options
defined: Slice and Unchanged. Typical slice
scenario is Slice, when operation has the same
batch for all inputs and outputs, so all
corresponding data object will be "sliced"
(replaced with copy where batch equal to 1).

At some cases, data object should not sliced
(ex. if operation has constant input which
is the same for all input data batches and
so, does not have batch - Add of 2 tensors
with shapes [10, 1000] and [1000]). To
represent such cases there is option
"Unchanged".

At cases when operation should not be sliced
at all (ex. does not have batch, have different
batch for inputs and outputs, has static
batch and so on) SliceConfiguration object will
return false for "hasSlice" method call. In
these cases inputs and outputs methods calls
will throw an exception.

* [IE][VPU][nGraph]: Enables MatMul operation slice

In case of static batch, operation is not going to be sliced,
since for handling such cases other transformation is used.
Such approach allows both passes to co-exist while one is
being replaced with another.

If data input has other dynamic dimension than batch error
will be thrown since Myriad-X plugin does not support
convolutions (HW accelerated operations) with dynamism in
spatial dimensions.

* [IE][VPU][nGraph]: Enables Convolution operations slice

In case of static batch, operation is not going to be sliced,
since for handling such cases other transformation is used.
Such approach allows both passes to co-exist while one is
being replaced with another.

If data input has other dynamic dimension than batch error
will be thrown since Myriad-X plugin does not support
convolutions (HW accelerated operations) with dynamism in
spatial dimensions.

* [IE][VPU][nGraph]: Enables unary eltwise slice

Since extract dynamic batch transformation will handle
dynamism only by batch (so requires body loop to be static)
operations with dynamism in dimension other than batch should
not be covered by loop.

In case of dynamism in dimension other than batch eltwise
will be considered unsupported for sub-graph extraction.

* [IE][VPU][nGraph]: Enables binary eltwise slice

Since extract dynamic batch transformation will handle
dynamism only by batch (so requires body loop to be static)
operations with dynamism in dimension other than batch should
not be covered by loop.

In case of dynamism in dimension other than batch eltwise
will be considered unsupported for sub-graph extraction.

It's template function since different binary eltwise
operations have the same broadcasting rules.

* [IE][VPU][nGraph]: Enables extract dynamic batch transformation

General approach is following:

1. Extracted sub-graphs should have exactly one input and output
   operation. Otherwise, it's possible that memory consumption of
   model will be increased since loops implementation on Myriad-X
   requires to keep all inputs and outputs of loop to be alive
   along with memory used by loop body. In layout consolidation
   scenario it reflects intention to use minimized amount of
   permutations.

2. Extracted sub-graph should not have external connections (
   the only nodes that allowed to have predecessor or successor
   outside of sub-graph are input and output). Otherwise, it's
   possible that memory consumption of model will be increased
   for the same reason as in previous point.

   To make sure this restriction is met transformation looks
   for leaves in both directions, finds corresponding LCA
   (Lowest Common Ancestor) and checks if such sub-graph has
   external connections. If so, it repeats leaves search
   procedure stopping if it approaches leaves from previous
   iteration and finds LCA again. It is repeated until
   sub-graph without external connections is found (it exists,
   at least source itself forms it).

   Leaf in current context is a node which satisfies one of
   the following conditions (depending on direction):
     Top:
       1. It has no predecessors which are neither Parameter,
          nor Constant
       2. It's unknown how to slice this operation
       3. It could not be sliced (different batch for inputs and
          outputs)
     Bottom:
       1. It has no successors which are not Result
       2. It's unknown how to slice this operation
       3. It could not be sliced (different batch for inputs and
          outputs)

Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>
2021-01-13 13:42:53 +03:00
Mikhail Novozhilov
9fa8ad5404 [IE][VPU]: Removed Mish decomposition (#3663)
Removed Mish decomposition because new Mish kernel implemented
2021-01-13 13:35:55 +03:00
Evgeny Lazarev
26ca9919b9 Added AddV2, FusedBatchNormV2 and FusedBatchNormV3 to the list of supported TF operations (#3829) 2021-01-13 13:26:42 +03:00
Ilya Lavrenov
b203e9e9ae Follow up for PR #3784 (#3821) 2021-01-13 12:24:23 +03:00
Ilya Lavrenov
b452991a9a Removed stb_image from 3rd party (#3820) 2021-01-13 12:23:18 +03:00
Ilya Lavrenov
37e051b48b Suppress multiple linker warnings for ngraph on Win32 (#2879)
* Fixed multiple linker warnings on Win32

* Fixed linkage on Windows

* Fixed compilation for Win32

* Last fix
2021-01-13 06:40:21 +03:00
Bartek Szmelczynski
5a905238cd add asin to unary operators tests (#3815) 2021-01-13 06:15:30 +03:00
Nikita Kudriavtsev
2ad3f1cdab [IE][VPU]: Added addition parameters for StridedSlice (#3670)
* Added addition parameters for StridedSlice
* Firmware updated 1570 -> 1574
2021-01-12 20:20:15 +03:00
Abhishek Kulkarni
ae8a79daa3 Handle scalar inputs for MYRIAD plugin (#3784)
This change fixes the error

Input blob size is not equal network input size (1!=0)

seen when passing a scalar input to a model in the case of VPU plugins.
2021-01-12 18:41:44 +03:00
Ilya Lavrenov
4d4efdc889 Fixed compilation for Win32 (#3803) 2021-01-12 18:40:30 +03:00
Sergey Lyubimtsev
51f3b33a83 Align location to OMZ demos (#3754)
* [MO] Add CMake install for Model Optimizer

* [MO] Update test for version.py

* [MO] Add CMake install for Model Optimizer

* [MO] Update test for version.py

* [MO] Add CMake install for Model Optimizer

* [MO] Update test for version.py

* [MO] fix file permissions for install location

* enable make install for OMZ

* Add option description

* remove OMZ fetching & install
2021-01-12 17:17:47 +03:00
Mateusz Tabaka
9996994b8d [ONNX] remove dangling Parameters from graph (#3774)
We have models with inputs with no initializer and not connected to any other node.
2021-01-12 14:12:57 +01:00
Dmitry Kurtaev
9ab44f8d5c [CMake] Add SHA sums for OMP packages (#3801) 2021-01-12 15:59:54 +03:00
Andrew Bakalin
24237863b2 [IE][VPU][TESTS]: Gather: support outer padding for indices (#3665)
* Update firmware
* Add the test case from the network
* Disable fp32 case, because in this case the network has output Convert which receives non-inner stride in its input which is not supported now.
* Support FP16 comparator.
2021-01-12 13:56:52 +03:00
Anton Dudchenko
f90b6e85b8 [IE][VPU]: Move Myriad QueryNetwork to a separate file (#3687)
* Move MyriadQueryNetwork implementation to a separate file
2021-01-12 12:46:52 +03:00
Anton Pankratv
943e511c58 Merged base implementation files (#3699) 2021-01-12 12:04:47 +03:00
Andrey Sokolov
bfd8f1372c [IE][VPU][TESTS]: add implementation of layer Round to Myriad Plugin (#3667)
* [IE tests] add opset4, opset5 to the opset list
* [IE VPU] add layer Round; support DTS
2021-01-12 11:50:35 +03:00
Ilya Lavrenov
ba08abb388 Set default visibility only for ONNX (#3798) 2021-01-12 07:14:48 +03:00
Bartosz Sledz
f6c2f3cc16 Change failing test ticket number (#3677) 2021-01-12 07:10:48 +03:00
Pavel Esir
d9bd59c7a0 Evaluate, ngraph_reader check and Python nGraph API for GatherElements (#3624)
* add GatherElements evaluate to interpreter backend

* Finally successfully run on backend

* debugged non-typical cases

* added ngraph_reader tests for GatherElements

* added Python API for GatherElements

* apply_style

* corrected python api tests

* applied comments

* style-apply

* finally corrected nGraph Python API for GatherElements

* minor corrections

* style-apply

* replaced quotes

* added blank line

* corrected evaluate and disabled unit-tests for not yet supported plugins

* style-apply

* applied comments: negative tests added and additional checks in evaluate

* added bound check for axis in evaluate

* style-apply

* apply review comments

* fast correct evaluate for GatherElements

* style-apply

* revert changes in interpreter unit_test.manifest for Gather

* 🚀 optimized general solution; added separate calculation for 2D

* 🚀 applied comments

* style-apply
2021-01-11 19:52:47 +03:00
Vladislav Vinogradov
8ec38cf039 [cmake] Fix single config generators handling (#3794)
* Add `USE_BUILD_TYPE_SUBFOLDER` CMake option to append
  `CMAKE_BUILD_TYPE` to output binary directory.
  Initialize it to `ON` for UNIX to keep current behavior.
* Remove forced `CMAKE_CONFIGURATION_TYPES` initialization,
  use user provided value instead.

This will allow to use single config generators (like Ninja) on Windows
with MSVC compilers and get binaries in per-config sub-folders in the same
way as on UNIX.

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
2021-01-11 18:38:11 +03:00
Daria Mityagina
09a2d2a525 [IE][VPU]: Interpolate improvements (#3508)
* interpolate improvements - new modes in Interp and resample
* interpolate improvements - tests for linear_onnx
* firmware update
2021-01-11 17:39:31 +03:00
Mateusz Tabaka
1e418ca549 Revert PSROIPooling average logic introduced in 305f0056059b091e0290b… (#3765)
* Revert PSROIPooling average logic introduced in 305f005605

* fix computing bin coords in average mode
2021-01-11 17:30:53 +03:00
Ilya Lavrenov
0d22328a25 Partially removed ngraph cmake duplication with IE cmake (#3751)
* Partially removed cmake duplication with IE cmake

* Deprecated API usage: fixed or suppressed

* Fix for TypeRelaxed

* Canonical form for ngraph includes

* Removed extra visibilit settings; removed graphviz find_package

* Removed var_functions module; canonical includes for ngraph::reference

* Fixed deprecated API in ngraph tests

* Re-use standard cmake macro for shared libs

* Trying to fix ONNX importer tests
2021-01-11 14:49:33 +03:00
Ilya Lavrenov
50f9dd8a6b Enabled CMP0025 as NEW (#3791) 2021-01-11 14:48:27 +03:00
Yury Gaydaychuk
9069781659 CPU implementation for ROIAlign (#3579) 2021-01-11 12:04:45 +03:00
Bartek Szmelczynski
39aa228805 base file for unit-testes for unary operators (#3700)
* Add file containing base tempalte funtions for all unary operators and add example with acos

* fix style-check

* add file for tests for all unary operators

* fix style

* rename unary_base.cpp to unary_ops.cpp

* Update test CMakeList

* fix typo

* style-apply

* Remove code blocks and add test for dynamic rank input
2021-01-11 11:43:57 +03:00
Bartosz Lesniewski
11f1a0f671 Remove ops from Layer Creator/ Node Converter - part 6 (#3620)
* remove deformableconvolution op from layer creator

* remove deformablepsroipooling op from layer creator

* remove maxpool op from layer creator

* remove nonmaxsuppresion from layer creator

* remove groupconvolutionbackpropdata op from layer creator

* remove groupconvolution op from layer creator

* fix code style
2021-01-11 07:55:14 +03:00
Roman Kazantsev
7e8cea672e [MO] Implement support of TensorFlow 2 Keras Embedding operation in MO (#3766)
* [MO] Implement support of TensorFlow 2 Keras Embedding operation in MO

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

* Update another requirements files

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2021-01-10 22:05:58 +03:00
Evgenya Stepyreva
511db4724f [ nG ] opset1::Reshape output shape inference refactoring (#3542)
* [ nG ] opset1::Reshape output shape inference refactoring

* SET_INPUT_IS_RELEVANT_TO_SHAPE

* small refactoring

* brought legacy check back

* style

* Integizer

* stylee

* Apply suggestions from code review

* merge master
2021-01-10 21:37:24 +03:00
Ilya Lavrenov
7f04723d25 Fixed install location for MODULE library type (#3752) 2021-01-10 18:21:13 +03:00
Mateusz Bencer
65b8307c2f Fixed clone_with_new_inputs for TopK (#3757) 2021-01-08 08:59:26 +01:00
Mateusz Tabaka
b56cf07f0e [ONNX] remove unnecessary ReduceMax and Subtract in Softmax op (#3717) 2021-01-07 19:02:59 +01:00
Mateusz Tabaka
7be7a8fb30 [ONNX] don't hardcode shapes in Interpolate and Shape operator (#3778) 2021-01-07 16:56:19 +01:00
Vladislav Vinogradov
00d37aaa62 Use find_package instead of include(Find*) in CMake scripts (#3767)
Otherwise CMake produces the following warning:

```
CMake Warning (dev) at /usr/local/share/cmake-3.19/Modules/FindPackageHandleStandardArgs.cmake:426 (message):
  The package name passed to `find_package_handle_standard_args` (Wget) does
  not match the name of the calling package (IEDevScripts).  This can lead to
  problems in calling code that expects `find_package` result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /usr/local/share/cmake-3.19/Modules/FindWget.cmake:26 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  cmake/developer_package/download/download_and_check.cmake:5 (include)
  cmake/developer_package/download/download_and_extract.cmake:6 (include)
  cmake/developer_package/download/download.cmake:25 (include)
  cmake/developer_package/download/dependency_solver.cmake:5 (include)
  cmake/developer_package/IEDevScriptsConfig.cmake:208 (include)
  CMakeLists.txt:12 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.
```
2020-12-31 12:48:23 +03:00
Vitaliy Urusovskij
08f54dbac8 Fix metadata_from_manifest() according to new manifest version (#3771) 2020-12-31 09:57:58 +03:00
Anastasia Popova
c6e57ef99f Fixed regression after mapping bug fix (#3770)
* Fixed regression after mapping bug fix

* Unit test for atribute absence.
2020-12-30 19:41:10 +03:00
Vitaliy Urusovskij
fe229ba19d Move time_tests to new manifest version (#3759) 2020-12-30 17:28:22 +03:00
Polina Brzezinskaya
0850479b54 [IE][VPU][TESTS]: Fix myriad tests on MacOS (#3681)
* fix sorting ref for myriadTestsTopK_smoke on macOS and chenged dynamic_pointer_cast to ngraph::is_type at dynamic_to_static_shape_squeeze.cpp
* disable accuracy/myriadLayersTestsExpGenerateProposals_smoke.ExpGenerateProposals tests for macOS
2020-12-30 12:37:07 +03:00
Maxim Shevtsov
4fa7575d2e Adding MYRIAD_THROUGHPUT_STREAMS support (#3723)
* Adding MYRIAD_THROUGHPUT_STREAMS to the list of plugin's supported config vals (omitted incorrectly) and enabing streams for the myriad devices in the benchmark_app

* docs update and python benchmark_app
2020-12-29 19:02:57 +03:00
Anton Romanov
1c3848a96f Added info about hello classification sample (#3583) 2020-12-29 16:55:29 +03:00
Vladislav Golubev
6326eb348a [LPT] reshape 4D->4D per-tensor quantization fix (#3644) 2020-12-29 12:40:31 +03:00
Anastasia Popova
631d452258 Fixed mapping of input name (#3737)
* Fixed mapping of input name

* Fixed unit tests

* Fixed mapping of input name

* Fixed unit tests

* attributes check fix

* PEP8 code format

* code duplicate removal

* variable rename
2020-12-28 22:43:54 +03:00
Gorokhov Dmitriy
37b6e75730 [CPU] Fixed Divide operation support for I32 precision (#3721)
* [CPU] Fixed Divide operation support for I32 precision
2020-12-28 19:18:19 +03:00
Anton Pankratv
a8daab3377 Fixed some tbb issues (#3735) 2020-12-28 13:41:44 +03:00
Ilya Churaev
72cd81305c Fixed headers for doxygen genration (#3746) 2020-12-28 13:33:26 +03:00
Alexandra Sidorova
e82257d021 [CPU] Improvements for Pad implementation (#3267) 2020-12-28 13:28:56 +03:00
Vladislav Golubev
5943e1be73 [LPT] issue #37332: tests unification (#3277)
* [LPT] ieFuncTests unification

* [LPT] plugin tests unification

* [LPT] added removeStandaloneCleanup && removeTransforamtions refactoring
2020-12-28 12:06:38 +03:00
Rafal Blaczkowski
eac33e1b0e OpenVino ONNX CI update (#3750)
* Enlarge timeouts for OpenVino ONNX CI

* Enlarge a lot timeouts

* Update processing script
2020-12-28 11:03:38 +03:00
Yegor Kruglov
870a6c061a Fix of ascii decode problem in TF Const with string value (#3672)
* added try/except to tf_tensor_content

* code refactoring

* added unittest

* update test
2020-12-27 22:15:17 +03:00
Ilya Lavrenov
278b662e56 Removed global CMAKE_MODULE_PATH in IE DevPackage (#3747)
* Cleanup

* Added CMAKE_MODULE_LINKER_FLAGS for onecoreuap toolchain

* Fixed ENABLE_FASTER_BUILD mode on Android

* Cosmetic fix

* Fixed fuzzing

* Enabled fuzzing
2020-12-27 00:02:50 +03:00
Ilya Churaev
6f77c72fc7 Small cosmetic fixes (#3748) 2020-12-25 19:42:33 +03:00
Dmitry Budnikov
0547934c24 fluid update WW52 2020 OCV 4.5.1 - attempt#2 (#3698)
* fluid update WW52 2020 OCV 4.5.1 - attempt#2

* fluid update WW52 2020 OCV 4.5.1 - attempt#3 with build fixes

* fluid update WW52 2020 OCV 4.5.1 - attempt#3
2020-12-25 18:25:20 +03:00
Evgeny Lazarev
a66ab37455 Set fixed version of the urllib3 package in the requirements because of the security issue in urllib3==1.25.8 (#3740)
* Set fixed version of the urllib3 package in the requirements because of the security issue in 1.25.8

* Set lower bound version of the urllib3 package in the requirements because of the security issue in 1.25.8
2020-12-25 18:02:23 +03:00
Alexander Perepelkin
dedd5a51e8 Allow multiple output shapes testing (#3728) 2020-12-25 17:37:16 +03:00
Ilya Churaev
d6721c395b Added CC macros to validate, clone and visit (#3730)
* Added CC macros to validate, clone and visit

* Fixed names

* Fixed code style

* Add exceptions

* Revert "Add exceptions"

This reverts commit 0489ba376f.

* Update ngraph macros, throw an exception if code is disable for nGraph op

* Fixed code style

* Simplified NGRAPH_OP_SCOPE

* Changed TYPE_CASE macros

* Fixed compilation

* Fixed code style

* Fixed build
2020-12-25 17:20:48 +03:00
Roman Kazantsev
55f1f9606f [MO] Implement transformation to avoid RandomUniform in dropout (#3678)
* [MO] Implement transformation to avoid RandomUniform in a particular drop-out block

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

* Remove old RandomUniform transformation and correct const values

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

* Fix atol value

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

* Move DropoutWithRandomUniform transformation to the front

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

* Change just RandomUniform to Broadcast in the transformation

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

* Correct comment for the transformation

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

* Remove redundant line

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2020-12-25 16:59:15 +03:00
Rafal Blaczkowski
27fbb4cfb1 Enlarge timeouts for OpenVino ONNX CI (#3745) 2020-12-25 14:09:32 +03:00
Rafal Blaczkowski
6d45a9c041 ONNX CI improvement (#3673)
* Improve corner-case resistance

* small improvements
2020-12-25 07:46:55 +03:00
Mateusz Tabaka
1aee9f9ffe [ONNX] don't hardcode shape in Softmax operator (#3676)
* [ONNX] don't hardcode shape in Softmax operator

* use named constant for special zero param in reshape
2020-12-25 07:41:46 +03:00
Anastasiya Ageeva
cc019e0a11 Avladimi/cherry pick raspbian gsg (#3654)
* Added Get Started Guide for Raspbian

* Updated the TOC xml file

* Minor fixes

* Implemented review comments

* Fixed broken link
2020-12-24 18:52:09 +03:00
Sergey Lyubimtsev
2e6ea1e290 CMake based build for pyngraph module (#3080)
* [MO] Add CMake install for Model Optimizer

* [MO] Update test for version.py

* [MO] Add CMake install for Model Optimizer

* [MO] Update test for version.py

* [MO] Add CMake install for Model Optimizer

* [MO] Update test for version.py

* [nGraph] Python API should be compiled and installed via CMake (41857)

* Refactored wheel setup script to build module using CMake

* Update build instructions

* Added USE_SOURCE_PERMISSIONS to cmake install

* Adjust CMake compiler flags conditions

* fix CPack issue for CI build pipeline

* case insensitive option check

* build only python API if ngraph_DIR provided

* fix lib extension for macOS

* -fixed style (flake8)

 -added paralllel build option & description

* fix flake8 B006 check

* add ngraph_DIR & remove unsed env. variables.

* Reworked build & test instructions to make it more straightforward

* remove unused CMake arguments for setup.py

* make source dir condition more general

* Update BUILDING.md

* Update BUILDING.md

* Update BUILDING.md

* beautified instructions wording

* fix wheel build issue after sourcing setupvars

* Extend user options to build, install and develop commands

Co-authored-by: Andrey Zaytsev <andrey.zaytsev@intel.com>
2020-12-24 16:57:58 +03:00
Maksim Kutakov
4a62491927 [CPU BF16] Fix for fusing depthwise operation into BF16 convolutions (#3671)
* Fix for fusing depthwise operations into bf16 convolutions.

* ScaleShift layer was returned to _complementbf16 list.
2020-12-24 15:59:54 +03:00
Andrew Bakalin
29d82b7a9a [IE][VPU]: Fix loading previous NMS versions (#3696)
* Description: currently IRs with NMS version < 5 don't work because conversion of previous NMS versions to NMS-5 happens after DTS (in opset1 to legacy conversion), while for Myriad Plugin it's necessary to do so at the very beginning of ngraph conversion pipeline.
2020-12-24 12:27:10 +03:00
Ilya Churaev
ad3405ef5e Removed global factory for nodes (#3701) 2020-12-24 10:47:05 +03:00
Nikolay Tyukaev
dbedeae9c9 ovino doc assets (#3046)
* ovino doc assets

* update cmake doc build

* fixes
2020-12-24 10:30:51 +03:00
Maxim Andronov
cdf7f5eff5 Added memory format attribute (#3395)
* [CPU] Added memory format attribute
2020-12-24 10:25:53 +03:00
Yury Gaydaychuk
6d320d7162 convert to bf is to be inserted only after non-const layer (#3597) 2020-12-24 10:20:44 +03:00
Ilya Lavrenov
9d6bd321d8 Fixed message if ENABLE_ERROR_HIGHLIGHT is enabled (#3712) 2020-12-24 08:07:50 +03:00
Szymon Durawa
431485e4a6 Visitor api ti implementation (#3576)
* TensorIterator deserialization. Introduce new on_adapter(Function) and add implementation in on_adapter(void) for Input and Output Descriptions. Remove factory adapter.

* Add comments to functions provided. Add missing  on_adapter() after rebase.

* Apply formatting.

* Remove visit_attributes from SubGraphOp, remove declaration for createSubGraphLayer.

* Add port map parsing to address not consecutive order of external_port_id appearance.

* Remove header for factory_adapter.

* Add on_adapter() in V10Parse::parse() function.

* Add m_num_iterations initialization for concat output.

* Remove redundant lines, add doxygen comments.

* Change cpp/ie_cnn_network.h to local include, remove temporary map object from range for loop.

* Restore protected access for SubGraphOp.
2020-12-24 07:34:21 +03:00
Sergey Lyubimtsev
4f0720176c CMake install fixes (#3600)
* [MO] Add CMake install for Model Optimizer

* [MO] Update test for version.py

* [MO] Add CMake install for Model Optimizer

* [MO] Update test for version.py

* [MO] Add CMake install for Model Optimizer

* [MO] Update test for version.py

* - fix install paths for onnx_reader and ir_reader

- remove static lib installation for plugins on plugins
- 97-myriad-usbboot.rules is installed only for Linux

* added new line

* - Return GNAPlugin to default build list

- Remove test artifacts from cmake install distribution
- Remove nGraph static libs from cmake install distribution

* revert install rule for archive(.lib)

* revert install rule for onnx_importer (.lib)
2020-12-23 23:27:23 +03:00
Maxim Shevtsov
e57ae2e2fa async network loading in the MULTI (#3599)
* async network loading in the MULTI. makes the overall load time as MAX of the individual devices loading timings, as opposite to the current SUM

* correct way of getting perf counters flag for the MULTI (adding to the async load PR, as this is minor change)

* accomodating remark from the code review- MULTI enables the perf counters only if all devices support/enable that
2020-12-23 18:35:27 +03:00
Ilya Lavrenov
036f574756 module library type for IE plugins, extensions (#3656)
* CMAKE: Added MODULE linker flags

* Fixed plugins.xml s

* Use module instead of shared library

* Fixes

* tab 2 spaces

* Renamed get_shared_library_name to ie_plugin_get_file_name
2020-12-23 18:25:42 +03:00
Ilya Lavrenov
5b26a7fcb1 Added error message if cmake is run from IE root (#3707) 2020-12-23 18:00:36 +03:00
Ilya Lavrenov
65b2447d36 Try ENABLE_FASTER_BUILD on public CI (#3708)
* Try ENABLE_FASTER_BUILD on public CI

* Fixed UNITY compilation for Windows
2020-12-23 18:00:26 +03:00
Patryk Elszkowski
2bc18c27aa Constant attr to visitor (#3540)
* Add new path for constant in IR serializer.

* Apply suggestion from review.

* Unique name for temporary test file

* Switch from static to constant member function - GetTestName

* Ensure bin path is not empty.

* Compare Constants op by string values converted to float.

* Add path validation.

Co-authored-by: Patryk Elszkowski <patryk.elszkowki@intel.com>
2020-12-23 16:14:26 +03:00
Piotr Szmelczynski
8806cd3d64 Abs revise (#3601)
* create type_prop tests

* add abs type_prop tests to CMakeList

* add type prop test for dynamic input shape

* fix style
2020-12-23 16:10:29 +03:00
Mateusz Tabaka
a8022cdbc8 Enable TinyYolo v3 in CI (#3651) 2020-12-23 12:25:54 +01:00
Vladimir Paramuzov
241b0faea1 [IE CLDNN] NGraph integration into cldnn plugin (#2506)
Co-authored-by: Roman Lyamin <roman.lyamin@intel.com>
Co-authored-by: Mikhail Letavin <mikhail.letavin@intel.com>
2020-12-23 13:35:44 +03:00
Patryk Elszkowski
bd9bbe09c3 New Gather op reference implementation. (#3633)
* New Gather op reference implementation.

* Unify span implementation for gather and gather_nd.

Create span.hpp for common implementation of span.

* Move span to utils directory.

* Address review comments.

* update span

* Address PR comments.

Co-authored-by: Patryk Elszkowski <patryk.elszkowki@intel.com>
2020-12-23 08:02:57 +03:00
Vladislav Volkov
96b032504e Errors and warnings highlighting for UNIX platforms (#3643)
* Errors and warnings highlighting for UNIX platforms

* The option added for errors and warning highlighting enabling
2020-12-23 08:01:07 +03:00
Bartek Szmelczynski
bc2bd04144 Check disabled tests (#3441)
* add 4 tests for operators based on model zoo

* fix wrong names of the models

* add functional tests for equal, lstm_cell and psroi_pooling operators

* add functional tests for ConverLike and Mod operators

* add funtional tests which were disabled, and add a minor change in convert_function_to_cnn_network.cpp file in order to make LogicalNot operator pass a test

* back to the previous .xml model

* made a changes in ir_layer_parsers.cpp in order to make logicalNot pass a test

* minor fixes to LogicalNot operator in ie_layers_parsers.cpp

* rename friendly name to "not"

* add if statement for Activation type

* fix style
2020-12-23 07:52:08 +03:00
Ilya Lavrenov
856ab82bbf Added company name to a version file (#3653) 2020-12-22 21:02:52 +03:00
Mikhail Ryzhov
f224c52f38 [IE CORE] enable plugins & dependent libs loading using absolute path (#3639)
* [IE CORE] enable plugins & dependent libs loading using absolute path

urrently this allowed to use plugins.xml file to specify full path to specific plugin with it's all dependency, not to be persisted in CWD or in PATH

* Code review fixes
2020-12-22 21:02:05 +03:00
Mateusz Bencer
00181d5179 Disable tests which read prototxt files if protobuf-lite is used (#3691)
* Disable tests which read prototxt if protobuf lite is used

* added missing line

* cmake flags refactor
2020-12-22 18:55:25 +03:00
Ilya Lavrenov
9465073f58 Introduce IEDevScripts package (#3661)
* Refactored developer package

* Added fuzzing for CMAKE_MODULE_LINKER_FLAGS as well

* Added options for developer package

* More improvements

* Further improvements

* Removed global CMAKE_MODULE_PATH population

* Fixes

* Final fixes

* Fixed python build

* Fix for TBB

* Fixed Find TBB

* Fixed install

* Fixes for OV features

* Split developer targets per component

* Fixed IE build tree config

* Fixed ITT

* Fixed review comments

* Clean export dependencies

* Fixed export of pugixml

* Added IEDevScripts_DIR for Android

* Fixed Android #2

* Fixed Android #3

* Fixed python cc

* Disabled Core threading tests on GNA
2020-12-22 18:44:59 +03:00
Ilya Churaev
1926179b65 Changed OV_SCOPE semantic (#3692)
* Added if DEFINE construction

* Changed OV_SCOPE semantic

* Fixed the code style

* Fixed redundant lines
2020-12-22 18:29:41 +03:00
Jozef Daniecki
967c040e19 Regenerate MO models with current MO version. (#3668)
Constant port numbering was changed in MO serialization, needed to
regenerate models for serialization functional tests to reflect current
MO IR.
2020-12-22 18:29:07 +03:00
Gladilov, Gleb
2ffa6f4764 [IE][nGraph]: Fixes Loop shape inference (#3641)
Previously Loop shape inference function
produced dynamic shapes for body parameters
and loop outputs if iteration count is
unknown (dynamic) or loop input data is
dynamic. At the same, time some dimensions
of input/outputs of body/loop could be
inferred under this circumstances which could
critical for model enablement (ex. Myriad-X
could support convolutions with dynamic batch,
but could not support convolutions with dynamic
spatial dimensions)

Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>
2020-12-22 17:19:27 +03:00
Mateusz Tabaka
e9b89b0bc5 [ONNX] remove hardcoded shape in GroupNorm operator (#3682) 2020-12-22 11:03:59 +01:00
iliya mironov
b17e0d47b1 Remove broadcasting (#3574)
* Remove broadcusting

* Refactoring some code

* Add unit tests

* Update description

* Refactoring transformation

* Add is_broadcastable_shapes checks

* Update is_eliminate_broadcast func

* Add unit tests

* Update unit tests

* Add unit tests

* Add unit tests

* Remove unused include

* Add dynemic tests

* Update unit tests

* Fix code style

* Fix unit tests code style

* Fix code style

* Add one more case for elumenate broadcast

* Fix according to review

* Refactoring transformation code
2020-12-22 12:58:37 +03:00
Anastasiya Ageeva
b6bba5d377 Avladimi/cherry pick cvs 36087 (#3655)
* Fixed CVS-36087

* Fixed link to the installation package

* Fixed links, fixed formatting in bulleted lists
2020-12-22 11:34:11 +03:00
Anastasiya Ageeva
3fd0114925 Added workaround instructions to fix the issue described in CVS-35873 (#3657) 2020-12-22 11:33:23 +03:00
Mateusz Tabaka
4f14e842c1 Update ONNX models to latest master (#3658)
* Update ONNX models to 00d95ba9e5758fd0bc5e6978033fabc4f2a95e61

That version fixes yolov4 and roberta models

* remove yolov4 post processing

* remove model directory before unpacking
2020-12-22 08:04:32 +03:00
Anton Potapov
977c3dda23 [PP] Removed old (non GAPI) preprocessing code (#3664) 2020-12-22 07:52:04 +03:00
George Zlobin
e490dfc161 [IE][VPU][GT] Add pass to reshape convolution by parameter from IR (#3038) 2020-12-21 17:39:19 +03:00
Krzysztof Bruniecki
a497153dcd Gna fix mt with iterations (#3297)
* Enable CoreThreadingTestsWithIterations tests for GNA

  Sync rest of GNA Lib API,
  Sync Config for MT tests
  Change models in CoreThreadingTestsWithIterations to be compat with GNA

* Use parameter for model set selection

* Fix style

* Disable HETERO CoreThreadingTestsWithIterations tests and create issue 45658
2020-12-21 16:10:05 +03:00
Pavel Esir
d2a23680f2 nGraph 'shell' implementation for GatherElements-6 and MO 'shell' implementation (#3467)
* Initial support of GatherElements in MO and nGraph

* apply_style

* added lost extractor for GatherElements

* Corrected GatherElements::validate_and_infer_types

* updated package_BOM.txt

* Type_t added

* started to implement ngraph shape_type_infer unit-tests

* finally implemented all ngraph shape_inference unit-tests

* updated Supported_Frameworks_Layers.md

* added correct handling of dynamic shapes in nGraph, added unit-tests for dynamic cases, fixed dump typos in MO, replaced axis type from int -> int64_t

* implemented shape infer for dynamic shapes with intervals

* finalized MO implementation

* applied comment from review

* style-apply

* spec correction

* removed conflict

* fixed typos

* removed obsolete comments form type_prop

* significant corrections in validate_and_infer_types

* style-apply

* data_rank check for axis
2020-12-21 15:45:15 +03:00
George Zlobin
935549035e [IE][VPU]: Shape compression (#3500)
* This change prevents saving the same shapes in a blob. If more than one data have the same shapes, only one will be saved in the blob.
2020-12-21 15:21:19 +03:00
Ilya Churaev
b2399ce0d9 Enable Conditional Compilation for nGraph evaluate methods (#3666)
* Added CC macro to nGraph

* Add CC to evaluate methods

* Fixed tests

* Fixed comments

* Add private evaluates

* Fixed code style and names

* Fixed code style

* Fixed build
2020-12-21 14:32:40 +03:00
Mateusz Bencer
0b05653d7a Resolved problems with ssd_resnet34_mlperf_opset10 (#3487)
* Resolved problems with ssd_resnet34_1200

* removed debug code

* Added correct handling onnx nodes from parent graph scope

* removed unnecessary include

* fixed calcution index to replace

* fixed LoopParentParametersUsedInBody test

* added set_friendly_name

* apply Unsqueeze for each concatenated Loop output

* added handling trip count with value max_int

* merge from upstream/master

* update xfail list

* added checking is trip_count is constant
2020-12-21 14:32:15 +03:00
Evgeny Lazarev
c6bfac6e05 Enable TF 2.0 Object Detection API models (#3556)
* Config for TF 2.0 Faster R-CNN models, refactored subgraph_between_nodes to use graph API

* Added support for new type of Preprocessing block in the TF 2.0 OD API models. Various fixes to enable the Faster R-CNN ResNet 50

* Updated text comments

* Fixed sub_graph_between_nodes for TensorIteratorMerge. Added support for the TF 2.X EfficientDet models (not yet reshape-able)

* Fixed unit tests

* Fixed regression for TF 1.X OD API SSD model, enabled TF 2.0 OD API SSD models

* Code clean up

* Switched TF 2.0 OD API Faster R-CNN to preprocessor replacement type 2

* Refactored ObjectDetectionAPIPreprocessorReplacement and ObjectDetectionAPIPreprocessor2Replacement

* Fixed bug in the Div transformation to Mul when input is integer.

* Added support for the TF 2.0 OD API Mask R-CNN

* Added unit tests for Div operation. Updated incorrectly modified mask_rcnn_support_api_v1.14.json

* Updated document with list of supported configuration files for TF OD API models

* Review comments

* Added tests for control flow edges for the sub_graph_between_nodes function

* Two more tests
2020-12-21 14:21:39 +03:00
Anton Chetverikov
129a6553fa soft_get fix (#3662) 2020-12-21 14:05:41 +03:00
Anton Chetverikov
a788c02c3d Actualize operations attributes (#3613)
* Fix missed/redundant attrs for some operations

* Align auto_pad attr values in spec

* Update MO IR Reader extenders for appropriate operations

* Allign auto_pad attr values for appropriate operations

* Remove changes in extenders

* Update backend_attrs for some operations

* Changes in shape_infer functions to correct work with explicit mode

* Apply offline comments
2020-12-18 11:47:41 +03:00
Bartosz Sledz
29f1c38ba0 Remove doubled Reshape operator tests and revise unittest.manifest (#3642)
* Remove doubled reshape tests

* Clean manifest and enable unblocked tests
2020-12-18 04:30:40 +03:00
Katarzyna Mitrus
6d89a96d9e Ramove LSTM_Seq_lens model xfail declaration (#3635) 2020-12-17 16:20:01 +03:00
Rafal Blaczkowski
be69a4de2f Enable automatic update of ONNX Model Zoo for ONNX CI (#3511) 2020-12-17 14:12:47 +01:00
Mateusz Tabaka
55f58a6e23 Fix checking input/output size in hello_reshape_ssd (#3636) 2020-12-17 16:01:18 +03:00
Andrew Bakalin
66883d5905 [IE COMMON] Fix FP32 to FP16 positive infinity conversion (#3647)
* [IE COMMON] Fix FP32 to FP16 positive infinity conversion

* [TESTS] Unit tests

* [TOOLS] Use fixed convert in VPU perfcheck
2020-12-17 15:00:47 +03:00
iliya mironov
da54a40fa1 Add spec for CTCGreedyDecoderSecLen (#3250)
* Add spec for CTCGreedyDecoder

* Update spec

* Fix spec according to code rewiev

* Update spec

* Update spec

* Update spec according to review

* Update spec

* Update spec

* Update spec

* Update example spec

* Fix space in spec

* Fix spec

* Fix spec according to review

* fix spec

* update spec

* Update spec

* Change format outputs in spec

* Hot fix

* Minor fixes

* Add new attribute for op in spec

* change input

* Add precision to outputs

* Fix input in spec

* Update spec

* Update CTCGreedyDecoderSeqLen_6.md

fix mistakes

* Change first input layout

* fix example

Co-authored-by: Your Name <you@example.com>
2020-12-17 14:05:24 +03:00
Lukasz Debski
b91047e9fe [IE CLDNN] Fully Connected layer 3d support (#2709) 2020-12-17 12:15:59 +03:00
Andrew Bakalin
f2f5e99f9f [IE][VPU][Tests] Support DTS for Select (#3604)
* Support DTS + binary eltwise tests refactoring (avoid code duplication)
2020-12-17 12:08:22 +03:00
Bartosz Lesniewski
5f9ef0cf26 Remove ops from Layer Creator/ Node Converter - part 5 (#3493)
* remove avgpool op from layer creator

* remove binaryconvolution op from layer creator

* remove broadcast op from layer creator

* remove ctcgreedydecoder op from layer creator

* remove stridedslice op from layer creator

* remove convolutionbackpropdata op from layer creator

* adjust broadcast op to deduce broadcast mode

* add default strides if not provided when creating stridedslice

* code review comments
2020-12-16 19:51:28 +03:00
Mateusz Bencer
261cb6ecf8 Enable yolo v3 test, added post-processing step (#3510) 2020-12-16 16:52:08 +01:00
Junya Hayashi
c80e3c3a82 gna_plugin: include cmath library to avoid call of overloaded ‘abs(float)’ is ambiguous error (#3622) 2020-12-16 18:48:38 +03:00
Irina Efode
f511f77894 [IE TESTS] Disable CancellationTests.*canResetAfterCancelAsyncRequest tests (#3645) 2020-12-16 18:16:16 +03:00
Anastasia Kuporosova
676bd8a861 [Python API] requirements (#1804)
* [Python API] requirements

* add setuptools

* revert commit
2020-12-16 17:06:32 +03:00
Maksim Kutakov
95f531e9e0 [CPU] Improved Split layer (#3449)
* [CPU] Added more optimal Split implementation
2020-12-16 16:51:01 +03:00
Gladilov, Gleb
9509244729 [IE][VPU]: Enables check on split by dynamic dimension for VariadicSplit (#3571)
Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>
2020-12-16 15:47:25 +03:00
Vladislav Volkov
fd1522d9a7 Fixes for external ITT API library (#3603) 2020-12-16 14:26:56 +03:00
Alexey Suhov
859559a6dc [README.md] change latest release to 2021.2 (#3638) 2020-12-16 14:13:51 +03:00
Katarzyna Mitrus
9376f78994 [ONNX] Dynamic version of ONNX Size op (#3553) 2020-12-16 11:16:06 +01:00
Irina Efode
679e4ae4d7 [IE TESTS] Move multi base test class (#3623) 2020-12-16 13:10:27 +03:00
Ilya Lavrenov
8685c20baf Fixed HETERO + Template cases (#3580)
* Fixed tests compilation for Android ARM

* Small fixes

* Fixed issues CVS-44775, CVS-34206, CVS-34349

* Disabled KSO tests for Template

* Eliminated invalid subgraphs

* Enabled KSO QueryNetwork tests for Template

* Fixed other plugins as well

* Used NodeTypeInfo instead of std::string

Co-authored-by: apankratovantonp <anton.pankratov@intel.com>
2020-12-16 12:17:29 +03:00
Mateusz Tabaka
47485646bb Revise DetectionOutput reference implementation (#3448)
* Revice DetectionOutput reference implementation

Ticket: 37433

* fix test_create_op

* fix test_dyn_attributes

* apply code format

* fix crash on Windows when variance_encoded_in_target == 1

* add more checks for DetectionOutput inputs

* Fix single layer tests

* apply code format

* fix ssd_vgg16_300 inference with batch size > 1

* update types in docs

* fix crash on windows

* apply code style

* fix python tests

* fix setting output type

* change False to false and True to true in docs

* Allow prior boxes to have different type than box logits

Some models work that way

* simplify output shape calculation

* fixes to docs
2020-12-16 11:02:12 +03:00
Irina Efode
602f8f2e08 [IE TESTS] Move SLT classes to SharedTestClasses lib & add serialization functionality to the common class (#3431)
* [IE TESTS] Changing functional test utils structure

* Example

* Remove extra

* Apply comments

* fixes

* [IE TESTS] Change the structure

* Continue

* step 3

* [IE TESTS] Complete transition single layer test classes

* [IE TESTS] Transition Subgraph

* Fix subgraph namespaces

* fix

* Apply comments

* latm fix
2020-12-15 22:32:00 +03:00
Anton Chetverikov
ab996da912 Update port renumbering logic for constants (#3578)
* Update port renumbering logic for constants

* Resolve comments
2020-12-15 21:39:56 +03:00
Maxim Vafin
ab974e4f2e Add MVN-6 support to ngraph (#3464)
* Add MVN-6 to ngraph

* Apply review feedback

* Fix max opset number

* Fix code style

* Fix shape test

* Disable reader test

* Apply review feedback and remove reader test

* Fix code style

* Fix build

* Apply review feedback

* Fix build problem

* Fix code style

* Fix build
2020-12-15 21:36:44 +03:00
Alexey Suhov
a569a0b529 [cmake] retry after hash mismatch error (#3612)
* [cmake] retry after hash mismatch error
2020-12-15 19:56:42 +03:00
Andrey Sokolov
fedd736913 [IE][VPU]: support DTS for Ceiling (#3562) 2020-12-15 12:32:17 +03:00
Ilya Lavrenov
5da7e8dab8 Fixed tests compilation for Android ARM (#3572)
* Fixed tests compilation for Android ARM

* Added check for size_t
2020-12-15 11:51:17 +03:00
Maksim Shabunin
3fb5f63573 Restored gtk-3 installation (#3587) 2020-12-15 11:49:36 +03:00
Vladislav Vinogradov
61752b806f [IE][CMAKE] Fix for in-tree generated InferenceEngineConfig.cmake (#3593)
Add `IE::` prefixed aliases for provided targets.
2020-12-15 07:20:56 +03:00
Irina Efode
524b226906 [IE TESTS] Disable sporadic issue 45163 (#3611) 2020-12-14 22:57:24 +03:00
Gabriele Galiero Casay
19154fad2b Rename AvgPool to attribute exclude-pad to align with MO and layer creator (#3549)
* AvgPool: Bug fix in attribute exclude-pad to align with MO and layer creator

* AvgPool: Change attribute to exclude-pad in python api
2020-12-14 21:46:39 +03:00
Yegor Kruglov
98fffe7f22 Possible fix for GroupConvolution unit test (#2584)
* initial commit

* initial commit

* move fix to tf conv_extractor

* added 3d case

* fix e2e with 3d conv

* remove 3d case

Co-authored-by: yegor.kruglov <ykruglov@nnlvdp-mkaglins.inn.intel.com>
2020-12-14 21:30:26 +03:00
Andrey Sokolov
f1d99b5887 [IE][VPU]: Add GatherElements operation to Myriad plugin(#3483) 2020-12-14 15:49:53 +03:00
Maxim Shevtsov
ee8e9a9e8a Attempt to put some order to the single general (that differs only by messages) and typed exception, on the example of NOT_IMPLEMENTED (#3537)
NOT_IMPLEMENTED status code correctly translates to the NonImplemented exception (and handled as the correspondingly typed exception)
2020-12-14 10:27:29 +03:00
Dmitrii Ryzhkov
77ecd7e17c Feature/drizshko/cancellable request (#2635)
Added Cancelability to an Infer Request class (actually implemented for the CPU only, with a stub for other devices)
2020-12-14 09:38:29 +03:00
Anton Potapov
2495eaf56f [PP] Addded ability to preprocess inputs into plugin (#857)
desired format

changed InferRequestInternal:
 - added _deviceInputs member to store plugin desired perprocessing
   targets
 - added default argument to preProcessingRequired to describe plugin
   specific desired preprocessing target
 - SetBlob and GetBlob to deal with plugin desired preprocessing targets
   (_deviceInputs)
 - added addInputPreProcessingFor helper method to avoid code
   duplication

changed TEMPLATE plugin to use new functionality:
 - removed explicit presicion conversion (to use built-in one of
   InferRequestInternal)
 - _networkInputBlobs to use InferRequestInternal::_deviceInputs
2020-12-11 20:22:25 +03:00
Anton Romanov
544a3e148d Update PIP package name (#3577) 2020-12-11 15:58:25 +03:00
Tomasz Socha
dbf855b320 [ONNX][Python][Tests] Update ONNX to onnx 1.8 (#3557) 2020-12-11 11:57:50 +01:00
Anton Potapov
8aabcde925 [PP] Altered preprocessing tests to use existin posprocessing as well (#3554)
changed PreprocessingPrecisionConvertTest:
 - to force output precision to be same as input (and not FP32 always)

changed TEMPLATE plugin to allow U8 outputs
2020-12-11 12:49:38 +03:00
Andrew Bakalin
d90c05aab4 [IE][VPU][Tests]: Support DTS for ScatterElementsUpdate (#3559)
* Enable DTS for ScatterElementsUpdate
* Update DTS tests
* Update inference tests
2020-12-11 12:46:26 +03:00
Andrew Bakalin
a0952798ba [IE][VPU]: Extend StaticShapeBroadcast target shape evaluator (#3561)
Ticket - #-42237
Add Unsqueeze, Equal and Select operations to the StaticShapeBroadcast target shape evaluator, because they are presented in the target shape subgraph evaluator in one of the network, we are currently enabling.
2020-12-11 12:30:15 +03:00
Andrew Bakalin
578ea2fc3c [IE][VPU]: Support dynamic data in Broadcast DTS (#3548)
Ticket - #-44546
Changes:

* Support dynamic data as broadcast input in Broadcast DTS
* Update DTS tests to support both dynamic and static inputs
* Update inference tests:
  a) Refactor tests to have only one testing class - NonZero_Broadcast
  b) Make DSR_TestsCommon base class to reuse createInputSubgraphWithDSR and inputs generating utils.
  c) Add possibility to add additional results in DSR_TestsCommon, because NonZero doesn't support cases when both its outputs are unused, so we need to add at least one of them to function results.
2020-12-11 12:29:16 +03:00
Ilya Znamenskiy
b6f311b463 [IE CLDNN] Fully connected MMAD simd16 improvements (#3394) 2020-12-11 10:15:11 +03:00
Andrey Somsikov
7fe21dc6ee Fix windows build for gflags for time_tests (#3504)
GFlags builds multiple targets, require aligning build
options on windows builds.

FetchModule offloads project configuration to cmake. This also allows
to align build configurations and targets across projects:
https://crascit.com/2015/07/25/cmake-gtest/
2020-12-11 09:25:14 +03:00
Patryk Elszkowski
d8f00acd39 StridedSlice : slice and reverse new ref implementations (#3188)
* Create new iterators which allow to iterate over coordinates.

Use new iterators to speedup StridedSlice reference implementation.

* Call memcpy if reverse ref impl has nothing to reverse.

* Add unit tests for coordinate range.

* Change coordinates::RangeIterator to template.

* Yet another slice and reverse implementation.

Remove all stuff connected with ranges.

* Apply review suggestions.

* Back to ranges which base on CoordinateTransform.

* try to fix x84_32 build

* try to fix x84_32 build

* Ranges which return start, no, stride, direction.

* add input validation to coordinate_index

enable coordinate_range validation tests

* add some doxygens

* fix range increament

* add empyt range

* move SliceRange::get_value to cpp file

Co-authored-by: Patryk Elszkowski <patryk.elszkowki@intel.com>
Co-authored-by: ggalieroc <gabriele.galiero.casay@intel.com>
2020-12-10 18:36:12 +03:00
Liubov Batanina
6c0201108f Added missing headers to MVN ref (#3533) 2020-12-10 18:35:27 +03:00
Maxim Shevtsov
12d2121976 fixed compilation of MYRIAD/GPU only (no MKL_DNN) (#3552) 2020-12-10 17:10:00 +03:00
Ilya Lavrenov
ca08c5b45c Fixed Plugin API compilation with /WX (#3551)
* Fixed Plugin API compilation with /WX

* Removed generic_ie.hpp from white list

Co-authored-by: lab_ddpqa <lab_ddpqa@intel.com>
2020-12-10 16:49:30 +03:00
Alexey Varyzgin
3bcac1641d [BF16] BF16 simulator for AVX512 was done (#3424) 2020-12-10 16:25:01 +03:00
Alexander Chaiko
2cfc8ade62 [IE CLDNN] Suppress fsv16 layout if topology has many crop layers (#3445) 2020-12-10 16:23:29 +03:00
Mateusz Tabaka
3db6b54815 [ONNX] Use kernel shape in MaxPool to create default strides/dilations/paddings (#3522) 2020-12-10 12:59:47 +01:00
Bartosz Lesniewski
312db9a713 Remove ops from Layer Creator/ Node Converter - part 4 (#3485)
* remove gather op from layer creator

* remove floormod op from layer creator

* remove minimum op from layer creator

* remove spacetodepth op from layer creator

* remove redundant virtual function specifier
2020-12-10 14:30:43 +03:00
Pavel Esir
5b45299874 Spec for GatherElements-6 (#3304)
* added GatherElement_6.md spec

* corrected typos; updated examples

* moved sentence from spec to description

* ie_docs.xml updated

* made `axis` required

* removed redundant sentences

* added outputs shape info

* added 'the' articles

* removed error info about negative indices; some corrections

* rank correction in examples
2020-12-10 14:26:25 +03:00
Maxim Vafin
5bea1acb13 Specify MVN-6 operation (#3314)
* Specify MVN-6 operation

* Apply review feedback

* Fix typo

* Apply review feedback

* Apply review feedback

* Apply review feedback

* Small fix

* Fix review feedback

* Apply review feedback

* Fix MVN formula
2020-12-10 14:23:11 +03:00
Gleb Kazantaev
4d81bd9e0e Parametrize NMS5ToLegacy conversion to avoid Convert operatoins insertion that breaks outputs naming (#3480) 2020-12-10 14:07:20 +03:00
Gladilov, Gleb
8213505e24 [IE][VPU]: Enables native gather support (#3502)
* [IE]: Allows plugins to disable Gather -> GatherIE conversion

Gather layer takes axis as 3rd input, not attribute and may
take indices as 0D scalar input

Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>

* [IE][VPU]: Disables Gather -> GatherIE conversion

Gather -> GatherIE conversion may introduce Gather
operation decomposition into Unsqueeze + Gather +
Squeeze in case if indices input is 0D scalar input.

In case of dynamic Gather such decomposition will
break dynamic path. Myriad plugin has to support
Gather operation natively without legacy conversion.

Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>

* [IE][VPU]: Enables native Gather support

Gather layer in contrast with GatherIE takes
axis as 3rd input, not attribute and may take
indices input as 0D scalar input.

0D -> 1D conversion happens automatically at
the beginning of frontend.

Axis as 3rd input is supported for single value
integral scalar only.

Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>

* [IE][VPU][Tests]: Enable new infra single layer Gather tests

* Removes corresponding tests from old infrastructure
* Enables test cases with 0D indices input
* Extracts base test fixture from shared tests fixture.
  Unfortunately, Google Tests supports Combine generator
  for tuples of size up to 10 only. Originally, shared
  tests fixture already has 10 elements in tuple for
  tests parameters. At the same time myriad plugin needs
  to specify configuration option. Since configuration
  option could not be test parameter we are forced to
  use separate class, in order to get rid of code
  duplication base class is used.

Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>

* [IE][VPU]: Updates firmware

Enables native Gather support on device side
2020-12-10 13:23:36 +03:00
Nikolay Tyukaev
cf3213a9c5 cmake build all docs (#3539)
* cmake build all docs

* update doxy log parser

* update build_main_layout.py
2020-12-10 12:11:30 +03:00
Alina Kladieva
0a84b230bd [Jenkinsfile] Disable failFast & enable propagateStatus (#3503)
Co-authored-by: akladiev <akladiev@nncv-akladieva.inn.intel.com>
2020-12-10 12:05:03 +03:00
Ilya Churaev
9ea24c5b33 Removed reference implementations from tests (#3541) 2020-12-10 12:00:48 +03:00
Ivan Tikhonov
1ac3caf472 fix constant folding for sub graph ops (#3534) 2020-12-10 11:56:16 +03:00
Eugeny Volosenkov
6f512142b6 Re-implement onnx old-style extractors with extractor extensions (#3459)
* add class ConcatFrontExtractor for onnx

* add class ConcatFrontExtractor for onnx

* Delete concat from mo/front/onnx/extractor.py

* Add identity, reshape extractors classes for onnx

* import FrontExtractorOp

* Added BatchNormalizationExtractor

* Added extra line

* Fix import modules

* fix caffe bn.py and bn_test.py

* Fix BatchNormInference

* Modify convert_batch_norm

* Modify convert_batch_norm

* Modify bn_test.py

* Fix old comments BN->batchNormInference
2020-12-10 09:24:24 +03:00
Nikolay Tyukaev
6254b150c3 add animation (#2865) (#3545) 2020-12-10 02:30:10 +03:00
Ilya Lavrenov
e4260cdc3f Template device testing (#3521)
* Added template plugin testing on public CI

* Updated tests config

* Added DEVICE_TEMPLATE constant to tests

* Updated tests

* Disable template plugin by default

* Fixes

* Fixed HETERO tests
2020-12-09 17:13:32 +03:00
Nikolay Tyukaev
17df09967d math formula fix (#3512)
Co-authored-by: Nikolay Tyukaev <ntyukaev_lo@jenkins.inn.intel.com>
2020-12-09 17:03:46 +03:00
Anastasiya Ageeva
4a6e153d5a Added uninstallation instructions (#3446) 2020-12-09 17:02:38 +03:00
Kate Generalova
9d4b778234 [DOC] add Docker on Windows GPU infer instruction (#3492) (#3531)
* odc: add Docker on Windows GPU infer instruction

* Update docs/install_guides/installing-openvino-docker-windows.md

Co-authored-by: Alina Alborova <alina.alborova@intel.com>

* Update docs/install_guides/installing-openvino-docker-windows.md

Co-authored-by: Alina Alborova <alina.alborova@intel.com>

* Update docs/install_guides/installing-openvino-docker-windows.md

Co-authored-by: Alina Alborova <alina.alborova@intel.com>

* Update docs/install_guides/installing-openvino-docker-windows.md

Co-authored-by: Alina Alborova <alina.alborova@intel.com>

* Update docs/install_guides/installing-openvino-docker-windows.md

Co-authored-by: Alina Alborova <alina.alborova@intel.com>

* Update docs/install_guides/installing-openvino-docker-windows.md

Co-authored-by: Alina Alborova <alina.alborova@intel.com>

* Update docs/install_guides/installing-openvino-docker-windows.md

Co-authored-by: Alina Alborova <alina.alborova@intel.com>

* Update docs/install_guides/installing-openvino-docker-windows.md

Co-authored-by: Alina Alborova <alina.alborova@intel.com>

* Update docs/install_guides/installing-openvino-docker-windows.md

Co-authored-by: Alina Alborova <alina.alborova@intel.com>

* Update docs/install_guides/installing-openvino-docker-windows.md

Co-authored-by: Alina Alborova <alina.alborova@intel.com>

* Update docs/install_guides/installing-openvino-docker-windows.md

Co-authored-by: Alina Alborova <alina.alborova@intel.com>

* Update docs/install_guides/installing-openvino-docker-windows.md

Co-authored-by: Alina Alborova <alina.alborova@intel.com>

* Update docs/install_guides/installing-openvino-docker-windows.md

Co-authored-by: Kate Generalova <kate.generalova@intel.com>

* Removed an extra colon

* Update docs/install_guides/installing-openvino-docker-windows.md

Co-authored-by: Alina Alborova <alina.alborova@intel.com>

Co-authored-by: Alina Alborova <alina.alborova@intel.com>
2020-12-09 16:04:12 +03:00
Roman Vyunov (Intel)
76e489a161 [IE][VPU]: Performance fix for efficientnet-b0 (#3515) 2020-12-09 15:31:25 +03:00
Alexey Ershov
521b6f3b97 [IE][VPU]: Eltwise: 'person-detection-retail-0013' performance fix - firmware update (#3497)
* Eltwise: performance fix for 'person-detection-retail-0013' - firmware update
* Eltwise: fix hash values for updated firmware
2020-12-09 11:28:48 +03:00
Maxim Shevtsov
d0eef043fd [MULTI]Data affinity remote context and blobs (#3342)
* zero-copy (assuming determenistic app-level scheduling) for the multi-device, via "borrowing" the corresponding device-specific blobs and letting the app to implicitly use these

* Optimized Infer Request Scheduling

* remoteblob checks in the conventional SetBlob

* correctly (with status) reporting NOT_IMPLEMENTED

* SetBlob to accomodate for the RemoteBobs

* Tests for remote blobs support via MULTI: creating the shared_test in case the other (closed source) plugins would want to use that (in the private shared_tests instantiations).
Also instantiating the remote blobs tests for the some basic combinations to test the MULTI supports them

* macos compilation (and general plugin platform support) fix

* shuffled files, so that the MULTI tests are now part of the ieFuncTests (and need no separate target). Also brushed the macro that handales the NOT_IMPLEMENTED as bit

* further shuffled files, so that the initial MULTI tests are now part of the IE tests, yet specific instances do need separate targets

* Fixed misprint

* Brushing the code and comments a bit

* further brushing of the ScheduleToWorkerRequest: moving the task execution directly into the loop over devices (avoids pointers and 'else' clause)

* 1) zero-copy (assuming determenistic app-level scheduling) for the multi-device, via "borrowing" the corresponding device-specific blobs and letting the app to implicitly use these

2) Initial MULTI section in the opt guide (primarily to document a tip on helping the MULTI to keep the zero-copy path)

* [MULTI] remote context support and associated scheduling (respecting the remote data affinity)

* fix CentOS (old) gcc issue: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81880
since the intriduced therad_local string is template the bug manifests itself (and the string is not allocated/initialized).
the QA is to wrap the std::string into the function

* further fix for the old gcc versions issue, now with non-trivial thread_local destruction sefault: switching from the std::string to the plain const char*

* additional tests for the MULTI and remote blobs (no remote context and multi GPUs cases)

* fix for the tests (that now can check for more specific NotImplemented exeption).
Alos couple of line endings
2020-12-09 09:52:19 +03:00
Vladimir Paramuzov
8b9feed603 [IE CLDNN] Fixed bias/scales data type in ScaleShift layer (#3477) 2020-12-09 09:38:29 +03:00
Maksim Makridin
7d8144f160 Fixes for Object Detection SSD Python sample (#3518)
* added check so that sample only supports networks with one input
* moved ngraph-realted operations to related segment of the sample
* fix for output image not being saved correcly due
2020-12-08 23:16:59 +03:00
Maksim Makridin
2aec8a610b Adding Hello Reshape Python sample (#3375)
* Initialized hello_reshape_ssd Python sample

* * removed multiple input images functionality
* added couple of checks whether input topology is supported in sample

* Added readme
* Switched to single-quotes strings style
* Switched to f-strings
* Removed redundant code

* Simplified image original resolution handling
* Simplified some checks and assertions
* Simplified reading inference results and drawing bounding boxes
2020-12-08 22:54:00 +03:00
Mateusz Tabaka
8b90c9e7e2 [ONNX] Set defaults in LSTMSequence even if dimensions are dynamic (#3491)
Ticket: 43221
2020-12-08 14:53:24 +01:00
Gabriele Galiero Casay
6888ffa328 Revise Reference Implementation of Range op (#3409)
* Range: Align operator with spec and add unit tests

* Range: Remove output shape from range ref impl signature

* Range: Exclude backend unit tests for CPU and GPU due to unsupported dynamic ops

* Range: Add single layer test class for Range-4

* Range: Add unit test for shape inference

* Range: Add unit tests for i32 and f32

* Range: Refactor Range v0 backend test and added test for f32 type

* Range: Add floating point tolerance in unit tests to avoid failures due to precision

* Range: Add subgraph tests for Range add element-wise

* Range: Refactor Range class for single layer tests and add range add element-wise test with truncated inputs
2020-12-08 16:05:00 +03:00
Andrew Bakalin
e81201ea35 [VPU][TESTS][GNA] Fix dynamic models import on VPU (#3427)
* [VPU] Fix dynamic networks import

* [IE][GNA][TESTS] Move ImportExport tests from GNA to shared part

* [VPU][Tests] Add ExportImport test for dynamic network

* [VPU] Review fixes

* [VPU][Tests] Review and test fixes

* [VPU][Tests] Move TEST_P to shared part
2020-12-08 15:19:27 +03:00
Bartosz Lesniewski
86347bd909 Remove ops from Layer Creator/ Node Converter - part 3 (#3356)
* remove convert op from layer creator

* remove depthtospace op from layer creator

* remove mvn op from layer creator

* remove normalizel2 op from layer creator

* remove notequal op from layer creator

* remove subtract op from layer creator

* correct mvn op behavior when copied with new input

* fix trying to get precision from empty output of normalize layer

* fix normalize layer not setting output type

* remove trailing whitespace

* add fp64 to possible convert op precision types

* use a function to translate bool string representation

* merge emergency opset changes for mvn and roipooling ops
2020-12-08 06:42:47 +03:00
Mateusz Tabaka
305f005605 Add reference implementation for PSROIPooling operator (#3245)
* Add reference implementation for PSROIPooling operator

* fix test_roi_pooling

* use std::roundf

* remove unnecessary copies in single layer tets

* Fixes after review

* fixes after review

* use element::Type_t instead of element::

* apply code format

* add PSROIPooling to evaluates_map

* apply code format
2020-12-08 06:35:52 +03:00
Vladislav Volkov
ec48fcb29b CPU plugin selective build (#3360) 2020-12-07 17:49:08 +03:00
Alina Alborova
78d09d9691 Cherry-pick #2922 into master (#3494)
* Checrry-pick GNA doc review

* Addressed comments

* Removed an inexistent link
2020-12-07 17:41:39 +03:00
Maxim Shevtsov
57fda7f2a8 fixed data race introduced in the https://github.com/openvinotoolkit/openvino/pull/3300 (#3490)
it is easy to capture when there are 2 app-level inference requests, but only single worker (MULTI) request

main thread                                        |       callback thread
___________________________________________________________________________
                                                   | <in the callback, the worker request>
                                                   |   <the request returns itself to the "idle" queue>
                                                   | 1) idleGuard.Release()->try_push(workerRequestPtr)
2)<notified on vacant worker arrived via callback> |
3) starts another request with StartAsync          | ...
4) <in the ThisRequestExecutor::run()>             |
workerInferRequest->_task = std::move(task);       | if (_inferPipelineTasks.try_pop(workerRequestPtr->task))

the last line introduces DATA RACE (sporadically manifested in the bad_function_call exception), the fix is in this commit
2020-12-07 16:58:26 +03:00
Bartek Szmelczynski
6bad345df9 Refactor boolean attribute type (#3478)
* Refactor boolean attribute type

* fix python code
2020-12-07 15:42:28 +03:00
Alexandra Sidorova
33ca1760f0 [CPU][IE TESTS] Covered Round .5 cases with tests (#3473) 2020-12-07 14:48:10 +03:00
Andrey Somsikov
5cc08367b2 Build time_tests with OpenVINO install (#3484) 2020-12-07 12:56:37 +03:00
Roman Donchenko
fc40104c7f Make the Python tools directly executable (#3476) 2020-12-07 08:16:00 +03:00
Jozef Daniecki
fc049fc6ce Fix serialization dynamic shapes (#3475)
* Align EpsMode attribute to specification.

* Change dynamic shape resolving in serialization.
2020-12-07 06:55:10 +03:00
Alexey Suhov
8581a0730d update OpenCV to 4.5.1 (#3482)
* update OpenCV to 4.5.1
2020-12-07 00:42:31 +03:00
Bartosz Lesniewski
2da6546841 Remove ops from Layer Creator/ Node Converter - part 2 (#3226)
* remove power op from layer creator

* remove prelu op from layer creator

* remove tile op from layer creator

* remove relu op from layer creator

* remove selu op from layer creator

* remove softmax op from layer creator

* remove tanh op from layer creator

* remove split op from layer creator

* remove reshape op from layer creator

* remove reverse sequence op from layer creator

* remove proposal op from layer creator

* remove priorbox op from layer creator

* remove roipooling op from layer creator

* remove priorboxclustered op from layer creator

* style fix

* utility function to parse bool-containing strings

* align priorbox scale_all_sizes parameter to specification

* change location of getBoolStrParamAsIntStr function

* align prelu creator to new constant op changes

* adjust priorbox tests to align with scale_all_sizes default value

* adjust priorbox python tests to align with scale_all_sizes default value

* align priorboxclustered attributes initlialization to specification

* fix checking wrong container's end iterator for opset name search

* improve comment on roipooling parameters

* Apply review suggestion 1

Co-authored-by: Ilya Churaev <ilyachur@gmail.com>

* Apply review suggestion 2

Co-authored-by: Ilya Churaev <ilyachur@gmail.com>

* align priorbox step initial value to specification

* align roipooling method attribute to specification

* remove roipooling specific creator

* align with review comments

Co-authored-by: Ilya Churaev <ilyachur@gmail.com>
2020-12-04 19:49:36 +03:00
Liubov Batanina
29b8ffa40b Fixed ReduceL2Decomposition (#3452)
* Fixed ReduceL2Decomposition

* Added test
2020-12-04 13:56:01 +03:00
Ilya Churaev
256e047ad2 Revert "Deprecate global element types (#3444)" (#3468)
* Revert "Deprecate global element types (#3444)"

This reverts commit 071fb9d1c6.

* Fixed code style
2020-12-04 13:28:53 +03:00
Piotr Szmelczynski
3d66869081 add f64 support to ngraph serializer (#3462)
* add f64 support to ngraph serializer

* Create add_abc test with f64 type
2020-12-04 12:13:32 +03:00
Alina Kladieva
291785dc14 [tests|layer_tests_summary] Add requirements.txt (#3457)
Co-authored-by: akladiev <akladiev@nncv-akladieva.inn.intel.com>
2020-12-04 11:21:30 +03:00
Chenhu Wang
d35e3e806b [CPU]disable and cleanup interp and resample that are covered by interpolate (#3164)
* [BF16] Interpolate layer and test were updated for support BF16

Co-authored-by: alexey-varyzgin <alexey.varyzgin@intel.com>
2020-12-04 11:05:10 +03:00
Anton Chetverikov
a7ede592c3 Fix mode attribute value in DepthToSpace ONNX operation extractor (#3466) 2020-12-03 19:33:07 +03:00
Andrey Sokolov
58aee75914 [IE][VPU]: Add interpolate nearest 2x upscale optimization (#3315) 2020-12-03 18:19:50 +03:00
Ilya Churaev
e1c9d91ece Changed extern to constexpr for global element type (#3463)
* Changed extern to constexpr for global element type

* Fixed comments
2020-12-03 17:58:17 +03:00
Vladimir Paramuzov
325a0a4f5e Added cloneNetwork method into plugins api (#3450)
* Added cloneNetwork method into plugins api

* Fixed cloneNetwork call in MKLDNN and GNA plugins to pick correct function

* Changed return type
2020-12-03 17:53:15 +03:00
Ilya Lavrenov
2d75d8aff2 Removed global using namespace from Plugin API (#3451) 2020-12-03 17:52:55 +03:00
Vladislav Golubev
f2c2636bb5 [LPT] isPrecisionPreserved/canBeTransformed/isQuantized: handling unexpected layers tests (#3139) 2020-12-03 16:26:24 +03:00
Nikolay Tyukaev
c2e1f488e4 doc updates (#3437)
* doc updates

* delete linkchecker_filter.yaml

* parse doxygen log
2020-12-03 14:02:38 +03:00
Mikhail Treskin
6467c64000 Remove opset0 support and undesired passes from Interpreter backend (#1469)
* Move evaluate() interface from some OPs to Interpreter

* commit

* Move shuffle channels reference to OP's evaluate

* Add some operations missed in evaluate_node

* Fix select references invocation from evaluate_node()

* Activation refs (#2)

* HardSigmoid

* Elu

* Selu

* Gelu

* Move to test runtime

* Rollback donwgrade passes delition

* Initial batch to space refs

* Return opset1_upgrade

* WIP: Add space to batch evaluate

* Fix space to batch

* add evaluates function in evaluates_map (#4)

* Add space to batch evaluate

* Fix crop in batch to space references

* Remove vectors reallocation in evaluates for b2s and s2b

* .

* Add SpaceToDepth evaluate

* Add depth to space evaluate

* Remove code duplication depth to space evaluate

* Fix some failed layer tests

* Ngraph test (#3)

* Remove some v0 ops & fix some tests

* Fixes BatchNorm

* Next

* dd

* s

* Add dot & replace slice refs

* d

* dkj

* Review fixes part 1

* Fixes. Part 2

* Fixes. Part 3

* Enable cells refs in evaluate map

* Fix some failed layer tests

* Some more fixes

* Fix code style (#6)

* Tests (#7)

* PriorBox

* Mod

* NormilizeL2

* Update prior_box.hpp

* Fix one hot ref call

* .

* Select (#8)

* Select

* Fix code style

* Fix select messages

* ReverseSeq (#9)

* ReverseSeq

* Select

* ExtractImagePatches, Seqence

* Fix Code Style

* remove extra

* Remove etra line@

* Add fake quantize reference

* Align convolution layer tests instantiations with updated definition

* Disabled some failed LPT tests

* Disabled some failed LPT tests

* Remove undesired changes

* Update unit-test manifests + some code cleanup

* Fix code style (#10)

* Normalize L2 refs support (from PR #2327)

* Fix code style

* Apply review comments. Part 1 (#11)

* Apply first part of review comments

* Update onnx_import.in.cpp

* Remove redundant reshape from shuffle_channels evaluate

* Decompose GroupConvolution

* [IE Ngraph] Fix some operation inheritance  (#13)

* [IE TESTS] Depth2Space

* Space2Depth

* ShuffleChannels

* Fix ode style

* Fix code style

* [IE NGraph] Remove decompose op (#14)

* .

* Fix loosing control dependency in replace_node

* Fix loosing control dependency in replace_node

* Fix code style

* Fix FQ references build on windows

* Fix code style

* Apply comments (#15)

* [Ie Ngraph] Remove using v1::Add

* [Ie Ngraph] Remove using v1::Mutliply

* [Ie Ngraph] Remove using v1::Subtract

* [Ie Ngraph] Remove using v1::Divide

* [Ie Ngraph] Remove using v1::Equal

* [Ie Ngraph] Remove using v1::Greater

* [Ie Ngraph] Remove using v1::Greater_eq

* [Ie Ngraph] Remove using v1::Less

* [Ie Ngraph] Remove using v1::LessEq

* [Ie Ngraph] Remove using operator+

* [Ie Ngraph] Remove using operator/

* [Ie Ngraph] Remove using operator*

* [Ie Ngraph] Remove using operator-

* Fix code style

* Ci (#16)

* Fix CentOS compilation

* Revert ngraph::op::vo::Multiply removing due to OpenCV

* Android fix (#17)

* fix failures

* Fix code style

* Add (#18)

* Android fix

* Add

* Add in opset1 upgrade pass

* Add in opset1 upgrade pass

* Remove v0::Add, Reverted removing v0::Multiply (#19)

* Remove overloaded math operators from PyNgraph

* Remove overloaded math operators from PyNgraph

* Fix gna tests (#20)

* Fix gna tests

* Squashed commit of the following:

commit 565b504c1c
Author: Alexander Zhogov <alexander.zhogov@intel.com>
Date:   Tue Oct 13 13:27:34 2020 +0300

    GitHub CI: Add files_size.yml (#2570)

    * GitHub CI: Add files_size.yml

    * Update job name

commit ab0fb29853
Author: Vladislav Vinogradov <vlad.vinogradov@intel.com>
Date:   Tue Oct 13 11:37:30 2020 +0300

    [IE][BUILD] Fix C5208 warning under Windows (#2628)

    * C++ feature in C `typedef struct` code.
    * The warning can be promoted to error in dependent projects.

    C5208: unnamed class used in typedef name cannot declare members other than
    non-static data members, member enumerations, or member classes

commit 15a338e89b
Author: helmutg <helmut@subdivi.de>
Date:   Mon Oct 12 22:24:24 2020 +0200

    add build option USE_SYSTEM_PUGIXML (#2502)

    It allows skipping inference-engine/thirdparty/pugixml and using the
    system copy instead.

    Thanks to @Osse for helping understand cmake scoping rules.

    Co-authored-by: Helmut Grohne <helmut.grohne@intenta.de>

commit 7ac8cd8586
Author: Alexander Zhogov <alexander.zhogov@intel.com>
Date:   Mon Oct 12 19:23:00 2020 +0300

    Azure CI: Fix nGraph ONNX

commit 3a2e33962c
Author: Alexander Zhogov <alexander.zhogov@intel.com>
Date:   Mon Oct 12 19:20:28 2020 +0300

    Azure CI: Disable steps in nGraph ONNX

commit 5835974fad
Author: azhogov <alexander.zhogov@intel.com>
Date:   Mon Oct 12 18:46:14 2020 +0300

    Azure CI: Add linux_ngraph_onnx.yml

* LRN Reference (#21)

* Disable failed tests on ia32

* Remove redundant broadcast from MVN ref

* Fix missed GatherND in opset_int_tbl + code style

* Remove one extra temporary buffer from MVN ref

* Merge master (#22)

* Leaky relu transformation refactor (#2640)

* Refactored LeakyRelu transformation

* Added unit test for LeakyRelu transformation + removed duplicate test function valued_const

* nGraph implementation of NMS-5 (without `evaluate()`) (#2651)

* Written nGraph NMS-5 without evaluate().

* Used NGRAPH_RTTI_DECLARATION.

* setupvars.sh: Updated setting pyenv error to warning. (#2663)

* Fix itt build (#2662)

* Loop-5 operation specification (#2291)

The Loop-5 operation specification

* Time tests improvements (#2642)

* Remove extra functions from run_timetest.py

* Add `log.debug` of raw and aggregated statistics in run_timetest.py

* Implement storing of models locally for test_timetest.py

* Fixed CVS-35316 (#2072)

* Extend MO for operation GatherND (#2540)

* Extend MO for operation GatherND

* Update documentation

* Rename GatherNd.py to gathernd.py

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

* Add hsigmoid op to ngraph (#2647)

* [IE CLDNN] Fixes for GatherTree and ReverseSequence  (#2660)

* ReorgYolo reference implementation (#2384)

* Align ReorgYolo to the spec (vector strides -> int stride)

* ReorgYolo ref impl

* ReorgYolo evaluate method

* ReorgYolo tests

* Tests update

* Style apply

* Add some coments

* Code refactor

* Comment update

* Style apply

* Build fix, mark evaluate as override

* Revert "Align ReorgYolo to the spec (vector strides -> int stride)"

* Use int_executable instead of evaluate

* Use char* instead of templates

* Code refactor

* Comment update

* Code review comment

* Add constructor aligned with spec

* Update shape validation

* Update attributes tests

* Add type_prop tests

* Update backend tests

* Add single layer tests

* Update the spec

* Remove wrong transformation test

* Add ReorgYolo to evaluates_map

* code style

Co-authored-by: Evgeny Lazarev <evgeny.lazarev@intel.com>
Co-authored-by: Vladimir Gavrilov <vladimir.gavrilov@intel.com>
Co-authored-by: Artyom Anokhov <artyom.anokhov@intel.com>
Co-authored-by: Andrey Somsikov <andrey.somsikov@intel.com>
Co-authored-by: Vitaliy Urusovskij <vitaliy.urusovskij@intel.com>
Co-authored-by: Anastasiya Ageeva <anastasiya.ageeva@intel.com>
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
Co-authored-by: iliya mironov <iliya.mironov@intel.com>
Co-authored-by: Vladimir Paramuzov <vladimir.paramuzov@intel.com>
Co-authored-by: Katarzyna Mitrus <katarzyna.mitrus@intel.com>

* RegionYolo

* Apply review comments

* Merge remote-tracking branch 'upstream/master' into update_evaluates

# Conflicts:
#	ngraph/core/src/op/mvn.cpp
#	ngraph/test/backend/fused_op.in.cpp
#	ngraph/test/runtime/ie/unit_test.manifest
#	ngraph/test/runtime/interpreter/int_executable.hpp
#	ngraph/test/runtime/interpreter/opset_int_tbl.hpp
#	ngraph/test/runtime/interpreter/unit_test.manifest
#	ngraph/test/runtime/opset0_tbl.hpp

* Apply code style

* Apply comments

* Apply code style

* Fix RegionYolo evaluate redefinition

* Removed defines from evaluates map

* Apply code style

* Fix MVN ref

* rename select reference argument

* Fix code style

* Fix Fake Quantize references calculation (#24)

* Fix MVN ref

* Fix MVN & adding NMS

* Fix TI

* Temporary relax comparison threshold for FQ SLT

* Fix GPU LPT Tests

* Add explicit rounding mode seetting in FQ references

* Apply code style

* Rollback op_is test deletion

* Apply code style

* Fix merge conflict resolving issues

* Apply code style

Co-authored-by: Irina Efode <irina.efode@intel.com>
Co-authored-by: Anton Zaytsev <anton.zaytsev@intel.com>
Co-authored-by: Evgeny Lazarev <evgeny.lazarev@intel.com>
Co-authored-by: Vladimir Gavrilov <vladimir.gavrilov@intel.com>
Co-authored-by: Artyom Anokhov <artyom.anokhov@intel.com>
Co-authored-by: Andrey Somsikov <andrey.somsikov@intel.com>
Co-authored-by: Vitaliy Urusovskij <vitaliy.urusovskij@intel.com>
Co-authored-by: Anastasiya Ageeva <anastasiya.ageeva@intel.com>
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
Co-authored-by: iliya mironov <iliya.mironov@intel.com>
Co-authored-by: Vladimir Paramuzov <vladimir.paramuzov@intel.com>
Co-authored-by: Katarzyna Mitrus <katarzyna.mitrus@intel.com>
2020-12-03 12:36:34 +03:00
Eugeny Volosenkov
b3124a5c77 Fix issue with np.expand_dims for numpy<18.x (#3436)
* Fix trouble with np.expand_dims for numpy<18.x

* Delete function expand_dims

* Added additional line
2020-12-03 09:48:17 +03:00
Piotr Szmelczynski
8344c29090 Maxpool revise (#3397)
* create MaxPoolLayer test

* Create single layer tests for MaxPool for cpu plugin

* create max_pool_2d_ceil unit test

* Update MaxPool spec

* add comments describing AUTO and NOTSET types

* create unit test for MaxPool

* add type_prop test for default values

* add MaxPool unit tests to CMakeList

* Remove second constructor and change the first one so it has default values for rounding_type and auto_pad

* style-apply

* Update the spec

* add max pool single layer test instances for different pad type

* add 5D input max pool single layer test instance for cpu plugin

* Remove max pool single layer tests files

* add more test instances for max pool single layer tests for cpu plugin

* add newline characters
2020-12-03 06:44:20 +03:00
Ilya Churaev
071fb9d1c6 Deprecate global element types (#3444)
* Removed global types

* Fixed ONNX importer and nGraph tests

* Fixed code style

* Disable some warnings for Windows

* Try to fix python build

* Extend deprecation message

* Fixed code style

* Fixed comments
2020-12-02 21:27:17 +03:00
Ilya Lavrenov
2a478841ac Fixed template extensions build (#3456) 2020-12-02 19:33:34 +03:00
Sergey Lyubimtsev
51c06ef36b cmake install fixes (#3453)
* [MO] Add CMake install for Model Optimizer

* [MO] Update test for version.py

* [MO] Add CMake install for Model Optimizer

* [MO] Update test for version.py

* [MO] Add CMake install for Model Optimizer

* [MO] Update test for version.py

* - fix install paths for onnx_reader and ir_reader

- remove static lib installation for plugins on plugins
- 97-myriad-usbboot.rules is installed only for Linux

* added new line
2020-12-02 19:19:21 +03:00
Ilya Lavrenov
8f1bb56ca2 Improved find_package for docs (#3447) 2020-12-02 17:30:52 +03:00
Sergey Lyubimtsev
b99bacd245 setupvars should export TBB_DIR (44241) (#3434)
* [MO] Add CMake install for Model Optimizer

* [MO] Update test for version.py

* [MO] Add CMake install for Model Optimizer

* [MO] Update test for version.py

* [MO] Add CMake install for Model Optimizer

* [MO] Update test for version.py

* export TBB_DIR  in setupvars
2020-12-02 14:18:59 +03:00
Bartosz Sledz
a493224c6b Meaningful warning when nGraph Constant for initializer couldn't be created (#3443) 2020-12-02 12:17:39 +01:00
Jan Iwaszkiewicz
e1a7f7e5af [nGraph][IE] Enable FP64 data type in IE and review nGraph Python tests (#2563) 2020-12-02 12:09:28 +01:00
Michał Karzyński
95cae09566 Add support for multiple outputs in nGraph Python API (#3421) 2020-12-02 11:49:10 +01:00
Gleb Kazantaev
a43edfb74b Revert "Revise of reshape operator after documentation update (new tests, remove unused code) (#3410)" (#3430)
This reverts commit cb03a5e052.
2020-12-01 21:06:15 +03:00
Maxim Vafin
bbb7478460 Add support for onnx FasterRCNN model (#3393)
* Add support for onnx FasterRCNN model

* Add documentation
2020-12-01 18:45:08 +03:00
Kamil Magierski
86e5461d4b [GNA] Flatten trivial concatenations (#3396)
* [GNA] Flatten trivial concatenations

* [GNA] move test to subgraph tests

* Style

* style

* review

* fix

* fixes
2020-12-01 18:33:36 +03:00
Jedrzej Hajduczenia
4a91f914e2 [IE CLDNN] Improve network outputs detection in quantized FP16+INT8 IR to avoid converting them to FP16 precision (#3407) 2020-12-01 13:27:51 +03:00
Evgenya Stepyreva
c902eb5df7 [MO] Aligned MatMul-1 with spec (#3337)
* [MO] Aligned MatMul-1 with spec

* removed link to the doc
2020-12-01 13:02:14 +03:00
Patryk Elszkowski
8e64eb21cb faster implementation of gather_nd operator for reference implementations (#2897)
* faster implementation of gather_nd operator for reference implementations

* remove old impl and time measurements

* exclude test for gather_nd for IE_CPU (output mismatch)

* apply review comments and rename variables for clarify

* rename variables according to PR comments

* try to apply all PR suggestions

* fix indices calcualtions

Co-authored-by: Patryk Elszkowski <patryk.elszkowki@intel.com>
2020-12-01 12:48:58 +03:00
Yegor Kruglov
ce1ec9eab0 Reshape-able SliceConverter (#3198)
* initial commit

* add cast

* data type fix

* added tests

* added test without axes and steps

* remove redundant imports

* discussions resolving

* Add cast to TFSliceToSlice

* layer tests fix

* update unittest

* rework transformation

* added clamp

* move broadcast

* update unittests

* failed e2e fix

* added comment

* little fixes

* comments update
2020-12-01 12:42:40 +03:00
Szymon Durawa
b491a8dc4f Visitor API deserialization for ops from opset1 (#3001)
* Comment layer creator and node converter for Elu and Clamp ops.

* Add deserialization for GRN, HardSigmoid, GatherTree.

* Add implementation for Interp, GRN, GatherTree.

* Remove layer creation from ie_ir_parser.cpp

* Remove header files from cnn builder.

* Change op's type in elu functional test, remove name transformtion for this op from ir_parser.

* Remove empty lines.
2020-12-01 12:20:27 +03:00
Maxim Vafin
500a95d960 Fix shape inference for Transpose nodes inserted by ApplyPermutes (#3348) 2020-12-01 11:54:29 +03:00
Alexander Peskov
f6dcf45e1c Restore compilaltion with tbb 2017u7 (#3007)
* Restore compilaltion with tbb 2017u7

Signed-off-by: Alexander Peskov <alexander.peskov@intel.com>

* Fix unsupported arg for tbb deterministic_reduce

Signed-off-by: Alexander Peskov <alexander.peskov@intel.com>

Co-authored-by: Alexander Zhogov <alexander.zhogov@intel.com>
2020-12-01 11:00:58 +03:00
Ilya Lavrenov
776005749c Documentation fixes (#3418)
* Fixed documentation build when paths contain spaces

* ops math formula fix

* Fixed typo in

* Added more dependencies for openvino_docs

* Improvements

Co-authored-by: Nikolay Tyukaev <ntyukaev_lo@jenkins.inn.intel.com>
2020-12-01 06:33:36 +03:00
Ilya Lavrenov
9b203938bd API changes updates for 2021.2 (#3420) 2020-12-01 06:28:06 +03:00
Bartosz Sledz
cb03a5e052 Revise of reshape operator after documentation update (new tests, remove unused code) (#3410)
* Remove unnecessary code from the reshape operator shape deduction

* Add new tests to cover cornercases after documentation update

* Fix typo in test name

* Fix codestyle issues

* Fix tests naming
2020-12-01 06:03:20 +03:00
Evgeny Lazarev
0a52702e6a Removed confusing information about required/optional output of the operation. The output exists always but it may be not connected to anywhere. (#3423) 2020-11-30 20:02:09 +03:00
Vitaliy Urusovskij
e910902c9d Fix paths for squeezenet1.1 in time_tests config (#3415) 2020-11-30 18:45:08 +03:00
Maksim Doronin
0a0d854284 [IE][VPU]: Mish decomposition (#3411)
Introduce vpu ngraph transformation that decomposes Mish layer with the following formula: mish(x) = x * tanh(ln(exp(x) + 1)). It is needed to fix the accuracy drop of Yolo-v4 public model that happened due to Mish implementation in the myriad plugin is not accurate enough. It is just a workaround and will be removed when Mish layer will be improved.
map: 70.97% (ref: 70.96%)
coco_precision: 73.50% (ref 73.49%)
2020-11-30 18:00:46 +03:00
Nikolay Tyukaev
2df43a663b added docs_check target (#3403) 2020-11-30 16:26:01 +03:00
Maxim Shevtsov
5779fb4a22 [MULTI] Zero-copy (when backed by the determenistic app-level scheduling) (#3286)
* Optimized Infer Request Scheduling

* Fixed misprint

* Brushing the code and comments a bit

* further brushing of the ScheduleToWorkerRequest: moving the task execution directly into the loop over devices (avoids pointers and 'else' clause)

* 1) zero-copy (assuming determenistic app-level scheduling) for the multi-device, via "borrowing" the corresponding device-specific blobs and letting the app to implicitly use these

2) Initial MULTI section in the opt guide (primarily to document a tip on helping the MULTI to keep the zero-copy path)

Co-authored-by: apankratovantonp <anton.pankratov@intel.com>
2020-11-30 16:03:42 +03:00
Alexander Zhogov
7194570445 Azure: Add contrib build (#3414)
* Azure: Add contrib build

* Fix checkout
2020-11-30 15:48:07 +03:00
Gleb Kazantaev
3862477ce8 Gkazanta/update doc master (#3413)
* Updated transformations docs

* Added RTTI to examples

* Fixed grammar mistakes

* Mention Sinks in NG docs
2020-11-30 15:13:01 +03:00
Alexander Chaiko
e9e99931b3 [IE CLDNN] Allow fusing FQ to deconvolution (#2875) 2020-11-30 14:40:57 +03:00
Sergey Lyubimtsev
e12b24a0bc CMake installation rules for 3rd party components (#2944)
* [MO] Add CMake install for Model Optimizer

* [MO] Update test for version.py

* [MO] Add CMake install for Model Optimizer

* [MO] Update test for version.py

* [MO] Add CMake install for Model Optimizer

* [MO] Update test for version.py

* Add CMake install rules for OpenVINO 3rd party dependencies

Remove unwanted targets from final distribution (test, static libs, etc)

* remove duplicated targets from install

align GNA Windows install path with Linux

* Add COMPONENT install name for OMP

remove empty lines

* Add OMP to CPack components

* remove gtest from deliverables

add explicitly clDNN_unit_tests target to build

* set clDNN_unit_tests properties only by condition

* remove install commands for clDNN

Co-authored-by: Alexander Zhogov <alexander.zhogov@intel.com>
2020-11-30 12:29:30 +03:00
Ilya Lavrenov
fb1b03752d Removed legacy from hetero plugin (#3398)
Co-authored-by: apankratovantonp <anton.pankratov@intel.com>
Co-authored-by: Alexander Zhogov <alexander.zhogov@intel.com>
2020-11-30 07:08:31 +03:00
Gabriele Galiero Casay
ac8a39da87 Reference Implementation of ROIPooling op (#2903)
* ROIPooling: Specification and op class alignment

* ROIPooling: Add check to input tensor type to be aligned with spec

* ROIPooling: Corrected spec description for input tensor shape and box coordinates

* ROIPooling: Changed attributes pooled_h and pooled_w from Shape to plain int

* Revert "ROIPooling: Changed attributes pooled_h and pooled_w from Shape to plain int"

This reverts commit d49cfa8e53.

* ROIPooling: Further specification changes

* ROIPooling: Rename enum class ROIPoolingMethod methods

* Fix style

* ROIPooling: Draft reference implementation

* ROIPooling: Adjust feature map element type to float for attribute unit test

* ROIPooling: Add single layer test class

* ROIPooling: Corrected output index to iterate through output tensor elements

* ROIPooling: Added validation checks for input types in op constructor

* ROIPooling: Add unit tests

* ROIPooling: Attributes unit test changed to align with spec

* ROIPooling: Add check for batch id in reference implementation and unit test

* ROIPooling: Refactor single layer test class

* ROIPooling: Add test for invalid pooling method

* ROIPooling: Clean up unnecessary function declaration

* ROIPooling: Remove duplicated default ROIPooling method in op constructors

* ROIPooling: Add Infer method to generate suitable ROI data

* ROIPooling: CPU single layer test instantiation for max method

* ROIPooling: Remove enum class ROIPoolingMethod

* Revert "ROIPooling: Clean up unnecessary function declaration"

This reverts commit 074b540dea.

* ROIPooling: Refactor single layer tests after removing enum class ROIPoolingMethod

* ROIPooling: Add attribute checks in op constructor to align with spec and unit tests

* Resolve CI failure: clang could not resolve static conversion from uint64_t to size_t

* ROIPooling: Fix for output index calculation to loop through all ROIs

* ROIPooling: Add unit test for bilinear interpolation method

* ROIPooling: Add CPU single layer test instantiation for bilinear method

* ROIPooling: Clean up unnecessary enum class for pooling method

* ROIPooling: Add myriad single layer test instantiation

* ROIPooling: Add F16 precision single layer tests for CPU plugin

* ROIPooling: Add node validation check for string method attribute in constructor and unit tests

* ROIPooling: Spec changes to improve understanding of the operation

* ROIPooling: Fix for bilinear method when pooled size is 1x1

* ROIPooling: Add unit test for bilinear method and pooled size 1x1

* ROIPooling: Fix to broken format of specifications

* ROIPooling: Disable Myriad single layer tests

* ROIPooling: Handle dynamic dims and ranks for input tensors and unit tests

* ROIPooling: Code clean up

* ROIPooling: Address review comments

* ROIPooling: Changed location for makeROIPooling helper method

Co-authored-by: Kirill Molchanov <kirill.molchanov@intel.com>
2020-11-30 06:59:31 +03:00
Ilya Lavrenov
b676765dbc Documentation updates (#3399)
* Added ie_docs dependency on ngraph_cpp_api because of tag files

* Fixed tags files for Plugin API
2020-11-30 06:54:13 +03:00
Konstantin Satunin
083302dfb6 Solve warnings with PDB flags override (#3296)
* resolve clash of tests compile pdb file names

* Solving problem using different way

* resolve duplicate flags for gtest
2020-11-27 18:16:45 +03:00
Alexey Suhov
1a94d08d3d [install_prerequisites.sh] upgrade pip to install tensorflow (#3392) 2020-11-27 18:15:11 +03:00
Szymon Durawa
badc50bd08 Deserialization for: Convolution, FakeQuantize, Lrn, Onehot, Pad and … (#3116)
* Deserialization for: Convolution, FakeQuantize, Lrn, Onehot, Pad and Matmul.

* Replace converter with addBlob function.

* Apply review remarks.

* Apply reivew remarks, undo Loop removal.

* Remove transpose conversion for matmul op.
2020-11-27 18:01:55 +03:00
Anastasia Kuporosova
5ecb4a3960 [Python API] fix memleak in read_network from buffer (#3345)
* [Python API] fix memleak in read_network from buffer

* use memblob
2020-11-27 16:52:20 +03:00
Irina Efode
6534d315a5 [IE TESTS] Remove extra dependencies from NgraphFunction lib (#3222)
* [IE TESTS] Remove extra dependencies from NgraphFunction lib

* [TEMPORARY] Create LPT ngraph lib

* refactoring ngraph_helpers

* Fix LTO
2020-11-27 16:48:39 +03:00
Anton Pankratv
4b44608b3f Optimized Infer Request Scheduling (#3300)
* Optimized Infer Request Scheduling

* Fixed misprint

* Brushing the code and comments a bit

* further brushing of the ScheduleToWorkerRequest: moving the task execution directly into the loop over devices (avoids pointers and 'else' clause)

Co-authored-by: Maxim Shevtsov <maxim.y.shevtsov@intel.com>
2020-11-27 16:37:57 +03:00
Ilya Lavrenov
6aa7c51de9 Removed ICNNNetwork from Plugin API (#3384)
* ICNNnetwork

* Removed ICNNNetwork from Plugin API
2020-11-27 16:30:02 +03:00
Elizaveta Lobanova
7d5da24f10 [GNA] Fix of unsupported size of Diagonal layer (#3352) 2020-11-27 15:56:05 +03:00
Elizaveta Lobanova
a889acec53 [GNA] Fixes for concat with multiple const inputs (#3130) 2020-11-27 15:52:44 +03:00
Maksim Doronin
49589855d8 [IE][VPU]: Use unified pcie firmware (#3382)
* Unified firmware named pcie-ma2x8x is needed to use both ma2480 and ma2085 with pcie connection.
* Update firmware built from develop branch
2020-11-27 14:03:31 +03:00
Alexey Varyzgin
2667bffa0d [CPU BF16] Bfloat16 inference optimizations (#2633)
* [CPU BF16] Greedy mode was added

* [IE TESTS][BF16] Added support for operations with bf16 precision in the single layer tests.

* Added cpu specific bfloat16 single layer tests for the jit_eltwise primitive.

* [CPU TESTS] Activation and logical single layer tests fixes.

* [IE TESTS] Fix activation single layer tests run.

* [IE TESTS][CPU] CPUTestBase further refactoring.

* [CPU BF16] Support for Bfloat16 type was added to the MVN layer. (#3)

* [CPU BF16] MVN layer bfloat16 compatibility.

* [CPU BF16] MVN bfloat16 minor fixes.

* [CPU BF16] MVN node exception about BF16 support replaced with precision redefinition.

* [CPU BF16] MVN layer bloat16 support fixed for quantization operations and blocking layout.

* [CPU] Input and output precision checks were added to MVN layer.

* [IE TESTS][CPU BF16] Most of the bloat16 tests have been fixed.

* Bf16 crop layer (#4)

* [IE TESTS][CPU] Cpu specific test for the Crop layer has been created.

* [IE TESTS][CPU] Deprecated Crop single layer test removed.

* [CPU BF16] Bfloat16 precision was added to the Crop layer.

* [CPU BF16] Crop layer minor code improvements.

* [IE TESTS][CPU] Crop layer test added 2D tensor tests.

* [IE TESTS][CPU] Crop layer test, obsolete comment removed.

* [IE TESTS][CPU] Fixed CropIE include path.

* Crop test fix for older gcc compiler.

* [CPU BF16] Reduce layer extended with bfloat16 support.

* [IE TESTS][CPU] CPU specific single layer test for Reduce operation.

* BF16 optimized layers

* [CPU BF16] Bfloat16 custom type added to the MKLDNN plugin.

* [CPU BF16] Mem alignment to 16 bytes added to bfloat16 class union.

* [IE TESTS][CPU] Permute cpu specific single layer test and minor cpu tests fixes

* MVN cpu single layer tests extended with nhwc ndhwc layouts.

* Mod mode removed from Eltwise cpu single layer test.

* Permute cpu specific single layer test.

* Smoke keyword was added to the CPU single layer tests.

* Normalize node was modified for BF16 support

* [CPU BF16] The RegionYolo layer has been extended with the bfloat16 type support.

* Resample node was extended with BF16

* Select layer was enabled with BF16

* psroi supports bf16 (#7)

* reorders replaces converts (#9)

* BF16 planar pooling was enabled

* [CPU BF16] Cpu_convert added to the RegionYOLO node.

* [IE TESTS][CPU] Crop single layer test has been rewritten using the StridedSlice operation.

* [IE TESTS][CPU] Covert layer test extended with bf16 precision.

* [CPU BF16] The bfloat16 class was renamed bfloat16_t and some refactoring has been done.

* [CPU BF16] RegionYOLO and Softmax were aligned with the review.

* [IE TESTS CPU] CPU single layer tests refactored according to the review suggestions.

* [IE TESTS CPU] The Reduce CPU single layer test was extended with different mem orders.

* [IE TESTS CPU] Minor fixes after the review.

* [IE TESTS CPU] Common plugin configuration has been moved to PreparePluginConfiguration function.

* Minor changes after review

* StridedSlice, Select, ScaleShift notes were resolved

* Fixes to the Reduce operation cpu test and minor fixes related to the review.

* GPU eltwise tests fix.

* psroi unrolled to the primary state; code clean (#12)

* PSROIPooling layer with C++ optimizations

* Minor fix for compatibility with CPUTestsBase for fuse_permute_reorder test.

* Code clean & psroi rollbacked

Co-authored-by: Maksim Kutakov <maksim.kutakov@intel.com>
Co-authored-by: Maksim Kutakov <maxim.kutakov@gmail.com>
Co-authored-by: Yury Gaydaychuk <yury.gaydaychuk@intel.com>
2020-11-27 13:30:13 +03:00
Nikolay Shchegolev
b7d5590d72 [CPU] NMS test for the rest of 1st & 2nd outputs. (#3351) 2020-11-27 13:21:30 +03:00
Bartosz Sledz
3ab3536012 Add support for custom operator Swish via ONNXImporter path (#3274) 2020-11-27 11:19:39 +01:00
Nikolay Tyukaev
90646105d2 Use cmake to generate ngraph python and C++ APis (#3298)
* BINARY -> BUILD

* ngraph python and cpp api generation using cmake

* fix var name

* fix var names

* added ngraph cpp tag file
2020-11-27 13:13:59 +03:00
Andrei Kochin
bfb14af992 [DOCS] make non-code text represented properly (#2717)
* docs: make non-code text represented properly

* docs: remove typo 'g'

* Fixing broken numeration

* Fixing broken numeration

* Fixing broken numeration

Co-authored-by: Alina Alborova <alina.alborova@intel.com>
2020-11-27 11:51:35 +03:00
Ilya Lavrenov
b1e99ba699 Enabled code-style for OpenVINO folder (#3385) 2020-11-27 06:21:30 +03:00
Bartek Szmelczynski
19ab50a4f6 Functional ops hand (#3381)
* add 4 tests for operators based on model zoo

* fix wrong names of the models

* add functional tests for equal, lstm_cell and psroi_pooling operators

* add functional tests for ConverLike and Mod operators
2020-11-27 06:17:17 +03:00
Bartosz Sochacki
b660dfcd91 [GNA] reduced number of iterations in FQ tests (#3378) 2020-11-26 19:49:16 +03:00
Alexander Peskov
f12a6c6bb4 Doc update. Add macOS section into IE intro guide (#3361)
* [DOC] Add macOS specific section into intro guide

Signed-off-by: Peskov <alexander.peskov@intel.com>

* Remove libinference_engine_legacy from 'must link with' section

Signed-off-by: Peskov <alexander.peskov@intel.com>
2020-11-26 19:36:36 +03:00
Ilya Lavrenov
db7f0b22fb Made small improvements for legacy library build (#3376) 2020-11-26 19:18:36 +03:00
Ilya Lavrenov
7f01b5c28b Apa/multi no legacy (#3331)
* Removed legacy network represetnation usage

* Updated core threading tests not to use legacy networks

* Removed QueryNetworkMULTIwithHETERONoThrowv7 test

* Removed QueryNetworkHETEROwithMULTINoThrow_v7 test

* Added QueryNEtwork test add skipped for GNA

Co-authored-by: apankratovantonp <anton.pankratov@intel.com>
2020-11-26 19:18:13 +03:00
Krzysztof Bruniecki
3126fbd102 [GNA] Reduce RESULT_NOT_READY test time (#3377) 2020-11-26 19:17:59 +03:00
Ilya Lavrenov
6f2bca0000 Moved code style cmake scripts to a common place (#3228) 2020-11-26 15:38:55 +03:00
Ilya Lavrenov
92e3972853 Significant documentation fixes (#3364)
* Added VariableState to Plugin API documentation

* More fixes for plugin documentation

* Added ie_memory_state.hpp to documentation

* Added proper dependencies between C++ and Plugin API targets

* Fixed issues in public C++ API reference

* Fixed issues in public C++ API reference: part 2

* Removed obsolete entries from EXCLUDE_SYMBOLS in doxygen config

* Fixed path to examples, tag files for Plugin API doxygen file

* Put impl to a private section for VariableStatebase

* Fixed examples path to Plugin API: part 2

* Fixed path to examples in main ie_docs doxygen file

* Replaced path to snippets; otherwise path depends on how cloned repo is named

* Added path to snippets for ie_docs doxygen file as well

* Great amount of fixes for documentation

* Removed IE_SET_METRIC

* Fixes for C API documentation

* More fixes for documentation

* Restored Transformations API as a part of Plugin API

* Fixed tag files usage for Plugin API

* Fixed link to FakeQuantize operation
2020-11-26 14:32:12 +03:00
Mikhail Kozlov
483ce3a18b Rename KMB to VPUX (#3350) 2020-11-26 13:33:03 +03:00
Gladilov, Gleb
4a5d82a292 [IE][VPU]: Introduces ENABLE_EARLY_ELTWISE_RELU_FUSION option (#3357)
Unconditional Eltwise+ReLU merge makes some models take a bit more memory,
so they could not be inferred on Myriad-X. With this change used can
optionally disable this optimization and use Myriad-X.
2020-11-26 13:27:58 +03:00
Alexey Suhov
7275e249ad [dependencies.bat] Add retry logic for downloading dependencies (#3366)
* [dependencies.bat] Add retry logic for downloading dependencies
2020-11-26 12:45:50 +03:00
Ilya Churaev
a3a69ba117 Remove pool offset from nGraph Tensor (#3373) 2020-11-26 10:50:59 +03:00
Bartosz Sledz
0671916cf4 Clarify Reshape_1 operator documentation (#3330)
* Clarify Reshape_1 operator documentation

* Fix style issue

* Fix reshape documentation after review
2020-11-26 08:29:54 +03:00
Vladislav Golubev
94c6aefbfe [LPT] Added kernel verification to CPU-plugin tests for MatMul & Convolution (#2870) 2020-11-25 20:57:47 +03:00
Vladislav Vinogradov
1174ef64a4 Fix cross-compilation for ARM (#3354)
* Add missing `SHA256` for `SYSTEM_PROTOC` package.
* Do not use `NGRAPH_ONNX_IMPORT_ENABLE` variable for it,
  since it might not be defined at this time.
2020-11-25 19:34:56 +03:00
Andrey Zaytsev
fa3eceda08 Cherry-pick #3295 to master (#3359)
* Added info on DockerHub CI Framework

* Feature/azaytsev/change layout (#3295)

* Changes according to feedback comments

* Replaced @ref's with html links

* Fixed links, added a title page for installing from repos and images, fixed formatting issues

* Added links

* minor fix

* Added DL Streamer to the list of components installed by default

* Link fixes

* Link fixes

* ovms doc fix (#2988)

* added OpenVINO Model Server

* ovms doc fixes

Co-authored-by: Trawinski, Dariusz <dariusz.trawinski@intel.com>

* Updated openvino_docs.xml

Co-authored-by: Trawinski, Dariusz <dariusz.trawinski@intel.com>
2020-11-25 18:07:43 +03:00
Tomasz Dołbniak
3a6c337f1a Fix the potential unlimited mem allocation problem (#3346) 2020-11-25 17:41:39 +03:00
Alina Kladieva
1235bcb678 [Jenkinsfile] Add propagateStatus parameter (#3336)
Co-authored-by: akladiev <akladiev@nncv-akladieva.inn.intel.com>
2020-11-25 16:07:39 +03:00
Vladimir Gavrilov
4ca11d5df7 Update NMS-5 specification (#3303)
* Commit.

* Fixes in NMS documentation.

* Small fix.

* Small fix.
2020-11-25 14:04:46 +03:00
Piotr Rozen
8917adfd56 Fixed KW issues reported for build 754 of speech recognition demo (#3328) 2020-11-25 12:35:59 +03:00
Gleb Kazantaev
2b70fa1473 Removed wrong check from FC shape inference (#3332) 2020-11-25 07:01:58 +03:00
Dmitry Kurtaev
5fc2724199 [CMake] SHA is required (#3334) 2020-11-25 06:55:00 +03:00
Piotr Szmelczynski
68f954709d Softmax revise (#3249)
* Update spec

* add default value to axis parameter

* add test for default axis value

* style apply

* remove default axis unit-test

* add node validation check for negative axis

* create type prop tests for default and negative axis values

* add softmax type_prop file to CMakeLists

* style-apply

* fix axis condition

* remove unnecessary node validation check

* rename prop_type test

* style-apply
2020-11-25 06:50:43 +03:00
Vladislav Volkov
1f96ddfbf9 Tools for conditional compilation (#3169)
* Tools for conditional compilation

* Unit tests for conditional compilation & Refactoring

* Fix for MSVC selective build macros

* Unit tests for conditional compilation in analysys mode

* Code generation for selective build is hidden inside CMake

* Comments for conditional compilation options
2020-11-25 06:43:35 +03:00
Evgenya Stepyreva
5ce8946864 [ MO ] Fix for preprocessing insertion on ShapeOf paths (#3243)
* [ MO ] Fix for preprocessing insertion on ShapeOf paths

* ScaleInput tests

* refactoring

* comments
2020-11-25 00:57:03 +03:00
Artyom Anokhov
ebcef6a2ad [Scripts] Update install_NEO_OCL_driver with 20.35.17767 (#3287)
* install_NEO_OCL_driver: Added new CLI options. Added help. Added new available to download and install driver - 20.35.17767.

* install_NEO_OCL_driver: Fixed descriptions and var names

* install_NEO_OCL_driver: Fixed syntax

* install_NEO_OCL_driver: Updated capturing '-y' option. Removed installing prerequisites.

* install_NEO_OCL_driver: Rollback removing install_prerequisites, but keep only ocl-icd & libnuma dependencies. Updated definition of UBUNTU_VERSION.
2020-11-24 20:21:46 +03:00
Kamil Magierski
860fae2f27 [GNA] fix InsertCopyLayerPass (#3058)
* [GNA] fix InsertCopyLayerPass

* style

* [GNA] fixed Concat -> Memory case for InserCopyLayer

* Style

* [GNA] fix some FWL size mismatch cases

* [GNA] fix crop|split -> memory cases

* [GNA] One layer -> multiple concats fix tests

* style

* [GNA] move copy insertion after trivial non-functional layers
2020-11-24 20:08:09 +03:00
Ilya Lavrenov
42478ff0ce Fixed klockwork for legacy library (#3319) 2020-11-24 19:16:17 +03:00
Anna Alberska
fa0c0ccd77 [GNA] Reuse CNNNetPrevLayerSkipCertain in scale factor calc (#2307)
* [GNA] CNNNetPrevLayerSkipCertain remove recurrent implementation

* fix CI tests

* [GNA] refactor CNNNetCheckNextLayerSkipCertain

* apply requested changes
2020-11-24 19:16:02 +03:00
Anton Voronov
627c5e6d0e [CPU] fixed MergePermuteAndReorder optimization (#3318) 2020-11-24 19:14:53 +03:00
Svetlana Dolinina
843d5de611 added state API changes to doc (#3323) 2020-11-24 18:21:51 +03:00
Maksim Kutakov
cb55d1519f [IE TESTS] Fixes to the Reduce operation single layer test. (#3263) 2020-11-24 17:34:50 +03:00
Maksim Doronin
7aa931fde8 [IE][VPU]: KW fixes in myriad plugin WW48'20 (#3312) 2020-11-24 16:44:32 +03:00
Anton Pankratv
b2714f18af Used dynamic shape (#3234) 2020-11-24 15:50:15 +03:00
Krishna Prabhakaran
13806bf719 [IE][VPU]: Update call signature for vpu fw, update fw version (#3301)
* update call signature for vpu firmware, update the firmware version
* update hash for VPU firmware
2020-11-24 15:20:34 +03:00
Elizaveta Lobanova
a57554f769 [GNA] Fix a global buffer overflow in GNAModelSerial::Import (#3290) 2020-11-24 15:07:58 +03:00
Vitaliy Urusovskij
364bf08920 Add several new models to tgl_test_config.yml in time_tests (#3268)
* Fix wrong path for `yolo-v2-tiny-ava-0001` for time_tests

* Add several new models to `tgl_test_config.yml` in time_tests
2020-11-24 13:26:16 +03:00
Ilya Lavrenov
146d056018 Fixed links to build instruction (#3310) 2020-11-24 13:13:21 +03:00
Gleb Kazantaev
27efd1fc7e Resolve dynamism in Serialize transformation (#3260)
* Added Interval shape inference for NMS5

* Added dynamic shape resolver for Serialize pass

* Refactored Serializatoin tests; Added tests with dynamic shapes(NMS5, ShapeOf)

* Fixed python NMS5 test

* Fixed LowLatecnyTests
2020-11-24 12:38:56 +03:00
Ilya Churaev
3d75c3e863 Relax the assert for network inputs/outputs (#3302)
Inputs can be empty for the constant networks
2020-11-24 12:32:42 +03:00
Ilya Churaev
6666e5fed3 Added pre-proc tests (#2708)
* Added pre-proc test

* Fixed mean image tests

* Disabled scale tests for CPU

* Disabled test for Myriad

* Disable tests for GPU

* Added reverse input channels test

* Disabled test for GPU

* Disable Myriad tests

* Added links to tickets
2020-11-24 10:09:54 +03:00
Bartek Szmelczynski
2c13e084ef FunctionalOpTests (#3294)
* add 4 tests for operators based on model zoo

* fix wrong names of the models

* add functional tests for equal, lstm_cell and psroi_pooling operators
2020-11-24 06:23:14 +03:00
Roman Donchenko
a6d6203f79 benchmark_tool: replace logger.warn with logger.warning (#3291)
The former is deprecated.
2020-11-24 06:19:29 +03:00
Mateusz Bencer
5de9e0d3d0 Add calling validate_and_infer_types to onnx Loop (#3289) 2020-11-24 06:02:11 +03:00
Konstantin Satunin
9dc57d771d Revert "Use default PDB files format (#3265)" (#3293)
This reverts commit d39f54df03.
2020-11-23 18:30:43 +03:00
Vitaliy Urusovskij
4bfb353dbd Add fillBlobs to fix issue with negative values in image_info input layer (#3271) 2020-11-23 17:32:49 +03:00
Vitaliy Urusovskij
9f427bbf6e Add WA for OMZ Keras models in stress tests (#3272) 2020-11-23 17:32:35 +03:00
Edward Shogulin
b5d7f236f4 [LPT] integration: issue #42391 & issue #43001 (cherry-pick to master) (#3255)
* [LPT] NetworkHelper::roundWithTolerance: removed tolerance & rename to round
[LPT] NetworkHelper::round functional tests
[LPT] ieFuncTests: updated some test-cases

* [LPT] Subtract is not used

* [LPT] AddTransformation: zero handling

* [LPT] AddTransformation test
2020-11-23 17:19:06 +03:00
Jozef Daniecki
d02223c796 Add Proposal SLT instantiation for CPU plugin. (#3284) 2020-11-23 17:09:42 +03:00
Konstantin Satunin
d39f54df03 Use default PDB files format (#3265)
* Use default PDB files format

* Leave debug flags forming to cmake
2020-11-23 17:03:17 +03:00
Dmitry Kurtaev
ca7d13e3e1 Check sha256 hash for downloaded files (#3218) 2020-11-23 16:56:14 +03:00
Maxim Andronov
eedba319ea Fixed static analysis issues (#3280) 2020-11-23 16:54:01 +03:00
Sergey Shlyapnikov
5de04e9b94 [IE CLDNN] Gather fix (#3273) 2020-11-23 16:40:09 +03:00
Krzysztof Bruniecki
9b85d67cce Add test for RESULT_NOT_READY returned from Wait() in async mode (#2793)
* Add shared test for RESULT_NOT_READY return from Wait() in async mode

* Instantiate test for RESULT_NOT_READY for GNA Plugin only

* Fix compile error

* Increase model size for the RESULT_NOT_READY test

* Reuse most of the test

* Apply review

  - Fix typo

* Make the test deterministic

* Use callback timestamp

* Apply review

* Use promise and future
2020-11-23 16:18:17 +03:00
Szymon Durawa
1c7cfb7c7d Deserialization implementation for Constant op. (#2573)
* Deserialization implementation for Constant op.

* Add Cont op implementation for NodeConverter.

* Refactor functional tests, remove Const op from layer and node cretaors.

* Remove Constant op from NodeConverter.

* Refactor smoke test.

* Correct parameter in addBlob function.

* Update Constant op representation for myriad functional tests.

* Correct Const op representation for TopK model test.

* Add changes accroding to review comments.

* Refactor constant test.

* Add review changes.

* Add custom op for testing on_adapter(void*).

* Correct library path.

* Correct test fixture class for custom op test.

* Apply review remarks, remove creators from DeconvolutionIE.

* Refactored test ReadCustomAddConstNetwork, corrected on_adapter().

* Remove on_adapter() for CoordinateDiff which is specific to Convolution op.

* Apply review remarks.

* Apply teview remarks.

* Correct Const op in non_max_suppression tests.

* Resolve conflicts after rebase.
2020-11-23 15:41:59 +03:00
Maxim Andronov
a555efe287 Fixed static analysis issues (transformations) (#3281) 2020-11-23 14:16:23 +03:00
Tomasz Dołbniak
7e2305543a Accept dynamic rank and negative axes in ONNX reduction ops (#3162) 2020-11-23 10:26:17 +01:00
Anna Alberska
f86065ce7a [GNA] Fixed incorrect output layout for convolution (#2426)
* [GNA] add permute for NCHW Convolution H=1

* [GNA] fix permute after convolution case

* [GNA] fix Reshape1DOps transformation case

* [GNA] fix rm_cnn4a tests

* [GNA] fix wsj model tests

* quick fix

* [GNA] fix sw_exact mode

* [GNA] Add rotateOutput for convolution op instead of permute

* [GNA] fix CI

* [GNA] apply changes from review
2020-11-23 12:23:57 +03:00
Jozef Daniecki
55dd8b0a2d Align nGraph serialization to specification & MO behaviour (#2990)
* Align MaxPool op attribute 'rounding_type' to spec.

Attribute name should be in lower case.

* Remove obsolete "cacheable" attribute from Parameter.

* Translate ReLU & SoftMax ops type names from ngraph to IR convention.

* Remove <data> node when op has no attributes.

* Translate all operation attributes values to lower case.

* Revert "Align MaxPool op attribute 'rounding_type' to spec."

This reverts commit 243eeccff3.

* Revert "Translate all operation attributes values to lower case."

This reverts commit d4c24175b3.

* Align MaxPool op attribute 'rounding_type' to spec.

Attribute name should be in lower case.

* Align auto_pad & auto_broadcast operation attributes to spec.

They should be written in lowercase.

* Rename op:PadType 'none' to 'explicit'.
2020-11-23 06:43:39 +03:00
Mateusz Tabaka
37f6c0caf9 Update xfail issue numbers for models that fail with AssertionError: … (#3246)
* Update xfail issue numbers for models that fail with AssertionError: zoo models results mismatch

* update xfail reason with model name
2020-11-23 06:39:35 +03:00
Nikolay Shchegolev
e4ec55bea4 [CPU] NormalizeL2. Support 3D layout. (#3259) 2020-11-22 20:18:14 +03:00
Nikolay Shchegolev
92ec30c54b [CPU] NMS. Fill the rest of first out blob. (#3258) 2020-11-22 20:06:33 +03:00
Ivan Tikhonov
ff1046c0e1 Fix opset5::Loop specification for sliced input (#3230)
* Disable v10 serealizer (#3184)

* Disable v10 serealizer

* Fixed comments

* Backport of PR #3092 - TopK sorting fix (#3195)

* [IE] - Interpolate ONNX workaround (#3203)

Co-authored-by: DariaMityagina <daria.mityagina@intel.com>

* Fix NMS1/3/4 to Legacy conversion (#3210)

* Fix NMS1/3/4 to Legacy conversion

* Added functoinal tests

* [LPT] Transpose, MatMul: Klocwork fixes (#3192)

* Update install_openvino_dependencies.sh (#3196)

* [ MO TF ] TF FakeQuantize normalization fix (#3180)

* Specify sliced input of Loop op

* Enable back rpecalcu;ated ref falues for TrivialLoop tests

Signed-off-by: Alexander Peskov <alexander.peskov@intel.com>

* [NGRAPH] Add sliced input to Loop op

Signed-off-by: Alexander Peskov <alexander.peskov@intel.com>

* Add loop test with input slicing

Signed-off-by: Alexander Peskov <alexander.peskov@intel.com>

* One more test on loop

Signed-off-by: Alexander Peskov <alexander.peskov@intel.com>

* [ nG: TI ] Fix for reshaping TensorIterator

* Trigger CI

* Fix dyn auto slicing tests

* ngraph codestyle

* misprint

* style

* style

* Fix reshaping Loop

* ngraph codestyle

* delete unnecessary comments

* Revert "Disable v10 serealizer (#3184)"

This reverts commit 5abbe2fec5.

Co-authored-by: Ilya Churaev <ilya.churaev@intel.com>
Co-authored-by: Tomasz Jankowski <tomasz1.jankowski@intel.com>
Co-authored-by: Andrey Sokolov <andrey.sokolov@intel.com>
Co-authored-by: DariaMityagina <daria.mityagina@intel.com>
Co-authored-by: Gleb Kazantaev <gleb.kazantaev@intel.com>
Co-authored-by: Vladislav Golubev <vladislav.golubev@intel.com>
Co-authored-by: Dmitrii Denisov <dmitrii.denisov@intel.com>
Co-authored-by: Evgenya Stepyreva <evgenya.stepyreva@intel.com>
Co-authored-by: Alexander Peskov <alexander.peskov@intel.com>
2020-11-22 13:29:14 +03:00
Tomasz Dołbniak
6899a95e1c ConstantFolding as a FunctionPass instead of GraphRewrite (#3065)
* Redundant op::Max CF removal

* Redundant op::Min CF removal

* Redundant op::Sum & op::Product CF removal

* CF Min and Max using evaluate()

* Arithmetic reduction CF pass removal

* Quantize op CF pass removal

* Convert op CF pass removal

* Logical reduction CF pass removal

* Select op CF pass removal

* OneHot CF pass removal

* Code formatting

* ScatterElements CF pass removal

* Gather CF pass removal

* Disable a Quantize op test that fails in CI

* CF pass cleanup

* Convert op cleanup and test adaptation to spec

* Possible fix for failing VPU tests

* Limit the types used in OneHot::evaluate

* Quantize op evaluator removal

* Refactor of Gather evaluator

* CF pass cleanup and adaptation to FunctionPass interface

* New CF pass implementation

* Fix the Tile::evaluate method for dynamic shapes

* Node shapes revalidation in CF pass

* Obsolete code cleanup

* Obsolete include removal

* Recursively fold subgraph nodes

* Obsolete include removal

* Revalidate each node in CF

* PR feedback

* Missing RTTI symbol definition
2020-11-20 20:36:05 +03:00
Evgenya Stepyreva
4b22a99a69 [ nG: TI ] Fix for reshaping TensorIterator (#3247)
* [ nG: TI ] Fix for reshaping TensorIterator

* comments

* style
2020-11-20 17:43:21 +03:00
Bartosz Sochacki
fc1a3ce2f1 [GNA] Fake quantization layer support for int-8 mode for GNA plugin (#2937)
* [GNA] added support for per-channel FakeQuantise layer

* [GNA] added quantisation types detection in FQ enabled networks, and added input scale factors detection from FQ connected to input layer

* added FakeQuantize callback that will be use to cast integer values stored as float in FakeQuantized layer

* fixed per-channel multiplier calculation for int8 case

* precision improvements for int8 fake quantization and support for propagating scale factors to activation layers

* added initial int16 support

* added support for fake quantize layer with many connected output layers and support for FQ data encoded as FP16

* added support for already quantized weights

* Shared single layer test

* Added subgraph test

* Fix comment

* int8

* Enabling FQ tests on GNA

Co-authored-by: Eugene Smirnov <eugene.smirnov@intel.com>
Co-authored-by: Andrey Dmitriev <andrey.dmitriev@intel.com>
2020-11-20 16:40:19 +03:00
Vladimir Paramuzov
27be33ba53 [IE CLDNN] Minor fixed to NMS and TopK (#3225) 2020-11-20 15:37:55 +03:00
Ilya Lavrenov
f3358ed89d Removed typo (#3248) 2020-11-20 14:32:29 +03:00
Szymon Durawa
1e1eaa582a Add functional tests and remove leayer creator for Add opp. (#2759)
* Add functional tests and remove leayer creator for Add opp.

* Remove batchNorm template.
2020-11-20 14:03:47 +03:00
Vitaliy Urusovskij
dee00cdc92 Add new model to tgl_test_config.yml (#3236) 2020-11-20 13:33:57 +03:00
Pavel Esir
1076d32467 [MO] cli_parser fix when input contains substring with matching scale/mean values (#3146)
* fix MO cli_parser when input contains substring with matching scale/mean values

* some additions to cli_parser unit-tests

* fixed numpy array comparisons -- added assert_ prefix

* more general solution for mean/scale cli_parser, names with only digit values are processed correctly

* minor corrections
2020-11-20 11:42:42 +03:00
Vitaliy Urusovskij
b5930eb58e Fix "results" uploading to DB in time_tests (#3215) 2020-11-20 10:49:31 +03:00
Vladimir Paramuzov
989a910f45 [IE CLDNN] FuseBias pass + new layouts for deconvolutions (#2774) 2020-11-20 10:14:09 +03:00
Gleb Kazantaev
2ed92688dd Fix NMS1/3/4 to Legacy conversion (#3210) (#3229)
* Fix NMS1/3/4 to Legacy conversion

* Added functoinal tests
2020-11-19 20:48:06 +03:00
Evgenya Stepyreva
84e775af29 [ MO TF ] TF FakeQuantize normalization fix (#3223) 2020-11-19 18:38:27 +03:00
Roman Kazantsev
0925d80e2a Complete CTCGreedyDecoder implementation in nGraph and add tests (#3190)
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2020-11-19 18:32:25 +03:00
Krzysztof Bruniecki
0342f51cd0 Remove from unwaited requests ids if request aborted (#3160) 2020-11-19 18:08:04 +03:00
Krzysztof Bruniecki
3f2ac0ff55 Print GNA lib version on error using Gna2GetLibraryVersion (#3154) 2020-11-19 18:02:51 +03:00
Roman Donchenko
50fb87aec2 Fix spelling errors in tools (#3217) 2020-11-19 16:56:47 +03:00
Edward Shogulin
0f2c5aae03 [LPT] tests are marked as smoke (#3221) 2020-11-19 15:49:37 +03:00
Vladislav Golubev
3bdd09e107 [LPT] Transpose, MatMul: Klocwork fixes (#3191) 2020-11-19 15:15:59 +03:00
Bartek Szmelczynski
e32d2ec8ff add 4 tests for operators based on model zoo (#3181)
* add 4 tests for operators based on model zoo

* fix wrong names of the models
2020-11-19 15:09:43 +03:00
Ilya Churaev
a264ff9eee Removed delayed_validate_and_infer_types (#3220)
* Removed delayed_validate_and_infer_types

* Fixed code style
2020-11-19 15:08:58 +03:00
Dmitrii Ryzhkov
70c02d0fea ngraph constant mem reuse (#2548)
* Memory re-use for nGraph Consstant

* Code style fixes

* Did remove setWeights from public API

* Fixes for tests

* Moving setWeightsPtr to CNNNetwork

* Removing setWeights function, set blob ptr directly to preallocated ngraph buffer

* Fix for code style

* Preallocated buffer refactored, rename to Shared, remove declaration from AlignedBuffer

* Fix for code style

* Remove setWeightsBlobPtr from mock classes.

* fixing bugs after merge

* Test fix

* Fix for cpu Functional tests

* Fix for Windows build

* Try to fix GNMT test failure.

* Releasing pointers what holds CNNNetwork

* Fix after merge

* mkl-dnn submodule update

* reverting back cloned network cleanup

* Fix for double allocation

* Code style...

* update mkl-dnn

* update mkl-dnn

* mkl-dnn bump

* update mkl-dnn

* update mkl-dnn

* bump mkl-dnn

* update mkl-dnn

* bump mkl-dnn

* update mkl-dnn

* update mkl-dnn

* bump mkl-dnn

* mkl-dnn bump

* bump mkl-dnn

* update mkl-dnn

* update mkl-dnn

* bump mkl-dnn

* update mkl-dnn

* bump mkl-dnn

* update mkl-dnn

* bump mkl-dnn

* mkl-dnn bump

* update mkl-dnn

* update mkl-dnn

* bump mkl-dnn

* update mkl-dnn

* bump mkl-dnn

* update mkl-dnn

* bump mkl-dnn

* mkl-dnn bump

* update mkl-dnn

* update mkl-dnn

* bump mkl-dnn

* update mkl-dnn

* bump mkl-dnn

* update mkl-dnn

* bump mkl-dnn

* mkl-dnn bump

Co-authored-by: Tony Reina <g.anthony.reina@intel.com>
2020-11-19 14:03:12 +03:00
Dmitry Kurtaev
b77bedcb64 Remove Java bindings (#3216) 2020-11-19 13:59:20 +03:00
Irina Efode
b85cc60eb1 [IE TESTS] Move ExecGraph serialization tests from InferenceEngine functional tests to the shared library (#3170)
* [IE TESTS] Move ExecGraphSerialization tests to the shared lib

* Apply coments

* Apply comments. Part 2

* Update CMakeLists.txt
2020-11-19 13:38:04 +03:00
Egor Churaev
3c1e73e892 [IE CLDNN] Improve fsv16 i8 pooling kernel (#3005)
JIRA: 40392
2020-11-19 11:47:38 +03:00
Yuta Fukasawa
a40f54ddc0 Minor markdown fix: adding back-quotes (#3204) 2020-11-19 11:31:06 +03:00
Szymon Durawa
af80bd8bf8 Add auto_broadcast attribute to spec. (#2955) 2020-11-19 10:31:30 +03:00
iliya mironov
b4d93c027f Update docs (#3189)
Co-authored-by: Your Name <you@example.com>
2020-11-19 10:29:42 +03:00
Jedrzej Hajduczenia
281c01725c [IE CLDNN] Add padding directly to input tensor in conv unit tests (#3014) 2020-11-19 10:17:32 +03:00
Maxim Shevtsov
fd0e03286a Refactor multi into separate files (#3209)
* splitting the MULTI into separate hpp/cpp files per class, to simplify further dev

* scrubbing redundant include files
2020-11-19 10:07:45 +03:00
Vladimir Gavrilov
3aed19a46a XLNET models bugs (#1199)
* Started to write equality comparator for StridedSlice layers.

* Now considered only unique StridedSlice consumers of non-constant data nodes.

* Fixed test for the transformation ConvertGroupedStridedSlice.

* Deleted commented code.

* Small fixes.

* Moved functions unique_by and group_by_with_binary_predicate to mo/utils/utils.py.

* Deleted function collect_sequences.

* Added asserts into the constructor of StridedSlice.

* Written test for the case when 1) there are 4 StridedSlice operations; 2) 2 of StridedSlice have the same data; 3) 2 others StridedSlice have the same data; 4) all StridedSlice operations outputs are consumed by different operations.

* Added some comments.
2020-11-19 10:07:30 +03:00
Mateusz Tabaka
2ec0904d40 Remove obsoleted v0::Dot and v0::QuantizedDot (#3128)
* Remove obsoleted v0::Dot and v0::QuantizedDot

* fix ngraph unit tests
2020-11-19 09:06:19 +03:00
Dmitrii Denisov
3ca0b94a7f Update install_openvino_dependencies.sh (#3197) 2020-11-19 01:30:08 +03:00
Tomasz Dołbniak
a1d858c502 Remove the assert that could terminate the process, throw an exception instead (#3205) 2020-11-18 22:27:51 +03:00
Mikhail Ryzhov
39ec38383a Reduced usage of batch in python samples (#3178)
* Reduced usage of batch in python samples

And corrected input arguments
2020-11-18 20:43:59 +03:00
Jedrzej Hajduczenia
123b9ab66e [IE CLDNN] Fix fsv4 input pad in mmad bfyx to fsv32 conv kernel (#3194) 2020-11-18 19:20:59 +03:00
Ilya Lavrenov
5cc7314f75 Ngraph static lib (#3193)
* Fix: ITT_INCLUDE_DIR was not correctly detected

* Added NGRAPH_STATIC_LIBRARY CMake flag to optionnaly compile ngraph and link it as a static library instead of a dynamic one
- Definition of NGRAPH_STATIC_LIBRARY macro in callee and caller code to avoid dllexport/dllimport decoration
- Adding missing definitions of the explicit instantiation of FactoryRegistry<>::get
- Removed message about a non existent variable: NGRAPH_IE_STATIC_LIB_ENABLE
- Removed install export directive for ngraph in case of static library

* * Code style fix

* Added NGRAPH_STATIC_LIBRARY CMake flag to optionnaly compile ngraph and link it as a static library instead of a dynamic one
- Definition of NGRAPH_STATIC_LIBRARY macro in callee and caller code to avoid dllexport/dllimport decoration
- Adding missing definitions of the explicit instantiation of FactoryRegistry<>::get
- Removed message about a non existent variable: NGRAPH_IE_STATIC_LIB_ENABLE
- Removed install export directive for ngraph in case of static library

* - Removed redundant symbol definition
- Indented properly some comments

* - Making sure onnx is always compiled as a static library no matter what is the value of BUILD_SHARED_LIBS

* - Making sure onnx is always compiled as a static library no matter what is the value of BUILD_SHARED_LIBS

* Fixed incorrect suppression of directive

* Using BUILD_SHARED_LIBS (defaulted to ON) instead of a custom CMake option NGRAPH_STATIC_LIBRARY

* Removed useless comma

* Forcing pugixml to be static event when BUILD_SHARED_LIBS=ON globally.

* Forcing gtest for ie tests to be compiled as a static library.

* Made protobuf and gtest from ngraph always static.
Factorized all the force static logic for ngraph's externals in ngraph's CMakeLists.txt instead of external_*.cmake

* gflags is always static

* Solving cross compilation from Debian 9

* using the same pattern for other ngraph externals

Co-authored-by: emmanuelattia-philips <66060489+emmanuelattia-philips@users.noreply.github.com>
Co-authored-by: Emmanuel Attia <emmanuel.attia@philips.com>
2020-11-18 18:09:41 +03:00
Daria Mityagina
257b420ed6 [IE][VPU]: Interpolate ONNX workaround (#3182) 2020-11-18 17:23:46 +03:00
Tomasz Jankowski
c36aaf8621 nGraph: Fix TopK output sorting by index (#3092) 2020-11-18 14:14:33 +01:00
Piotr Szmelczynski
f90e7b7443 Hard sigmoid ref impl (#3100)
* update HardSigmoid spec

* create HardSigmoid ref impl

* add HardSigmoid to int_executable

* create unit-tests for HardSigmoid

* create onnx_model_hard_sigmoid test

* create onnx prototxt model for hard sigmoid

* add backend/hard_sigmoid to CMakeLists

* Change hard sigmoid prototxt to use attributes

* Change hard_sigmoid onnx model test to have 1 input

* style apply

* Change alpha and beta parameters to be pass by value
2020-11-18 15:52:33 +03:00
Mateusz Bencer
aa622003a8 update tests status (#3186) 2020-11-18 13:32:59 +01:00
Alexander Zhogov
97228dc7f7 Update dependabot.yml 2020-11-18 13:07:34 +03:00
Ilya Lavrenov
5dfb291a56 Added EXCLUDE_FROM_ALL for static versions of plugins (#3174) 2020-11-18 12:24:30 +03:00
Ivan Tikhonov
9ec18eeb9b Temporaly skip GRU Cell test (#3183) 2020-11-17 21:27:25 +03:00
Mateusz Bencer
393779b227 Fix accuracy problem for YoloV3 (incorrect StridedSlice nop elimination) (#3179) 2020-11-17 18:12:01 +01:00
Andrey Sokolov
2f608d8f7e [IE][VPU]: Align buffer conditions with the device part (#3168) 2020-11-17 19:40:23 +03:00
Elizaveta Lobanova
ed6113854a [GNA] Security fixes for 2021.2 (#3167) 2020-11-17 19:26:17 +03:00
Katarzyna Mitrus
6a1eb5a139 ONNX LSTM/GRU/RNN seqence_lens input tests with reverse and bidirectional mode (#3149) 2020-11-17 16:44:03 +01:00
Gleb Kazantaev
fc8df42e7e Fix NMS5 dynamism issues (#3137)
* Fixed ConvertNMS5ToLegacy conversion pass to resolve dynamism as soon as possible; fixed output precision to avoid troubles during convert_precision pass

* Added NMS5ToLegacy conversion for cldnn plugin

* Fixed NMS3 copy method

* Updated NMS5ToLegacy pass to avoid convert precision issues

* Updated nGraph reader and Functional tests

* Removing odd CF call

* removed xfail for test that is expected to pass

* Fixed Convert operations friendly_name

* Removed NMS5ToLegacy from opset1_to_legacy conversion

* Update NMS5 layer tests

* Update NMS5 DSR tests
2020-11-17 18:34:05 +03:00
Edward Shogulin
c18a456d67 [LPT] implementation were moved from common dir (#3173) 2020-11-17 18:06:50 +03:00
Nikolay Shchegolev
9c6e2cbb65 [CPU] Normalize node. Broadcast weights from 1 to channels. (#3141) 2020-11-17 17:01:44 +03:00
Ilya Lavrenov
8890e94d29 Added SECURITY.md back (#3177) 2020-11-17 16:44:44 +03:00
Kate Generalova
4a09888ef4 [DOC] Update Docker install guide (#3055)
* [DOC] Update Docker install guide

* [DOC] Add proxy for Windows Docker install guide

* [DOC] move up prebuilt images section

* Update installing-openvino-linux.md

* Update installing-openvino-docker-linux.md

* Update installing-openvino-docker-linux.md

Formatting fixes

* Update installing-openvino-docker-linux.md

Fixed formatting issues

* Update installing-openvino-docker-windows.md

Minor fixes

* Update installing-openvino-docker-linux.md

Fixed formatting issues

* [DOC] update text with CPU image, remove proxy for win

* Update installing-openvino-docker-windows.md

Minor fixes

* Update installing-openvino-docker-windows.md

Minor fix

* Update installing-openvino-docker-windows.md

Minor fix

* Update installing-openvino-docker-windows.md

Co-authored-by: Andrey Zaytsev <andrey.zaytsev@intel.com>
2020-11-17 16:43:56 +03:00
Roman Vyunov (Intel)
5bc74aac75 [IE][VPU]: Refactoring of SpecialStageProcessor (#2885)
* SpecialStageProcessor refactoring
* Fix for Yolo-v3-pytorch and related test
2020-11-17 16:30:30 +03:00
iliya mironov
9cb3c2a6be Fix graph clenup (#3159)
* Fix graph clenup

* Refactoring graph clean up function

* Change wa comment

Co-authored-by: Your Name <you@example.com>
2020-11-17 16:28:27 +03:00
Mikhail Ryzhov
74ff38fedb Revert "Reduced usage of batch in python samples (#3104)" (#3171)
This reverts commit 23e653858b.
2020-11-17 14:57:40 +03:00
chxd
5de182a4ca [IE CLDNN] program_impl::replace_all_usages causes invalid memory access. (#138) 2020-11-17 13:45:42 +03:00
Piotr Rozen
15f7ab5e6e added ubuntu 20.04 support to speech recognition demo (#3145)
updated speech recognition demo resources URLs to AWS
2020-11-17 13:32:14 +03:00
Krzysztof Bruniecki
93e270169c Print GNA Lib function name when error code obtained (#3129) 2020-11-17 13:16:15 +03:00
Ivan Tikhonov
ea52dd2642 TI and Sequences related transformations: transition from cnn to ngraph versions (#2927)
* sequences to ti transformations, support for seq_lengths input, update reference implemetations, add new tests

* fix python api, update sequences to ti transformation

* transition from cnn to ngraph transformations for cpu, gpu, vpu plugins

* fix convert_ti_to_sequence transformation

* fix naming issue in unroll transformation

* test pure TensorIterator in vpu plugin

* fix sequences to ti transformation

* Update sequences to TI transformation: fix reverse sequence support

* update single layer tests, fix TI reference impl, fix Sequences to TI transformations

* ngraph code style

* fix build

* fix ngraph python api

* resolver review comments, refactoring

* revert vpu changes

* disable/fix tests

* refactoring

* Resolve review remarks

* optimization of LSTMSeq -> LSTMSeq IE: remove unnecessary Transpose ops

* Refactoring of transformation pipeline in cpu and gpu plugins, align GRU/RNN -> GRU/RNN IE with LSTM -> LSTM IE

* update TensorIterator tests, refactoring

* fix typo

* Fix unit tests, delete unnecessary callbacks

* Refactoring: delete commented code

* Add FullyConnected to skipConstInfer list for legacy ConstFolding

* disable legacy cnn unit tests

* delete xfail

* fix for backward compatibility with opset1::LSTMCell

* delete xfail

* fix build, remove Reshape layer from skipConstInfer list
2020-11-17 12:38:22 +03:00
Jan Iwaszkiewicz
cfe143fd33 [nGraph][ONNX] Rename xfails (#3061) 2020-11-17 10:34:33 +01:00
Vitaliy Urusovskij
070fc17087 Extend information to submit to a DB in time_tests (#3018)
* Optimize imports in time_tests conftest.py

* Extend information to submit to a DB in time_tests:
1. Add `--manifest` and `--db_metadata` CLI keys
2. Add `prepare_db_info` fixture

* Move `validate_test_case` fixture to a const schema, remove extra checks

* Add `manifest_metadata` fixture to parse and validate manifest only once

* Add OS utils to submit os info to DB
2020-11-17 12:07:40 +03:00
Maxim Vafin
a991ad926f Fix ApplyPermutations for the case when more then 1 input with permutes (#3095) 2020-11-17 11:58:01 +03:00
Ilya Lavrenov
5bb0dba335 Removed documents which are ported to OpenVINO WiKi (#3106)
* Removed documents which are ported to OpenVINO WiKi

* More updates

* Removed getting started

* Ported more guides to OpenVINO Wiki
2020-11-17 11:46:05 +03:00
Ilya Lavrenov
9d52520a8c Connect some ngraph and IE cmake options (#3147) 2020-11-17 11:42:34 +03:00
Roman Vyunov (Intel)
9da175c10c [IE][TOOLS] Fix for CCT two IR mode (#3084) 2020-11-17 11:41:48 +03:00
Aleksandr Korolev
957a1f6590 [IE][VPU]: Fix condition in HW tiling (#3111)
Co-authored-by: kora6 <kora6@github.com>
2020-11-17 11:36:23 +03:00
Aleksandr Pertovsky
4e510c80c0 [ngraph] Fix compare functions for functional tests (#3161) 2020-11-17 11:32:52 +03:00
Vladimir Paramuzov
c4d39fabeb [IE CLDNN] Fixed mem leak (#3153) 2020-11-17 11:18:48 +03:00
Mateusz Tabaka
28315cf020 Fix compilation error in gna_wait_test (#3150)
error: converting to ‘std::vector<std::tuple<unsigned int, long int,......
2020-11-17 11:08:01 +03:00
Anton Romanov
a8bdee6359 Show help message when -i or -m is not set (#3144) 2020-11-17 10:50:23 +03:00
Chenhu Wang
be044a7003 [CPU] Interpolate operation improvements (#2366)
* interpolate improvement

* JITTED cubic mode

* fix 'code is too big' when JIT

* extend test to cover tail code path

* transformation of interpolate1 to interpolate4

* add low precision transformation for interpolate4
2020-11-17 10:42:34 +03:00
Mikhail Ryzhov
23e653858b Reduced usage of batch in python samples (#3104)
* Reduced usage of batch in python sampes

Excluded from hello_classification and object_detection samples
2020-11-17 10:12:33 +03:00
Irina Efode
dc710d6090 [IE TESTS] Move main.cpp to shared lib from plugin functional tests (#3157) 2020-11-17 10:11:17 +03:00
Irina Efode
8d855fb654 [IE TESTS][IE CPU] Add smoke prefix for broadcast SLT (#3158) 2020-11-17 10:10:45 +03:00
Maxim Andronov
a166f95acc [IE TESTS] Added test for NMS (#2830) 2020-11-17 09:33:19 +03:00
Anton Voronov
6467a9f5b8 [CPU] added MergePermuteAndReorder optimization + added test (#2519) 2020-11-17 09:04:49 +03:00
Mateusz Bencer
98e8aa8128 Protect reading external weights from up-dir (#3098)
* introduced path sanitizing

* added tests, folders structure clean-up

* fixed test

* fixed up-dir path handling

* improved sanitizing for windows

* fix Windows test

* move sanitize impl
2020-11-17 07:16:39 +03:00
Ivan Tikhonov
b45e1a25a5 LSTM/GRU/RNN Sequences : support for seq_lengths input (#2788)
* sequences to ti transformations, support for seq_lengths input, update reference implemetations, add new tests

* fix python api, update sequences to ti transformation

* fix sequences to ti transformation

* Update sequences to TI transformation: fix reverse sequence support

* update single layer tests, fix TI reference impl, fix Sequences to TI transformations

* ngraph code style

* fix build

* fix ngraph python api

* resolver review comments, refactoring

* Resolve review remarks

* delete xfail
2020-11-17 07:04:20 +03:00
Mateusz Bencer
89f06586cf Specification to ONNX external data feature (#2939)
* Added external weights files doc

* review remarks

* review remarks

* review remarks

Co-authored-by: Michał Karzyński <4430709+postrational@users.noreply.github.com>

* review remarks. part 2

Co-authored-by: Michał Karzyński <4430709+postrational@users.noreply.github.com>

* fixed info about nullptr

* Apply suggestions from code review

Co-authored-by: Anastasiya Ageeva <anastasiya.ageeva@intel.com>

* review remarks. part 2

Co-authored-by: Michał Karzyński <4430709+postrational@users.noreply.github.com>
Co-authored-by: Anastasiya Ageeva <anastasiya.ageeva@intel.com>
2020-11-17 06:57:57 +03:00
Tomasz Socha
0f539cc71c Use std::transform instead of vector constructor (#3151) 2020-11-17 06:57:00 +03:00
Irina Efode
e9de4daee7 [IE TESTS] Remove extra dependency from Shared lib (#3006)
* [IE TESTS][IE CMAKE] Add cmake option for configuration to skip tests

* [IE TESTS] Remove extra dependency from IE tests shared lib

* Revert to add flag
2020-11-16 22:29:02 +03:00
Mikhail Ryzhov
3fe371299a Corrected "-i" argument description (#3142)
* Corrected "-i" argument description

According to their usage in samples
2020-11-16 21:48:06 +03:00
Jedrzej Hajduczenia
a735ecc401 [IE CLDNN] Add asymmetric quantization support to fsv16 imad 1x1 convolution kernel (#2941) 2020-11-16 20:56:19 +03:00
Evgeny Lazarev
0a9d883d78 Fix for Reduce extractors and normalizer (#3136)
* Fixed extractor for ONNX ReduceXXX operations and fixed ReduceAxisNormalizer transformation

* Unit test for ReduceAxisNormalizer transformation
2020-11-16 18:50:13 +03:00
Alexey Ershov
6efcdb0a21 [IE][VPU]: ExpGenerateProposals: added temporary buffer allocation (#3093)
ExpGenerateProposals: temporary buffer allocation moved from firmware to blob
* Added tmpBuffer
* Changed the amount of allocated memory
* firmware update

Co-authored-by: Ivan Poliksenov <ivan.poliksenov@intel.com>
2020-11-16 18:03:19 +03:00
Andrey Sokolov
1fd07663c9 [IE][VPU]: NMS - fix memory allocation bug (#3133) 2020-11-16 17:52:27 +03:00
Mateusz Tabaka
8f82589be0 Update tolerance values for ONNX model tests (#3131) 2020-11-16 15:23:20 +01:00
Anton Romanov
f5528a7d98 small refactor samples setBatchSize (#3053)
* small refactor samples setBatchSize
2020-11-16 17:20:54 +03:00
Bartosz Sledz
ffebfe7f41 Extend test coverage for ONNX Resize Operator (#3086) 2020-11-16 15:20:01 +01:00
Bartosz Sledz
749d70bb63 Add ceil_mode for Max and Avg pooling (#2965) 2020-11-16 15:16:24 +01:00
dependabot[bot]
5d0bfbb47f Bump wheel from 0.34.2 to 0.35.1 in /ngraph/python (#3120) 2020-11-16 14:08:12 +01:00
Maksim Kutakov
ca36b91a73 [CPU] Broadcast check has been added to the ConvertPowerToPowerIEMatcher transformation. (#3132)
* [CPU] Added broadcast check to the ConvertPowerToPowerIE transformation.

* [CPU] Eltwise single layer test instance extended with a two inputs case.
2020-11-16 15:58:10 +03:00
Ilya Churaev
17f478d8c4 Fixed negative paddings for convolution backprop data (#3117)
* Fixed negative paddings for convolution backprop data

* Fixed code style

* Fixed comments
2020-11-16 15:30:18 +03:00
Bartek Szmelczynski
e70b2bf469 add tests for 5 ops based on model zoo (#3062)
* add tests for 5 ops based on model zoo

* remove unnecessary layers from the test

* add test case with merge_repeated=0

* remove unnecessary layers and add new test casae with do_softmax=0

* remove unnecessary layers from the test
2020-11-16 15:19:31 +03:00
Krzysztof Bruniecki
bb369f189a Revert "Erase from unwaited requests container on QoS abort (#3125)" (#3148)
This reverts commit d7e98f605d.
2020-11-16 15:05:59 +03:00
Krzysztof Bruniecki
d7e98f605d Erase from unwaited requests container on QoS abort (#3125) 2020-11-16 13:30:48 +03:00
Tomasz Dołbniak
fd877cd5c9 Enablement of GatherND tests (nG & ONNX) (#3013) 2020-11-16 11:09:34 +01:00
Ilya Lavrenov
0a230f829e Fixed klockwork (#3119) 2020-11-16 12:50:03 +03:00
Anton Romanov
74f8b86e8c Alignment model and input (#3115) 2020-11-16 12:26:04 +03:00
Rafik Saliev
9790c1253c [BugFix] Fix compilation error caused by typo in #3109 (#3135) 2020-11-16 11:25:57 +03:00
Roman Kazantsev
10b18a00c6 Improve reshapeability of models with eltwise nodes influencing shapes (#2767)
* Fix ElementwiseInputReshape transformation

Reshape node always needs to be inserted
in order to preserve ShapeOf nodes (reshapability of a model) that can potentially be above
elementwise node.

Refactor EltwiseInputReshape_test and EltwiseInputNormalization_test since the logic of maintaining reshape for eltwise has been changed.

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

* Merge EltwiseInputNormalization and EltwiseInputReshape transformations

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

* Remove Unsqueeze from Fused_op

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

* Fix code after code review #1

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

* Fix code after review #2

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

* Fix code review #4

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

* Perform full normalization based on shapes of all inputs to eltwise

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

* Refactor much to avoid old API and edges with unsqueeze_dims attribute

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

* Fix code after review

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2020-11-16 09:50:41 +03:00
Maksim Doronin
2a7f2f5eb6 [IE][VPU][XLink]: XLink semaphore wrappers impl (#3079)
XLink wrappers for POSIX semaphore functions (refer sem_overview for details). In the description of standard sem_destroy the following is noted:
"Destroying a semaphore that other processes or threads are currently blocked on (in sem_wait(3)) produces undefined behavior."
XLink wrappers use thread-safe reference count and destroy the semaphore only in case if there are no waiters.

* XLink semaphore wrapper impl
* Extend XLink win_synchapi
2020-11-16 02:51:46 +03:00
Ilya Lavrenov
fec3bc0990 Propogate DEVICE_ID for functions working with RemoteContext (#3109)
* Propogate DEVICE_ID for functions working with RemoteContext

* More fixes for RemoteContext

* Fixed tests compilation with VariableState
2020-11-13 19:44:40 +03:00
Anna Alberska
d87fdbe89b [GNA] fix 4d batch size eltwise issue (#3127) 2020-11-13 19:28:02 +03:00
Alexander Perepelkin
c860f5fa7d Enable segfaulting getAvailableDevices, ExecGraphSerializationTest.ExecutionGraph_CPU after segfaults are fixed (#3124) 2020-11-13 19:17:27 +03:00
Kamil Magierski
9f54989824 [GNA] 4D concat align pass (#2970)
* [GNA] Fix RemovePermutationsNHWCToNCHWPass in cases that permute input has many outData

* style

* [GNA] linux test fail fix
2020-11-13 18:12:45 +03:00
Maxim Andronov
9070cb865d [CPU] fix NMS-5 CentOS7 error (#3083) 2020-11-13 17:56:20 +03:00
Katarzyna Mitrus
8dbff709fb ONNX LSTM fix get_shape error (#3033)
* ONNX LSTM get dimension only if required

* Test dynamic onnx lstm model import

* Enable LSTM_Seq_lens_unpacked_model import test

* Disable model zoo execution test "MSFT_opset9_LSTM_Seq_lens_unpacked"

* Add missed comma in xfail list

* Update error messages

* init xfail issue

* test zoo models import xfail issue

* Fix SEQ_LENGTH init

* Comments update

* Fix usage of v0::Add by overloaded operator
2020-11-13 17:31:29 +03:00
Vladimir Paramuzov
18f04860af [IE CLDNN] Fixed pad value used for input coords calculation in fsv16 imad conv (#3081) 2020-11-13 17:24:40 +03:00
Tomasz Jankowski
2966910dac nGraph: fix TopK output shape inference (#2967)
* nGraph: Fix TopK output shape inference

* nGraph: Correct TopK output shape inference

TopK lower bound of output shape at the axis was mistakenly calculated
basing on max_lenght instead of min_lenght.

* nGraph: Correct TopK output shape inference

* nGraph: Correct TopK type prop test

The topk_negative_axis_support type properties test was comparing
incompatible variables carrying the same value. So it was passing ok.

* nGraph: Add TopK type prop test

* nGraph: Fix code style

* nGraph: Follow review guidelines

Improve variables meaning.
Enforce rigid test pass condition.

* nGraph: Remove magic numbers
2020-11-13 17:10:42 +03:00
Krzysztof Bruniecki
dc2ac0fb9e Create u-tests for RESULT_NOT_READY and INFER_NOT_STARTED (GNA QoS) (#3102)
* Create tests for RESULT_NOT_READY and INFER_NOT_STARTED (GNA QoS)

* Suppress deprecated definition errors

* Fix warning
2020-11-13 16:32:26 +03:00
Yegor Kruglov
302ded7bd6 Revert "Reshape-able SliceConverter (#2954)" (#3118)
This reverts commit b437387bd5.
2020-11-13 15:36:04 +03:00
Mateusz Bencer
2b23eb8ade Enable CPU and Interpreter Loop tests (#3042) 2020-11-13 13:32:19 +01:00
Katarzyna Mitrus
bda370c5da [nGraph] MatMul - Remove fused op and align output shape inference (#2866)
To follow MatMul spec update for 1D tensors this PR removes FusedOp decomposition for MatMul without changing current MatMul output shape inference logic (numpy/onnx aligned).
Based on previous PR #2212 that follows rather current spec logic.
2020-11-13 15:15:22 +03:00
Gleb Kazantaev
e79298fb40 Improve ConvertBroadcast3 pass to avoid extra Multiply operations for BIDIRECTIONAL mode (#3113)
* Fixed ConvertBroadcast3 pass for BIDIRECTIONAL mode to avoid excess Multiply operations

* Added funcitonal tests for new decompositions

* Return false if mode is unknown; avoid usign node in replace_node

* Added functional tests for cases when TargetShape input is not a Constant
2020-11-13 14:39:07 +03:00
Rafal Blaczkowski
c3683341f3 [OpenVino ONNX CI watchdog] Small improvements (#3096)
* Small improvements

* Enlarge pending status
2020-11-13 12:17:11 +03:00
Sergey Shlyapnikov
c7155d13a4 [IE CLDNN] Fix for fusing Activation into Eltwise primitive in fused_conv_eltwise primitive case usgae (#2997) 2020-11-13 11:58:03 +03:00
Michał Karzyński
76ff0a5466 Add Dependabot configuration (#3029)
* Add Dependabot configuration

* Update config to Dependabot native
2020-11-13 11:50:47 +03:00
Anton Pankratv
95be0aa638 Hetero KW warning fix (#3107) 2020-11-13 10:53:31 +03:00
Edward Shogulin
4a362bddc5 [LPT] POT support: absent convert fix & element-wise empty dequantization data (#3067) 2020-11-13 10:32:59 +03:00
Vladimir Paramuzov
17c67ddc5f [IE CLDNN] Cleanup cldnn source tree and README (#3043) 2020-11-13 09:29:28 +03:00
Vladimir Paramuzov
7c2060fb7b [IE CLDNN] Fixed fmt traits map (#3088) 2020-11-13 09:29:05 +03:00
Andrew Bakalin
0681cdf1c5 [VPU][NGraph] Extend TopK K propagation (#2943)
* [VPU][NGraph] Support ShapeOf and Gather in TopK K propagation

* [VPU] Save calculated K value

* [VPU][Tests] Introduces tests

* [Tests] Review fixes
2020-11-13 07:50:31 +03:00
Alexander Perepelkin
69a8195d56 Disable test ExecGraphSerializationTest.ExecutionGraph_CPU (#3097)
* Disable test ExecGraphSerializationTest.ExecutionGraph_CPU as temporary measure to avoid segfault

* Disable segfaulting getAvailableDevices
2020-11-13 02:26:55 +03:00
Artyom Anokhov
92f977211e install_NEO_OCL_driver: Added user to render group. (#3099) 2020-11-12 19:35:19 +03:00
Andrew Bakalin
9379247076 [IE][VPU]: GatherND DTS transformation (#3025)
* Implement GatherND DTS
* Introduce tests on DTS
* Introduce tests on DSR+GatherND
2020-11-12 17:30:41 +03:00
Elizaveta Lobanova
a10f71feeb [GNA] Added tests for negative memory layer offset and split - trivial permute - concat scenario (#2989) 2020-11-12 17:07:38 +03:00
Pavel Esir
8c89d8d733 add getting nms_threshold / iou_threshold from RetinaNet (#3075)
* added getting nms_threshold/iou_threshold from original TF RetinaNet model

* iou_threshold definition added

* fixed getting iou_threshold for TF NMS V2, some minor corrections

* added box_encoding to NMS extractors
2020-11-12 15:04:07 +03:00
Ilya Churaev
0f4525affc Removed const_cast from addOutput method (#3091) 2020-11-12 14:59:28 +03:00
Alexandra Sidorova
a8e581ff8b [CPU] Converted Pad Layer to MKLDNNNode and added more optimized implementations (#2586)
Pad-1: fixed ngraph reference for symmetric mode and added cpu tests
2020-11-12 14:25:42 +03:00
Vladislav Volkov
be3df1837c ITT performance counters for first inference (#1741)
* ITT performance counters for first inference

ITT counters for nGraph passes

* RTTI for trnasformation passes

* The MKLDNN plugin first inference counters improvements
2020-11-12 14:00:14 +03:00
Daria Mityagina
121f75f49d [IE][VPU][TESTS]: support different modes for Interpolate (#2963) 2020-11-12 13:51:48 +03:00
Ilya Churaev
f1c8ecb40b Fixed KW for Windows (#3089)
* Fixed KW for Windows

* Fixed code style

* Fixed compilation
2020-11-12 13:34:28 +03:00
Svetlana Dolinina
7bd76dc12b Move QueryState from ExecutableNetwork to InferRequest (#2818)
* QueryState moved to InferRequest

* deprecate ExecutableNetwork::QueryState,chaged tests (without any check yet)

* fix build

* review fixes + build fix

* build fix + review changes

* remove blank line

* style fixes

* test build fixes

* style fix

* style fix

* fixed build of tests

* fix

* mac build fix

* hddl plugin build fix

* clean up unneeded implementation for method

* fixed tests build

* add implementation for getstate, correct getName for MklDNN

* fixed description of state API in comments

* lint fixes

* Rename MemoryState to VariableState

* added tests for cpu for VariableStates, several small fixes in tests and code

* merge fix

* lint fix

* remove whitespaces

* spaces fix

* fix in test to make it workable for all plugins

* fix typo

* fix test for gna

* remove extra comment

* fix test for gna
2020-11-12 12:40:43 +03:00
Mikhail Treskin
809c504d0a Summary report generator for layer and subgraph tests (#2707)
* Initial summary dumper implementation

* Handle Tensoriterator body + add parser script

* Add support of XML reports merging + report OP names with versions

* Remove debug device name change

* Fix windows building issue

* Add --disable_test_skips command line option

* Gtest failure with logging

* Change skipping logic and resolve linkage errors caused by extern

* Get graph body from Loop

* Fix disable_tests_skipping symbol redefinition

* Fix inline for currentTestIsDisabled

* Rollback get_body for Loop

* Handle cases with skip in test SetUp

* Report Loop and TI ops along with ops in subgraph body

* Resolve some PR comments

* Dummy commit to kick pre-commit validation

Co-authored-by: Efode, Irina <irina.efode@intel.com>
2020-11-12 12:33:23 +03:00
Evgeny Lazarev
f4d399f471 Fixed transformations looking for FusedBatchNorm operation to look for FBNV2 and FBNV3 also (#3078)
* Fixed transformations looking for FusedBatchNorm operation to consider FusedBatchNormV2 and FusedBatchNormV3 also.

* Updated unit test for FusedBatchNormTraining

* Fixed unit test
2020-11-12 07:33:39 +03:00
Maksim Doronin
9420b6e599 [IE][VPU]: Implement VPU Ngraph EIP->ReorgYolo transformation (#3066)
* We need to convert ExtractImagePatches op to ReorgYolo to restore the working capacity of myriad plugin while compiling Yolo-v2 models.
* It was previously removed in #2687
2020-11-11 22:04:59 +03:00
Ilya Lavrenov
5e8e32f9bf Don't build extra module if it doesn't have cmake files (#3074) 2020-11-11 20:31:44 +03:00
Edward Shogulin
518c0b6bd7 [LPT] Dequantization constant output precision handling extending (#2987)
* [LPT] moveDequantizationAfter fix

* [LPT] ConcatTransformation fix: only intermediate operations are handled
2020-11-11 18:50:37 +03:00
Maxim Kurin
27c97a037f [IE][VPU]: Optimize swish layer and remove swish replacement pass (#2993)
* Swish layer optimization
* Update VPU firmware 1468
2020-11-11 17:40:37 +03:00
Vladimir Gavrilov
e479b011f5 retinanet onnx model has Upsample error (#3052)
* Commit.

* Fixed infer function of ONNXResize11 operation.

* Small fixes.

* Written unit tests for shape calculation for ONNXResize11.
2020-11-11 17:31:00 +03:00
Tomasz Dołbniak
20df6eada6 Removal of obsolete constant folding passes (#2902)
* Redundant op::Max CF removal

* Redundant op::Min CF removal

* Redundant op::Sum & op::Product CF removal

* CF Min and Max using evaluate()

* Arithmetic reduction CF pass removal

* Quantize op CF pass removal

* Convert op CF pass removal

* Logical reduction CF pass removal

* Select op CF pass removal

* OneHot CF pass removal

* Code formatting

* ScatterElements CF pass removal

* Gather CF pass removal

* Disable a Quantize op test that fails in CI

* CF pass cleanup

* Convert op cleanup and test adaptation to spec

* Possible fix for failing VPU tests

* Limit the types used in OneHot::evaluate

* Quantize op evaluator removal

* Refactor of Gather evaluator
2020-11-11 15:49:40 +03:00
Roman Donchenko
a428c469ce Fix spelling errors in samples and documentation (#2795)
* Fix spelling errors in samples

* Fix spelling errors in the documentation
2020-11-11 15:35:39 +03:00
Edward Shogulin
719187ca04 [LPT] CNNNetwork LPT removal (#3035)
* [LPT] CNNNetwork LPT removal

* Fixes for LPT removal

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
2020-11-11 14:56:58 +03:00
Roman Kazantsev
53911a91f6 Fix GatherND to output dynamic rank tensor (#3073)
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2020-11-11 14:47:00 +03:00
Andrew Bakalin
b20f76967a [IE][VPU][Tests]: Fix NMS DTS outputs naming + tests (#3040)
* Fix dynamic output case in interpreterFunction. For dynamic output cases, we can't call get_shape on the result because it's shape is dynamic, instead, we should take the real output shape from output HostTensor
* Fix outputs naming as it's done in other DTS transformation for operations with multiple outputs (Split, TopK, etc).

Ticket - #-42421
2020-11-11 13:52:42 +03:00
Jedrzej Hajduczenia
f7a6aae5b0 [IE CLDNN] Add asymmetric quantization support to reference convolution imad kernel (#2994) 2020-11-11 12:38:45 +03:00
Evgeny Lazarev
f633f0035c Added support for a new version of the TF OD API pre-processing part (#3063)
* Added support for a new version of the TF OD API pre-processing part of the mode

* Get rid of legacy API usage

* Fix comment and added assert

* Wording
2020-11-11 11:53:10 +03:00
Roman Lyamin
6b09d5769f [IE CLDNN] Added LogSoftmax-5 operation (#2945) 2020-11-11 08:53:30 +03:00
Gleb Kazantaev
252b99dc01 Fix wrong statement in ConvertConvolutions transformation (#3056)
* Fixed wrong statement in ConvertConvolution transformation

* Added tests

* FIXME: 42956
2020-11-11 07:49:22 +03:00
Nikolay Shchegolev
eb82adeb3a [CPU] Proposal layer. Check img info input. (#2456) 2020-11-11 00:36:38 +03:00
Andrey Dmitriev
bd091500cd [GNA] Added Multiplication 1x1x1 (#2470)
* [GNA] Broadcast power primitive

[GNA] Broadcast power primitive

[GNA] Added Multiplication 1x1x1

[GNA] Broadcast power primitive

Added secondary changes

* Added fix test
2020-11-10 20:56:21 +03:00
Andrey Sokolov
634109acfa [IE][VPU]: support new operation CEILING (#3004)
Add new Operation "Ceiling" for VPU Myriad
task: -42885
2020-11-10 19:28:53 +03:00
Yegor Kruglov
b437387bd5 Reshape-able SliceConverter (#2954)
* initial commit

* add cast

* data type fix

* added tests

* added test without axes and steps

* remove redundant imports

* discussions resolving

* Add cast to TFSliceToSlice

* layer tests fix

* update unittest
2020-11-10 17:51:59 +03:00
Roman Kazantsev
e3b879ad3b Provide GatherND with original layout for inputs and output (#3002)
* Provide GatherND with original layout for inputs and output

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

* Fix code review #1

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2020-11-10 17:24:04 +03:00
Andrey Dmitriev
4a0170dcb0 [GNA] fixed case when input connected to concat from left and const from right (#2874)
* Added test

* Added fix

* Fix comment

* Fix conflict
2020-11-10 16:37:03 +03:00
Andrey Dmitriev
12bb8abe5c [GNA] Added fix for export scores (#3009) 2020-11-10 16:33:41 +03:00
Ilya Lavrenov
dfae8fec65 OneCore toolchain (#3044)
* Added OneCoreUap toolchain file

* Intentation

* Updated OneCore toolchain

* Fixed linkage error with static runtime

* Link reader_api library

* Enable static runtime for ONNX part

* Allow to override flags

* Added flag for clDNN; plus refactoring

* Fix Includes

* Added toolchain check

* Added apivalidator for MYRIAD plugin

* Added commented apivalidator for CLDNN plugin
2020-11-10 16:29:37 +03:00
Ivan Tikhonov
c309bb77d2 Reference implementations for Loop and TensorIterator ops (#2978)
* Loop op ngraph implementation, update IE IR Reader and ngraph to cnn converter

* refactoring SubGraphOp class

* type prop unit tests

* ngraph code style

* update comment

* single layer tests for Loop operation

* fix file name

* Add SpecialBodyPorts attribute in Loop op, update single layer tests

* first debug version

* more tests

* missing test file

* removed not needed shapes from test data

* move test data to new folder

* shape infer tests

* Added execution tests

* add several new tests cases, strict checks in Loop impl, temporary disable single layer tests

* ngraph codestyle, refactoring, clone_new_args test

* resolve review remarks

* fix build

* fix tests

* more execution tests

* add a new constructor of Loop op, resolve review remarks

* execution tests

* synchro with current version

* handle scalars and more tests

* scalar test enabled

* loop reference impl

* bug fixes in tests, onnx importer part and in the ref implementation of the Loop op

* applied remarks

* handle unsupported cases

* rewrite unit tests

* update INTERPRETER manifest

* is_termination_condition_always_true simplification

* [TEST] update python models tests

* review remarks

* added xfail to tiny_yolov3

* missing model test

* revert test data

* fixed numbers of failing tests

* fixed failed test description

* fix test message

* fix xfail test

* reference implementation for ngraph::function

* update loop reference implementation

* Refactor loop reference implementation

* ngraph codestyle

* Refactoring

* Submodule update

* Skip check for Reduce ops in mkl for scalar cases, support for yolov3

* fix ngraph reader tests

* revert ceiling op, renaming

* Add allias(Ceiling) for Ceil op in mkl

* delete xfails

* fix build

* single layer tests for tensor iterarator

* Refactor TensorIterator and Loop ref impls

* revert dynamic tensor creation, disable some dynamic test cases

* fix warning

* Resolve review remarks

* revert Predefined values in Loop tests

Co-authored-by: Mateusz Bencer <mateusz.bencer@intel.com>
2020-11-10 15:49:59 +03:00
Krzysztof Bruniecki
b6e2cd692b Add fix for multiple_activations test (#2984)
* Add fix for multiple_activations test

   - Add forbid activation fusing pass for GNA2 library
   - Fix get all prev layers fnct
   - To enable GNA_NoRegression.smoke_multiple_activations_onGNA_INT16

* Apply Bartek review
2020-11-10 13:40:28 +03:00
Nikita Kudriavtsev
93ad181c8b [IE][Myriad] Fixing global_lock_fd locking in mvnc (#3024) 2020-11-10 12:39:32 +03:00
Ilya Churaev
58fa4b6f76 Set friendly name in order to operate with it on visit attributes and validate stages (#3048) 2020-11-10 12:24:53 +03:00
Mateusz Bencer
0baad0696c [ONNX Importer] Resolved problem with incorrect opset version set in subgraph (#2959) 2020-11-10 09:57:06 +01:00
Liubov Batanina
0a71ada75e [IE TESTS] Replaced size_t with int64_t (#2699)
* Replaced size_t with int64_t

* Fix gpu plugin
2020-11-10 11:35:24 +03:00
Anton Voronov
be065c0144 [CPU] fixed strides filling in blocking desc (#2353) 2020-11-10 11:25:12 +03:00
Jesus Espinoza
753d376062 Update get started Linux instructions (#3016)
* Updating broken link on getting started linux doc

Link to build instructions was broken, updated link to the correct location.

* Update get-started-linux.md

* Update get-started-linux.md

* Update get-started-linux.md

* Update get-started-linux.md

Fixed broken links and updated commands
2020-11-10 10:57:27 +03:00
Gorokhov Dmitriy
ae1f2be763 [CPU] Fixed Eltwise node endless loop in case nthreads = 1 (#3008) 2020-11-10 10:56:22 +03:00
Mateusz Bencer
eeafc8e7dc Revise Broadcast reference implementation (#2715)
* change tile reference implementation

* remove tile tests from interpreter manifest

* add repeats parameter to tile

* improve tile reference implementation

* add repeats parameter to tile reference call in tile evaluate method

* style apply

* include <numeric>

* add unnamed namespace to helper functions. Change stdio.h to cstdio. Change input_rank to be constant int

* add const reference to parameter repeats in tile reference function

* change createPitches function to use partial_sum instead of accumulate

* change a little bit createPitches function

* style-apply

* fix function naming

* style-apply

* fix calling functions name bug

* Add description of create_pitches function

* first version with debug logs

* reduce footprint

* single layer tests

* added more tests

* fixed handling bool type

* styles applied

* fix tile

* [ONLY DEBUG] print error scenario message

* fixed problem with e2e tests

* fixed casting of start_axis for numpy mode

Co-authored-by: pszmel <piotr.szmelczynski@intel.com>
2020-11-10 10:42:26 +03:00
Andrew Bakalin
8d4f8c4edd [ONNX] Return NMS-5 generation (#3003)
* [ONNX] Return NMS-5 generation

* Disable failed models
2020-11-10 09:45:14 +03:00
Evgeny Lazarev
6d7b9f4e6c Updated MO requirements for numpy (#3034) 2020-11-10 09:12:09 +03:00
Vladimir Gavrilov
13b2ef18cc Apply rest of the comments for NMS-5 review (#3037)
* Commit.

* Moved the preprocessing functions for NMS-5 to Interpreter backend.

* Code style fix.
2020-11-10 07:18:40 +03:00
Ilya Lavrenov
4c5568e858 Removed legacy dependency in template_extensions (#3026) 2020-11-09 20:48:46 +03:00
Alina Kladieva
b8c7731600 [Jenkinsfile] Get rid of dldtPipelineEntrypoint (#3012)
* [Jenkinsfile] Get rid of dldtPipelineEntrypoint

* [Jenkinsfile] Add library_version parameter

Co-authored-by: akladiev <akladiev@nncv-akladieva.inn.intel.com>
2020-11-09 19:17:19 +03:00
Anna Alberska
1220fb2fe8 [GNA] Add support for SubstituteSoftSign for pattern with addition (#2789)
* [GNA] add changes for SubstituteSoftSign for IRv10

* cpplint fix

* [GNA] add requested changes & change SoftSign test validation

* [GNA] SubstituteSoftsign refactor

* [GNA] enable 3d input tests for softsign
2020-11-09 16:40:31 +03:00
Maxim Shevtsov
4871e1802d fix for hetero example (https://jira.devtools.intel.com/browse/CVS-33836) NB: the FPGA (even though deprecated) continues to be the only viable example foir the HETERO plugin, so leaving that (#2982) 2020-11-09 14:42:18 +03:00
Rafal Blaczkowski
046183251a Fix versions (#3027)
Have some concerns on numpy version, probably should be revisited further
2020-11-09 12:55:15 +03:00
Maxim Andronov
e0d25e492f [CPU] Refactored pushInput (#2910) 2020-11-09 08:52:54 +03:00
Ilya Churaev
e7d121f173 Remove legacy files (licenses and some scripts) (#2952)
* Remove legacy files (licenses and some scripts)

* Removed LISENSE and install rules for licenses
2020-11-09 06:39:52 +03:00
Vladimir Gavrilov
da47cb05be Extend MO for the operation NonMaxSuppression-5 (#2356)
* Commit.

* Written draft of NonMaxSuppression-5 class.

* Written conversion of the value of the second output  of MO NonMaxSuppression-5 into TF format.

* Fixed type infer for the port 1 of NonMaxSuppression-5.

* Added Reshape to [1] for 0D inputs of NMS-5.

* Small fix.

* Corrected assert for number of inputs.

* Fixed docstrings for transformations TFNonMaxSuppressionNormalize and NonMaxSuppressionNormalize.

* Now the transformation TFNonMaxSuppressionNormalize uses find_and_replace_pattern().

* Moved model-optimizer/extensions/front/onnx/non_max_suppression_normalize.py to model-optimizer/extensions/front/non_max_suppression_normalize.py, to delete duplicate code.

* Deleted commented code.

* Fixed BOM-file.

* Deleted out_ports_count from NMS.

* Fixes in type_infer of NMS-5.

* Small changes.

* Added some comment.

* Small fix.

* Some fixes.
2020-11-06 21:00:55 +03:00
Vladimir Gavrilov
e935d0bd22 Enable NonMaxSuppression-5 operation and various transformations (#2450)
* Some code style fixes.

* Started to write the method v5::NonMaxSuppression::evaluate().

* Started to write nGraph reference implementation of NMS-5.

* Some additions.

* Written preprocessing of boxes data.

* Started to write the function non_max_suppression() that calculates NonMaxSuppression-5 operation.

* Written postprocessing of the evaluate().

* Small fixes.

* Small fix.

* Added include for ngraph/shape.hpp.

* Written the function intersectionOverUnion.

* Some additions.

* Small fix.

* Continued to write the function non_max_suppression().

* Small fixes.

* Small fixes.

* Some changes.

* Some additions.

* Some replacements size_t by int64_t.

* Added casts to float in the construction of selected_score variable.

* Code style fixes.

* Written draft of NMS-5 nGraph reference implementation.

* Code style fixes.

* Started to write tests for void op::v5::NonMaxSuppression::validate_and_infer_types().

* Added tests for scalars/nonscalars.

* Fixes in the test type_prop.nms_v5_output_shape.

* Fixes in tests nms_v5_output_shape_2 and nms_v5_output_shape.

* Written tests for validate_and_infer_types() of NMS-5.

* Code style fixes.

* Now NMS-5 evaluate() can have outputs with calculated shapes.

* Small fixes.

* Corrected tests for NMS-5 validate_and_infer_type().

* Code style fixes.

* Started to write inner version of NMS-5 with static output shapes.

* Written draft of the inner operation NonMaxSuppressionIE3.

* Started to write conversion of op::v5::NonMaxSuppression into NonMaxSuppressionIE3.

* Small changes.

* Some additions.

* Small fixes.

* Fixed typo.

* Fixed typos.

* Written draft of the transformation ConvertNMS5ToLegacyMatcher that converts ngraph::opset5::NonMaxSuppression into op::NonMaxSuppressionIE3.

* Written header file for the transformations from NMS-1, NMS-3, NMS-4 to NMS-5.

* Started to write conversion of NMS-4 to NMS-5.

* Added include for ngraph/opsets/opset4.hpp.

* Started to write conversion of NMS-3 to NMS-5.

* Small fixes.

* Written draft of the conversion of NMS-3 into NMS-5.

* Fixed typo.

* Started to write conversion of NMS-1 to NMS-5.

* Written draft of the conversion NMS-1 to NMS-5.

* Started to write tests for the conversion nGraph NMS-5 to inner NMS.

* Started to write the test ConvertNMS5ToNMSIEStatic.

* Written tests for conversion of nGraph NMS-5 to inner NMSIE3.

* Started to write tests for conversion of previous NMS to nGraph NMS-5.

* Written tests for conversion of old nGraph NMS to NMS-5.

* Started to write tests for opset5::NonMaxSuppression::evaluate().

* Some additions.

* Small fix.

* Written tests for op::v5::NonMaxSuppression::evaluate().

* Used NGRAPH_RTTI_DECLARATION for NonMaxSuppressionIE3.

* Used NGRAPH_RTTI_DECLARATION for NMS-5.

* All static local constants and functions for NMS-5 were moved into non-named namespace.

* Some code style fixes.

* Moved some file.

* Small fix.

* Code style fix.

* Now NMS-5 supports all floating types in inputs 0 and 1.

* Moved some files.

* Fixed include directive in the file convert_nms_5_to_legacy.cpp with transformations NMS-1, 3, 4 -> NMS-5.

* Small changes.

* Deleted conversion NMS-3 -> legacy.

* Small changes.

* Fix in op::v5::NonMaxSuppression::evaluate: output shape [1] instead of [] in the output port 2.

* Code style fixes.

* Deleted conversion of NMS-4 into legacy NMS.

* Deleted redundant ifs.

* Added NMS-5 to Python API.

* Code style fix.

* Small change.

* Fixed element type for constants in the conversion of NMS-5 to NMSIE3.

* Deleted support of f64 in NMS-5.

* Added checks for input element types for inputs #0, #1, #3, #4, #5.

* Small change.

* Now get_floats throws an exception for unsupported types.

* Now nGraph NMS-5 supports 0D and 1D tensors in inputs #2, #3, #4, #5.

* Small fix in test_non_max_suppression.

* Deleted using namespace std

* Fixes in test_non_max_suppression().

* Small fixes.

* Added 'import PartialShape' in test_reduction.py.

* Deleted creating fake inputs in the ctor of op::v5::NonMaxSuppression.

* Deleted creating fake inputs in op::v5::NonMaxSuppression::clone_with_new_inputs.

* Corrections in int64_t op::v5::NonMaxSuppression::max_boxes_output_from_input() const.

* Corrected functions float op::v5::NonMaxSuppression::soft_nms_sigma_from_input() const, float op::v5::NonMaxSuppression::score_threshold_from_input() const,  float op::v5::NonMaxSuppression::iou_threshold_from_input() const.

* Small fixes.

* Deleted commented code.

* Fixes in nms_v5_scalar_inputs_check.

* Some changes.

* Small fixes.

* Code style fixes.

* Small changes.

* Small changes.

* Small fix.

* Deleted commented code.

* Some refactoring in ConvertNMS4ToNMS5 ctor.

* Small fix.

* Common part of conversions NMS-1 -> NMS-5, NMS-3 -> NMS-5, NMS-4 -> NMS-5 was moved into the separate function.

* Now conversions NMS-1 -> NMS-5, NMS-3 -> NMS-5, NMS-4 -> NMS-5 support both 2 inputs, and 5 inputs.

* Now transformations NMS-1 -> NMS-5, NMS-3 -> NMS-5, NMS-4 -> NMS-5 are called from 'umbrella' transformation.

* Now the transformation ConvertNMS5ToLegacyMatcher supports NMS-5 with 2, 3, 4, 5, or 6 inputs.

* The transformation ConvertNMS5ToLegacyMatcher was rewritten using Reshape instead of Unsqueeze.

* Started to rewrite tests for the transformation ConvertNMS5ToLegacyMatcher.

* Some fixes.

* Small fixes.

* Corrected tests for the transformation NMS-5 -> NMSIE3.

* Small formatting fix.

* Now methods max_boxes_output_from_input(), iou_threshold_from_input(), score_threshold_from_input(), soft_nms_sigma_from_input() of op::v5::NunMaxSuppression are public.

* Started to move op::v5::NonMaxSuppression::evaluate() into ngraph/test/runtime/interpreter.

* Added NMS-5 to ngraph/test/runtime/interpreter/int_executable.

* Small fixes.

* Code style fixes.

* Written draft test nonmaxsuppression_center_point_box_format_backend in ngraph/test/backend.

* Small fix.

* Written draft tests of NonMaxSuppression in ngraph/test/runtime.

* Some changes.

* Small changes.

* Disabled IE_CPU tests for NMS-5.

* Deleted op_eval tests for NMS-5.

* Deleted evaluate() method of NMS-5.

* Now all nGraph functions in tests of the transformation NMS-5 -> NMSIE3 have one output.

* Now preprocessing and postprocessing of the calculation of NMS-5 in reference implementation.

* Code style fixes.

* Some fixes in tests for the transformation NMS-5 -> NMSIE3.

* Replaced precision i64 -> i32 for some constants in tests for the transformation NMS-5 -> NMSIE3.

* Written creating CNNLayer for NMS-5.

* Added creating CNNLayer for NonMaxSuppressionIE3.

* some changes.

* Now conversions NMS-1, NMS-3, NMS-4 -> NMS-5  and NMS-5 -> NMSIE3 generate NMS nodes with 5 inputs.

* Fixed ctor in MKLDNN NonMaxSuppressionImpl: validation of number of output edges.

* Added conversion of output_type for NMS-5.

* Fixes in the transformation NMS5 -> NMSIE3.

* Fixes in the conversion of NMS-5 to NMSIE3.

* Fixes in MKLDNN NMS ctor.

* Small fix.

* Fixed tests for the transformation NMS5 -> NMSIE3.

* Fixed tests for conversions NMS-1, NMS-3, NMS-4 -> NMS-5.

* Small fixes in MKLDNN NMS ctor.

* Rewritten create_layer() functions for NMS-5 and NMSIE3 as addSpecificCreator() functions.

* Disabled tests for IE IR reader for NMS-4.

* Deleted debug code.

* Added comment about disabling tests IE_CPU.nonmaxsuppression.

* Written IE IR Reader test for NMS-4.

* Deleted function float_from_constant_node.

* Small fixes.

* Deleted functions function_from_model and construct_weights.

* Small fix.

* Replaced push_back with emplace_back in the conversion of NMS-5 to legacy.

* Small changes.

* Some fixes.

* Refactored reference implementation of NMS-5.

* Moved structure NMSAttributes to unnamed namespace.

* Code style fixes.

* Small fix.
2020-11-06 19:11:04 +03:00
Maxim Vafin
9f0b26e14c Fix the NHWC->NCHW transformation for dynamic weights (#2848)
* Fix the NHWC->NCHW transformation when weights and data comes from same input

* Simplify code
2020-11-06 19:04:46 +03:00
Katarzyna Mitrus
15d7919817 MatMul spec update (#2765)
Aligned specification with nGraph MatMul shape inference operation. Affects description of the behavior for 1D tensors.
2020-11-06 18:41:36 +03:00
Edward Shogulin
0f00e7f703 [LPT] integration branch: Reshape fix, Concat generalization, runtime info usage extending (#2930)
* [LPT] Concat transformation generalization

* [LPT] Reshape transformation fix

* [LPT] Legacy callback fix

* [LPT] * added rt_info propagation
      * functional tests: added rt_info
      * functional tests: added MoveDequatnizationAfter tests

Co-authored-by: Vladislav Golubev <vladislav.golubev@intel.com>
2020-11-06 16:15:27 +03:00
Ivan Tikhonov
1c3208ffe0 Low Latency transformation (#2869)
* initial draft of adding sinks to ngraph::Function

* style fixes

* code style fixes

* code style fixes

* code style fix

* review fix+build fix

* code style fix

* fix build

* API changed according to latest discussion

* review fixes

* review fixes + tests

* initial draft of adding sinks to ngraph::Function

* style fixes

* code style fixes

* code style fixes

* code style fix

* review fix+build fix

* code style fix

* fix build

* API changed according to latest discussion

* review fixes

* review fixes + tests

* added 1 more ctor

* style fixes

* used new api in ir parser

* fixed build

* update low latency transformation, fix unroll transformation, add unit tests, modify subgraph tests

* fix low latency transformation

* Update low latency transformation, unit and sub-graph tests

* update LowLatency transformation and tests

* ngraph codestyle

* fix build, update description

* resolve review remarks

Co-authored-by: Svetlana Dolinina <svetlana.a.dolinina@intel.com>
2020-11-06 14:11:11 +03:00
Maxim Kurin
c97db3f4de [OpenCL] movi-cltools-20.09.2 (#2912) 2020-11-06 13:45:45 +03:00
Alexandra Sidorova
d622c08580 [CPU] Added LogSoftmax-5 support (#2743) 2020-11-06 13:22:02 +03:00
Mateusz Tabaka
731065031d Remove deprecated v0::TopK (#2947)
* Remove deprecated v0::TopK

* Remove using SortType and using Mode from TopK

* apply code format

* Revert "Remove using SortType and using Mode from TopK"

This reverts commit ee2f99ea89.
2020-11-06 11:36:33 +03:00
Mateusz Tabaka
f6332c702d Remove deprecated v0::Softmax (#2917) 2020-11-06 11:34:23 +03:00
Andrey Zaytsev
b86f908247 Feature/azaytsev/layout updates (#2985)
* Reconfigured the layouts with importing the dedicated POT layout and Accuracy Checker and Model Downloader items from the OMZ layout

* updated

* test

* test

* Moved the Model Downloader from ie_docs.xml to openvino_docs.xml

* Renamed optimization_docs.xml --> pot_docs.xml

* Added Model Server to the layout

* Minor fixes
2020-11-06 11:07:53 +03:00
Vladimir Paramuzov
ccee30e733 [IE CLDNN] Removed unused conv kernels (#2995) 2020-11-06 10:24:48 +03:00
Maxim Andronov
32c48b1087 [CPU] Added support NMS-5 (#2768) 2020-11-06 08:59:23 +03:00
Vladimir Paramuzov
6e7db6fb37 [IE CLDNN] Plugin-side kernels caching (#2871) 2020-11-05 23:44:45 +03:00
Trawinski, Dariusz
c0f64e7761 ovms doc fix (#2988)
* added OpenVINO Model Server

* ovms doc fixes
2020-11-05 21:19:54 +03:00
Evgeny Lazarev
67e039340e Added support for the Loop operation in the MO IR Reader (#2971)
* Added support for the Loop operation in the MO IR Reader
2020-11-05 20:53:44 +03:00
Anna Alberska
be406fd7a6 [GNA] support for 3D [1,1,X] import/output (#2893)
* [GNA] support for 3D [1,1,X] import/output

* [GNA] add check for C == 1 and H == 1

* [GNA] fix input dimensions restrictions for 3d
2020-11-05 19:31:55 +03:00
Alexey Ershov
d5daf9d873 [IE][VPU] Proposal stage: fixed check for optional 2nd output (#2980)
Fixed check for omitted 2nd optional output
2020-11-05 19:05:37 +03:00
Gleb Kazantaev
022ea97f18 Fixed disable/enable logic in PassConfig (#2940)
* Fixed disable/enable logic in PassConfig

* Removed set_pass_config method for Manager; added comments
2020-11-05 17:34:32 +03:00
Artyom Anokhov
24ed4133dd setupvars.bat: Fixed names for major and minor python version vars (#2986) 2020-11-05 14:48:09 +03:00
Alexey Suhov
3139eb230f [install_prerequisites.sh] remove libgfortran5, add framework to venv folder name (#2969) 2020-11-05 14:19:47 +03:00
Emmanuel Attia
71bb8135b9 Fix ngraph core opset createinsensitive (#2961)
* Fix: ITT_INCLUDE_DIR was not correctly detected

* Map find result not compared with the right iterator.

* Force recheck
2020-11-05 13:42:09 +03:00
Andrew Bakalin
e758d2b325 [IE][VPU] Fix NMS DTS (#2880)
Add a new constructor to fix absent NMS-5 inputs that will be introduced after #2450 will be merged.
2020-11-05 13:33:16 +03:00
Rafal Blaczkowski
935ac543ac Update ONNX models preprocessing script (#2936)
* Update onnx zoo models

* Update xfail list

* Update xfails
2020-11-05 12:40:48 +03:00
Ilya Lavrenov
7dc40dc69f Moved find_package(TBB) inside set_ie_threading_interface_for (#2966) 2020-11-05 11:32:46 +03:00
Ilya Lavrenov
5be7f32f95 Enable LTO only for Release (#2968) 2020-11-05 11:31:32 +03:00
Ilya Lavrenov
307182af69 Multi process build for MSVC (#2974) 2020-11-05 11:31:02 +03:00
Rafal Blaczkowski
fbf7cc70ab Update xfails (#2979) 2020-11-05 10:12:51 +03:00
Mateusz Tabaka
0ee774eb92 Remove obsoleted v0::Sum op (#2938) 2020-11-05 09:13:12 +03:00
Mateusz Tabaka
d7d60b401e Remove obsoleted v0::Slice and v0::Split ops (#2908)
* Remove obsoleted v0::Slice op

* Remove deprecated v0::Split op

* Fix build_graph tests
2020-11-05 09:11:45 +03:00
Mateusz Tabaka
43d47d780e Remove obsoleted v0::QuantizedConvolution op (#2958) 2020-11-05 09:10:51 +03:00
Jozef Daniecki
5d7f83f399 Fix testcase CheckExecGraphInfoSerialization (#2973)
* Generate unique output file names in CheckExecGraphInfoSerialization testcase.

When multiple instances of this test were executed in parallel the same
file was accessed by multiple threads which was the cause of flakiness.

* Enable ExecGraphTests.CheckExecGraphInfoSerialization on GPU
2020-11-05 07:16:24 +03:00
Zoe Cayetano
c68858760a Update Custom_Layers_Guide.md (#2964)
Update misspelling on ONNX
2020-11-05 07:01:21 +03:00
Jozef Daniecki
ac658fb500 Fix serialization of execution graph. (#2901)
* Fix serialization of execution graph.

* Add exec graph comparison.

* Align execution graph serialization to old aproach.

* Revise error massages.

* Fixed execution graph comparison.

Now only attribute names are compared since values can differ on
different devices.

* Readability refactoring.

* Refactoring regarding readability.
2020-11-05 06:52:08 +03:00
Vladimir Paramuzov
7c1690951c [IE CLDNN] Added inference precision into execution graph (#2913) 2020-11-05 00:13:49 +03:00
Nikolay Shchegolev
d3ecfe56d4 [CPU] CTCLoss sporadic issue. (#2934)
* [CPU] CTCLoss sporadic issue.

* [Tests] Enable CTCLoss tests.
2020-11-04 21:16:53 +03:00
Jedrzej Hajduczenia
fbae10a235 [IE CLDNN] Add asymmetric quantization support to fsv16 imad general convolution kernel (#2778) 2020-11-04 17:31:40 +03:00
Sergey Shlyapnikov
9c509e5f41 [IE CLDNN] Convolutition optimizations for small channels count (#2849) 2020-11-04 14:41:12 +03:00
Tomasz Socha
7c6794344c [ONNX][PyTests] Fix result datatype missmatch (#2596) 2020-11-04 12:19:40 +01:00
Michał Karzyński
23188e1b04 Expand ONNX functions to sub-graphs before import (#2733)
Co-authored-by: Bartosz Sledz <bartosz.sledz@intel.com>
2020-11-04 10:48:34 +01:00
Alexander Zhogov
df49a2b987 Azure CL: Improve yaml (#2951)
* Azure CL: Improve yaml

* Fix installing requirements

* Add run onnxImporterUnitTests
2020-11-03 21:20:53 +03:00
Rafik Saliev
d225ba6e53 [IE] Add batched blob support (#2203)
* [IE] Add batched blob support

New `class BatchedBlob : public CompoundBlob` defined to allow to pass multiple blobs as 1 InferRequest input.

Motivation: There is the special user case when a number of plain images (e.g. `NV12Blob`) should be passed as one input for network which batch size > 1.

`class CompoundBlob` is not applicable for such cases due to:
1. `NV12Blob` is `CompoundBlob` which prevents to combine multiple NV12 images to a CompoundBlob
2. The default behavior in most of plugins - do not accept generic CompoundBlob as `SetBlob()` argument

Adding `SetBlob(name, vector<Blob::Ptr>...)` to `class IInferRequest`, `class InferRequest`, `class IInferRequestInternal`, ...  - is not effective solution due to limited and specific use cases for `batched inputs`.

+ Apply rule-of-zero to CompoundBlob and inherited classes.

* Add "BATCHED_BLOB" optimization capability metric

* Add BatchedBlob usage to hello_nv12_input_classification

* Apply offline code review outcome:

1. Revert CompoundBlob public .ctors signatures
2. Remove 'workaround' .ctor for `BatchedBlob`
3. Revert tensor descriptors of `I420Blob` `NV12Blob` back to the 'fake' value.

* Code review fix

* Add functional tests for CPU, GPU, MULTI, HETERO

* update doc comment

* Apply code review change requests.
2020-11-03 21:19:26 +03:00
Evgeny Lazarev
d682950e64 Updated requirements dependency (#2950) 2020-11-03 18:26:11 +03:00
Piotr Szmelczynski
c8bd92ac0d Sigmoid revise (#2942)
* remove sigmoid_backprop

* Update Sigmoid spec

* Update Sigmoid spec
2020-11-03 18:16:16 +03:00
Irina Efode
a66c728a46 [IE TESTS] Fix reg exp for issue 42029 (#2957) 2020-11-03 18:12:24 +03:00
Mikhail Ryzhov
1144130b50 Aligned python read_network() with C/C++ behaviour (#2916)
Aligned python read_network() with C/C++ behaviour

Excluded mandatory check of weights file, it is redundant

* Added unit tests
2020-11-03 16:18:43 +03:00
Andrey Zaytsev
cf5055745a Added info on DockerHub CI Framework (#2918) 2020-11-03 16:14:27 +03:00
Andrey Dmitriev
976f1f84a9 [GNA] Set default compact_mode (#2895) 2020-11-03 16:10:54 +03:00
iliya mironov
1e67eaf030 Add IR reader test for hsigmoid op (#2825)
* Add IR reader test for hsigmoid op

* update ir

* Fix decomposition

* Update hsigmoid ir reader test

* Update unit test

* fix test
2020-11-03 14:13:08 +03:00
Mikhail Letavin
78bf78660f [IE CLDNN] Fix X/Y swap in NV12 shared surface input layout (#2949) 2020-11-03 13:29:36 +03:00
Rafal Blaczkowski
4085785d73 Abort previous builds on PR update (#2877) 2020-11-03 10:54:31 +01:00
Andrew Bakalin
1c6772a9fc [IE][VPU]: Support for Bidirectional mode in Broadcast DTS (#2873)
* [VPU][DTS] Update broadcast DTS to support BIDIRECTIONAL mode
* [VPU][Tests] Update tests with inference
* [VPU][Tests] Extend DTS tests
2020-11-03 11:59:06 +03:00
Andrey Sokolov
f3ac97e9f4 [IE][VPU]: Interpolate - reuse "interp", "resample" layers (#2932)
Reuse existing "interp", "resample" layers
task: #-29955
2020-11-03 11:56:55 +03:00
Ilya Churaev
665fd1b773 Fixed README (#2948) 2020-11-03 10:56:28 +03:00
Kamil Magierski
3f4d8b49ff Fix cases when identities inserted identites are separated by nonFunctional layers (#2771) 2020-11-03 10:49:58 +03:00
Krzysztof Bruniecki
6a2c209e58 Handle multiple GNA devices and modes HW/SW (#2720)
* Introduce Gna2DeviceGetCount

* Check for the number of GNA devices

* Add Gna2DeviceGetCount() mock
2020-11-03 10:49:09 +03:00
Andrey Dmitriev
d79263fcd0 [GNA] Added export input/output names (#2601)
* [GNA] Added export input/output names

* fix comment

* Change version
2020-11-03 10:45:08 +03:00
Mateusz Tabaka
3f5584534a Remove obsoleted v0::Reshape operator (#2878)
* Remove obsoleted v0::Reshape operator

* Fix handling negative dims on 32 bit platforms

Change-Id: Ia18e20df9a79fd0b7b38c434bee7140599833952

* apply code format

Change-Id: I4ddfb9e7033cbc97e167922f6ee5873d5487e551
2020-11-03 07:01:34 +03:00
Anton Romanov
50e6d0e31e Added check in hello sample (#2896)
* Added check in hello sample

* move check before inference
2020-11-03 06:34:06 +03:00
Ilya Lavrenov
1a1451ed8f Compilation with MSVC for ARM (#2928)
* Enable compilation with MSVC for ARM / ARM64

* Condition fix
2020-11-03 00:55:49 +03:00
Evgeny Lazarev
c8dd831fc3 Added transformation config to support automl efficientdet models (#2894)
* Added transformation config to support automl efficientdet-4 model

* Added configuration file to convert Automl EfficientDet model

* Updated unit test for Pack

* Added instruction on how to convert EfficientDet Tensorflow model

* Updated documentation on how to convert EfficientDet model

* Updated a documentation with instruction on how to convert Automl EfficientDet.
2020-11-02 19:21:05 +03:00
Alexandra Sidorova
5596c7c841 [CPU] Added eltwise Round-5 (#2347) 2020-11-02 18:44:50 +03:00
Ilya Lavrenov
f2963713d0 Fixed FAST build mode (#2926) 2020-11-02 17:58:52 +03:00
Aleksandr Korolev
5ffa2cd5e3 [IE TESTS] Split Layer Test refactoring (#2915)
Co-authored-by: kora6 <kora6@github.com>
2020-11-02 16:29:59 +03:00
Andrey Kamaev
8425cd492c Remove remaining Myriad-2 references (#2853)
* Fix Myriad firmware copying command for multi-target cmake generators

* Remove remaining Myriad-2 references

* Remove remaining Myriad-2 compute stick from documentation
2020-11-02 15:10:50 +03:00
Anton Romanov
67386294c0 Change pip install documentation (#2884) 2020-11-02 14:09:54 +03:00
Bartek Szmelczynski
8e01022252 Visitor API deserialization - create models for ops (#2889)
* add tests for 11 operators, which compare V7 and V10 version of the model optimizer

* add test for space_to_depth model
2020-11-02 13:48:53 +03:00
Vladimir Paramuzov
fea2595aed [IE CLDNN] Fixed unitialized parameters in resample primitive which led to kernels recompilation (#2923) 2020-11-02 13:31:07 +03:00
Alexander Peskov
6fe05ecda7 Unmark passed ONNX test
Signed-off-by: Alexander Peskov <alexander.peskov@intel.com>
2020-11-02 12:37:48 +03:00
Alexander Peskov
0a4509914a [TEST] One more trivival loop test
Signed-off-by: Alexander Peskov <alexander.peskov@intel.com>
2020-11-02 12:37:48 +03:00
Alexander Peskov
045d26ff31 [CPU] Fix case with unused port in Loop body
Signed-off-by: Alexander Peskov <alexander.peskov@intel.com>
2020-11-02 12:37:48 +03:00
Alexander Peskov
5ac26ff3b6 [TEST] One more trivial test case on Loop
Also fixed compilation with gcc4.8

Signed-off-by: Alexander Peskov <alexander.peskov@intel.com>
2020-11-02 12:37:48 +03:00
Alexander Peskov
7d7021269f [CPU] Improve replication of passthrough Loop body
There was some problem with replicatioon of simple loop body where
input was used as output as is.

Also was voided usage of special prefixes like "in_" for Loop body inputs.

Signed-off-by: Alexander Peskov <alexander.peskov@intel.com>
2020-11-02 12:37:48 +03:00
Alexander Peskov
fe51b7cb8b Min. Additional assert in copyTIBoody
Signed-off-by: Alexander Peskov <alexander.peskov@intel.com>
2020-11-02 12:37:48 +03:00
Alexander Peskov
d7e3e92b64 [TEST] Several more Loop test with static shapes
Signed-off-by: Alexander Peskov <alexander.peskov@intel.com>
2020-11-02 12:37:48 +03:00
Alexander Peskov
3160290e13 [CPU] implement Loop specification of TI node
Signed-off-by: Alexander Peskov <alexander.peskov@intel.com>
2020-11-02 12:37:48 +03:00
Alexander Peskov
124bfc34b3 [NG] Keep special purposes port info in Loop after conversion to legacy
Also:
Simplified logic of data object name restoring. Avoid duplicatin of input ports
in case of multiple consumers. Provided code has WA comment in corresponding
naming restore section. Also added WA section with restore U8 precision for ouputs.
Avoid to eliminate limitation of CNNNetwork converter.

Signed-off-by: Alexander Peskov <alexander.peskov@intel.com>
2020-11-02 12:37:48 +03:00
Alexander Peskov
e770f7b0cf [TEST] improve data utils
Signed-off-by: Alexander Peskov <alexander.peskov@intel.com>
2020-11-02 12:37:48 +03:00
Alexander Peskov
56dc06d09f Avoid '-' symbol for test name
Signed-off-by: Alexander Peskov <alexander.peskov@intel.com>
2020-11-02 12:37:48 +03:00
Alexander Peskov
bb28eb7209 Loop tests enabled back
Signed-off-by: Alexander Peskov <alexander.peskov@intel.com>
2020-11-02 12:37:48 +03:00
Alexander Peskov
05651b18af [IE] Improve Network topological sort in case of disconnected graph
Signed-off-by: Alexander Peskov <alexander.peskov@intel.com>
2020-11-02 12:37:48 +03:00
Alexander Peskov
ec1561a234 Improve CopyTIBody util to cover disconnected graphs
Signed-off-by: Alexander Peskov <alexander.peskov@intel.com>
2020-11-02 12:37:48 +03:00
Mateusz Tabaka
16bb29f29c Remove obsoleted v0::StopGradient op (#2935) 2020-11-02 12:22:01 +03:00
Tomasz Jankowski
2d9a47127d refactor one-hot nGraph backend test (#2578) 2020-11-02 10:12:39 +01:00
Tomasz Jankowski
1b94682f86 Avoid verbose return-type warnings (#2420) 2020-11-02 10:11:35 +01:00
Tomasz Jankowski
1550e94156 nGraph backend tests refactor: gather, numeric (#2367) 2020-11-02 10:10:25 +01:00
Ilya Lavrenov
890c8e4d38 Fixed compilation errors / warnings with clang (#2929) 2020-11-02 11:56:38 +03:00
Mateusz Tabaka
d3c2d90d7f Remove obsoleted v0::Or operator (#2857)
* Remove obsoleted v0::Or operator

* apply style format
2020-11-02 06:49:03 +03:00
Mateusz Tabaka
557c83b64b Remove deprecated v0::Round op (#2905) 2020-11-02 06:47:35 +03:00
Mateusz Tabaka
3f35746c45 Remove deprecated v0::Reverse op (#2899)
* Remove deprecated v0::Reverse op

* fix unit tests

* add include for std::inserter
2020-11-02 06:46:30 +03:00
Andrey Babushkin
4acd117c8d Temporarily skip ExecGraphTests.CheckExecGraphInfoSerialization on GPU (#2921)
* Skip ExecGraphTests.CheckExecGraphInfoSerialization on GPU

* [execution_graph_tests] Add test skipping macro

* Add missing import
2020-11-01 12:55:50 +03:00
Svetlana Dolinina
32732a1f29 Adding sinks to ngraph::Function (#2741)
* initial draft of adding sinks to ngraph::Function

* style fixes

* code style fixes

* code style fixes

* code style fix

* review fix+build fix

* code style fix

* fix build

* API changed according to latest discussion

* review fixes

* review fixes + tests

* added 1 more ctor

* style fixes

* used new api in ir parser

* fixed build

* review fixes

* remove validate_nodes_and_infer_types from remove_sink/remove_result

* removed validate_.. after discussion

* style fix
2020-10-31 19:41:05 +03:00
Maxim Kurin
28de789993 [IE][VPU]: GatherND layer & tests (#2710)
* GatherND layer & test
* Update vpu firmware 1452
2020-10-31 02:02:23 +03:00
Edward Shogulin
997cc1e863 [LPT] nGraph nodes naming fix (#2822)
* [LPT] functional tests: FakeQuantize with dynamic intervals

* [LPT] decomposeFakeQuantize: removed debug info

* [LPT] Add NetworkHelper::mark_as_dequantization_op function

[ngraph] Fix compare runtime info function

[LPT] Fix test cases with no DEQUANTIZATION runtime attribute

[LPT] Change include path for dequantization op

* [LPT] Remove Subtract functional test, enable and rename legacy tests

Co-authored-by: Vladislav Golubev <vladislav.golubev@intel.com>
Co-authored-by: Aleksandr Pertovsky <aleksandr.pertovsky@intel.com>
2020-10-30 23:23:35 +03:00
Ilya Lavrenov
2104b6dde0 Added support for Visual Studio VERSIONINFO (#2900)
* Generate vs_version file

* Fixed comments

* Fixed comments
2020-10-30 21:38:34 +03:00
Ilya Lavrenov
43265b50a7 Fixed cmake stage with BUILD_SHARED_LIBS=ON (#2914) 2020-10-30 21:37:51 +03:00
Ilya Lavrenov
d281629ba0 Fixed compilation with ENABLE_V7_SERIALIZE=ON (#2898)
* Fixed compilation with ENABLE_V7_SERIALIZE=ON

* Removed legacy code
2020-10-30 21:19:12 +03:00
Trawinski, Dariusz
b9877299c8 added OpenVINO Model Server to docs (#2541)
* added OpenVINO Model Server

* updated documentation to include valid links

* minor fixes

* Fixed links and style

* Update README.md

fixed links to model_server

* more corrections

* dropped reference in ie_docs and minor fixes

* Update README.md

Fixed links to Inference Engine pages

Co-authored-by: Alina Alborova <alina.alborova@intel.com>
Co-authored-by: Andrey Zaytsev <andrey.zaytsev@intel.com>
2020-10-30 19:57:01 +03:00
Vladimir Paramuzov
cf00a2f442 [IE CLDNN] Added int8 output suppirt into bfyx_to_fsv16 fp kernel (#2906) 2020-10-30 15:19:02 +03:00
Mikołaj Życzyński
924988590a [IE CLDNN] Fix for some unwanted behaviour in layout optimizer (#2669) 2020-10-30 15:18:14 +03:00
Sergey Lyubimtsev
93342f0860 [MO] Add CMake install for Model Optimizer (28291) (#2831)
* [MO] Add CMake install for Model Optimizer

* [MO] Update test for version.py

* [MO] Add CMake install for Model Optimizer

* [MO] Update test for version.py

* [MO] Add CMake install for Model Optimizer

* [MO] Update test for version.py

* [MO] fix file permissions for install location
2020-10-30 14:37:06 +03:00
Andrey Sokolov
4ce6e3414c [IE][VPU][Myriad]: NMS layer optimization; support big buffers (#2839) (#2839)
* Myriad: new firmware version (1445)
2020-10-30 13:30:21 +03:00
Gladilov, Gleb
6845af5880 [IE][VPU][GT]: Fixes Eltwise+ReLU merge for dynamic networks (#2777)
Eltwise + ReLU merge is expected to be performed unconditionally
in all cases and since it does not require strides to be defined
could be performed before adjustDataLayout pass.

Unfortunately, there are cases with unexpected degradation after
such a change is introduced. In specific case it seems to be
caused by degradation in HW operation (convolution). It was not
investigated completely and reason is still unknown (convolution
itself remains unchanged in network, but for some reason works
slower).

It has been decided to introduce change only in case of dynamic
models to have performance benefit for some cases and avoid
degradations in others.

Moving mergeEltwiseAndReLU pass before adjustDataLayout for
dynamic cases allows to get additional performance gain due to
lack of extra copy stages introduced in adjustDataLayout.

Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>
2020-10-30 11:42:09 +03:00
Rafal Blaczkowski
797d35ef64 Improve ngraph python api in debug mode (#2836)
* Update MacOS machine

* Update setup.py

* Add debug statement

* Improvements

* Update ngraph/python/setup.py

Co-authored-by: Michał Karzyński <4430709+postrational@users.noreply.github.com>

* Rollback the last change

Co-authored-by: Michał Karzyński <4430709+postrational@users.noreply.github.com>
2020-10-30 11:17:58 +03:00
Ilya Churaev
a1b144d024 Removed legacy travis script (#2888)
* Removed legacy travis script

* Removed legacy variables
2020-10-30 10:18:09 +03:00
kobeyu
22e1a30294 [IE CLDNN] Fixed compilation error for tutorial samples (#430)
Co-authored-by: Kobe Yu <kobe.yu@kneron.us>
Co-authored-by: Alexander Zhogov <alexander.zhogov@intel.com>
2020-10-30 10:07:17 +03:00
Gladilov, Gleb
8ee263e7fb [IE][VPU][GT]: Introduce Split by dynamic dimension check (#2802)
* [IE][VPU][GT]: Introduce Split by dynamic dimension check

At the moment, myriad plugin does not support split operation
by dynamic axis. To be sure there is no issue with optimized-out
split operation which should have been replaced with copy
stage - assertion before DTS transformation is introduced.

Check should be performed before loop with DTS transformations
because it requires dynamic context (dynamic dimension should be
visible as dynamic), otherwise dynamic dimension would be
replaced with upper-bound estimation and check will always pass.

Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>

* [IE][nGraph]: Fixes normalize_axis symbol exporting

Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>
2020-10-30 09:12:11 +03:00
Bartosz Lesniewski
b25d4ab065 Remove operators with existing functional tests from layer creator (#2772)
* Remove 49 operators from layer creator

* Remove debug code

* Add specificCreator for deconvolution

* add specificCreator for logical not

* Fix concat creator behavior for negative axis

* add creator for TopK, overrides for visit_attribute methods

* remove layerCreator templates for removed ops

* Disable exception check for Deconvolution and TopK

* add specificCreator for stridedSlice

* add specificCreator for DetecionOutput

* resolve conflict with batchNormInference changes

* fix detection output visit_attributes for some of the bools

* Remove Ceiling from LayerCreator

* Change detectionOutput param validation to expect bool instead of uint

* detectionOutput specificCreator to set bool params as int strings

* Add vector of integer value accessor handling to xml deserializer.

* Fix indentation
2020-10-30 07:42:27 +03:00
Mateusz Tabaka
7b45975af8 Remove obsoleted v0::ReplaceSlice (#2887) 2020-10-30 07:37:15 +03:00
Mateusz Tabaka
d6a9ef3a8f Remove obsoleted v0::Not operator (#2846)
* Remove obsoleted v0::Not operator

* restore tests from ngraph/test/backend
2020-10-30 07:33:26 +03:00
Jozef Daniecki
34af04e1a8 Serialization of experimental and custom ops (#2862)
* Add IEGeneric node type handling.

* Remove dependency on plugin_api library.

IEGeneric type name is passed via Visiotr API as new syntetic atribute.

* Add custom operations support

* Fix charachter literals comparison.

* Pass custom opsets to CNNNetwork:serialize().

IE extensions are stored in ngraph CNNNetwork and later used to pass
custom opsets to serialization transformation.

* Refactor custom ops tests to use template_extension library.

* Add comment on __generic_ie_type__ purpose.
2020-10-30 07:31:27 +03:00
Gleb Kazantaev
251429511d Fixed convertFunctionToCNNNetwork to support non unique names (#2864)
* Unique names normalization during nGraph to CNNNetwork conversion

* Added tests

* Code refactoring
2020-10-30 07:24:37 +03:00
Vitaliy Urusovskij
0ef1fb8a09 Update MemCheckTests OMZ part: get_testdata.py and configs (#2722) 2020-10-30 00:37:02 +03:00
Nikolay Shchegolev
50408defba [CPU] Enable GatherND tests in ONNX. (#2904) 2020-10-29 22:53:26 +03:00
Vladimir Paramuzov
6cb71d61b4 [IE CLDNN] Added 6d crop support (#2841) 2020-10-29 21:41:05 +03:00
Anastasia Kuporosova
266f143cb2 [Python API] Remove IENetLayer class (#2755)
* [Python API] Remove IENetLayer class

* fix tests

* fix tests

* remove importing ngraph from several tests
2020-10-29 21:34:55 +03:00
Nikolay Shchegolev
257bfc9944 [CPU] GatherND implementation. (#2757) 2020-10-29 19:28:31 +03:00
Vladimir Paramuzov
6fec63862b [IE CLDNN] Disabled fusing into eltwise node for fsv32 layout (#2844) 2020-10-29 16:01:53 +03:00
Dominik Wernberger
b92073f623 Fix visual appearance (#2148) 2020-10-29 15:27:33 +03:00
Maxim Vafin
3019a34dc8 Improve support ONNX Resize-10 created by PyTorch (#1350) 2020-10-29 15:26:23 +03:00
Aleksandr Korolev
04b7822761 [IE][VPU][TESTS] Fix vpu split with unusable outputs & test (#2718)
* Fix vpu split with unusable outputs & test

Co-authored-by: kora6 <kora6@github.com>
2020-10-29 15:12:10 +03:00
Andrew Bakalin
4043413529 [IE][VPU][DTS][Tests]: Remove WAs for networks with multiple outputs (#2828)
* Remove WAs for networks with multiple outputs
2020-10-29 13:44:52 +03:00
Ilya Lavrenov
d14a7939a6 Removed forced CMAKE_VERBOSE_MAKEFILE (#2891) 2020-10-29 13:12:01 +03:00
Ilya Lavrenov
51f97c4a34 Fixed issue #41619 (#2827)
* Fixed issue #41619

* More descriptive error message
2020-10-29 12:50:46 +03:00
Ilya Lavrenov
f1cf207663 Split java CMakeLists.txt into several ones (#2734)
* Split java CMakeLists.txt into several ones

* Replaced openjdk to OpenJDK

* Build Java library before tests
2020-10-29 12:48:03 +03:00
Ilya Lavrenov
ce037da591 Updated apiValidator rules (#2785)
* Updated apiValidator rules: added custom filter to emulate BinaryExclusions.xml

* temp

* Temp

* debug log

* Print a message about success

* Fixed file name
2020-10-29 12:38:15 +03:00
Konstantin Satunin
5493dfe5c8 Fix for collision of #1932 and #2731 (#2890) 2020-10-29 12:37:55 +03:00
Piotr Szmelczynski
0c373ba79b Revise ReLU (#2863)
* remove relu_backprop

* Update ReLU spec

* change inputs and outputs subsections of ReLU spec

* Update Mathematical Formulation subsection

* Update Category of ReLU in spec

* Update Short description of ReLU in spec
2020-10-29 11:37:52 +03:00
Maxim Andronov
fdbfab8546 [CPU] Add tests for SetBlob + I64 (#2402) 2020-10-29 11:34:29 +03:00
Mateusz Tabaka
1144eefe4d Remove obsoleted Min, Max operators (#2832) 2020-10-29 11:32:50 +03:00
Ilya Lavrenov
901f1e0436 Removed InferenceEngine dependency on Legacy library (#1932)
* Split libraries

* Small fixes

* Fixes after self-review

* Minimized legacy usage

* Fixed IE_CPU.onnx_prior_box

* Fixed linkage

* Temp WA for private plugins

* removed comments

* Reverted OneHot changes back
2020-10-29 10:54:57 +03:00
Mateusz Bencer
53b865eb58 ONNX Loop (#2847)
* Loop op ngraph implementation, update IE IR Reader and ngraph to cnn converter

* refactoring SubGraphOp class

* type prop unit tests

* ngraph code style

* update comment

* single layer tests for Loop operation

* fix file name

* Add SpecialBodyPorts attribute in Loop op, update single layer tests

* first debug version

* more tests

* missing test file

* removed not needed shapes from test data

* move test data to new folder

* shape infer tests

* Added execution tests

* add several new tests cases, strict checks in Loop impl, temporary disable single layer tests

* ngraph codestyle, refactoring, clone_new_args test

* resolve review remarks

* fix build

* fix tests

* more execution tests

* add a new constructor of Loop op, resolve review remarks

* execution tests

* synchro with current version

* handle scalars and more tests

* scalar test enabled

* loop reference impl

* bug fixes in tests, onnx importer part and in the ref implementation of the Loop op

* applied remarks

* handle unsupported cases

* rewrite unit tests

* update INTERPRETER manifest

* is_termination_condition_always_true simplification

* [TEST] update python models tests

* review remarks

* added xfail to tiny_yolov3

* missing model test

* revert test data

* fixed numbers of failing tests

* fixed failed test description

* fix test message

* fix xfail test

* zoo models tests clean-up

* missing comma

Co-authored-by: Ivan Tikhonov <ivan.tikhonov@intel.com>
2020-10-29 09:51:51 +03:00
Jedrzej Hajduczenia
c95d8e242d [IE CLDNN] Fix accuracy bug in fsv16 imad conv + other minor fixes (#2876) 2020-10-29 09:33:05 +03:00
Gorokhov Dmitriy
4d84d7ed1c [Transformations] Hswish fusion to be called before Hsigmoid fusion (#2845) 2020-10-29 09:07:51 +03:00
Zoran Zomborat
4021e144b5 [IE] Add RTTI macro to ReshapeFullyConnectedFusion ngrap pass (#2837) 2020-10-29 07:33:55 +03:00
Ilya Churaev
15c10e74fe Added information about unsupported subgraphs for set affinity (#2872) 2020-10-29 06:22:25 +03:00
Vitaliy Urusovskij
e1f4585cb8 Add validate_test_case fixture with using of jsonschema. Specify all required fields for test cases (#2821) 2020-10-29 00:11:01 +03:00
Evgenya Stepyreva
347e1206d5 setBatchSize: getting rid of ConstantFolding (#2842)
* setBatchSize: getting rid of setBatchSize

* Trigger CI

* Feedback adressed

* Trigger CI

* f -> specialized_function
2020-10-28 22:49:12 +03:00
Artyom Anokhov
5fa569cbd5 setupvars.bat: Renamed all Python version related variables. (#2854) 2020-10-28 21:02:25 +03:00
Evgenya Stepyreva
13a9ba6a2b [ SSR ] Transpose->MatMul (#2525)
* [ SSR ] Reshape->Softmax->Reshape

* Call DepthToSpaceFusion during SmartReshape

* rtti

* remove softmax wa
2020-10-28 20:06:42 +03:00
Bartosz Sochacki
9b4f499930 Extended test infrastructure to call per plugin configure function before running a test. The function allows to pass plugin specific configuration (#2731) 2020-10-28 14:57:46 +03:00
Vladislav Vinogradov
50645befb7 [IE][CMAKE] Fix build issues with custom configuration (#2851)
* FASTER build enabled
* MYRIAD plugin disabled
2020-10-28 12:20:26 +03:00
Jan Iwaszkiewicz
11801eadb3 [nGraph] Add opset5 ops to Python nGraph (#2833) 2020-10-28 10:18:14 +01:00
Irina Efode
1689634574 [IE TESTS][IE MKLDNN] Disable CtcLoss SLT due to sporadic failures (#2852) 2020-10-28 12:00:11 +03:00
Gladilov, Gleb
18f7e4f4f0 [IE][VPU]: Improves myriad plugin API (#2816)
LoadNetwork takes network argument by constant reference.
Myriad plugin implementation applies transformations to
given network in order to get compiled model.
Transformations take network argument by non-constant
reference, so at some point of time network copy must be
acquired. ICNNNetwork is neither copyable nor movable, so
the only way to get network copy is using special utility
returning std::shared_ptr.

Myriad plugin does not expose any ownership strategy,
so prefers to take network argument by simple reference.
Plugin also requires nGraph -> CNN conversion during
LoadNetwork implementation. Conversion utilities returns
std::shared_ptr, which makes plugin to use workaround for
lifetime of converted object (to have 2 "pointers" to
network: raw pointer to input network and smart pointer to
converted network). Such workarounds make code more
error-prone, because using wrong pointer to semantically
the same object may lead to unexpected results.

To overcome these issues API has been changed in a way to
make interfaces more clear (do not expose ownership strategy
or mutability) and get rid of unnecessary workarounds.

Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>
2020-10-28 11:14:14 +03:00
Gleb Kazantaev
91afa14901 Add dynamic shape checks for legacy transformations (#2783)
* Added dynamic shape checks for ConvertInterpolate pass

* Added dynamic checks for ConvertLRNToLegacy pass

* Added dynamic checks for ConvertMatMul* pass

* Added dynamic checks for ConvertPadToLegacy pass

* Updated TileIE; added dynamic checks to ConvertTileToLegacy pass

* Added dynamic checks to FCBiasFusion pass

* Added dynamic checks to Reshape1DOps pass

* Added dynamic checks to ReshapeFCFusion pass

* Added dynamic checks to ReshapeFC pass

* Updaed Reshape1DConvolution pattern
2020-10-28 10:36:16 +03:00
Vladimir Paramuzov
c7661078d9 [IE CLDNN] Removed unused DO gpu impl (#2809) 2020-10-28 09:24:22 +03:00
Gorokhov Dmitriy
abb8817cf6 [CPU] Generic JIT Eltwise implementation (#1464) 2020-10-28 09:16:28 +03:00
Mateusz Tabaka
e3ed796b2e Remove obsoleted v0::OneHot operator (#2855) 2020-10-28 07:16:31 +03:00
Mateusz Tabaka
186e00fa2a Remove obsoleted v0::Product op (#2860) 2020-10-28 07:12:52 +03:00
Mateusz Tabaka
2e7a17b367 fix path to code snippets in Custom_ONNX_Ops.md (#2764) 2020-10-28 06:20:52 +03:00
Maksim Doronin
07fbf93a0d [IE][VPU]: Implement HSwish layer with tests (#2775)
* Implement HSwish layer with tests
* Disable HSwish decomposition by a predicate
* Update vpu firmware
2020-10-28 00:38:10 +03:00
Evgeny Lazarev
cabf8d8534 ONNX Loop operation support (#2756)
* Generate TensorIterator without back edges from TensorFlow models

* Added a check in the MarkSubgraphsWithCorrectLayout to not fail when port is not connected

* Updated the 'protobuf2nx' to consume the graph protobuf message

* Cleanup TI from the IRv7 specific code

* Do not run some front transformations recursively

* Draft support for the ONNX Loop operation when 'cond' = True

* LoopToTI transformation changes

* Added draft of Loop operation and parser for ONNX Loop operation body

* Updated Loop body parser + added shape and type infer for the Loop operation

* Fixes for ONNX Loop operation parser

* Moved Loop parsing to Loop op extractor. Added generation of external edges for the Loop body ops

* Added support for ThresholdedRelu using decomposition

* Added support for Min ONNX operation

* Draft fixes for port_map generation for the Loop

* Rename transformation file and fix BOM

* Fixed shape inference for Loop scan outputs (axis is not None)

* Fixed shape inference for ONNX Loop operation

* Refactor checks in the TensorIteratorMerge transformation

* Code refactoring. Enabled commented transformations

* Documentation update for ONNX Loop, ThresholdedRelu and Min

* Fixed typo in the Loop front transformation where execution condition input is connected. Other refactorings

* Fixed in the Loop extractor

* Added printing 'internal_layer_id' attribute in the graph dumper

* Updated calculation of iterations number for the Loop

* Added missing code

* Fixed output port shapes and types generation for Loop operation

* Update function names and variable names in the Loop operation

* Fixed type inference for iteration count input

* Added removal of input/output ports of the Loop if they are not used

* Fixed renumbering Loop operations input/output ports to keep mandatory

* Fixed ThresholdedReluDecomposition transformation

* Updated MO IR Reader to know about Loop operation. But it is still not supported by the MO IR Reader

* Added unit test for Slice op shape infer (reverse the sequence of elements)

* Reverted changes in the ONNX loader function call to protobuf2nx

* Enable Reshape0DToSqueeze transformation recursively

* Refactored Loop operation support implementation

* Changed ThresholdedReluDecomposition to generate Const with shape [1] instead of scalar

* Code style and wording fixes

* Restored accidentally removed 'return' statement in the TI shape infer function

* Fixed comments

* Fixed comment

Co-authored-by: Evgeny Lazarev <elazarev.nnov@gmail.com>
2020-10-27 23:04:43 +03:00
Michał Karzyński
f6842863c7 Enable Logical Reduction tests which currently pass (#2776) 2020-10-27 14:26:15 +01:00
Andrey Babushkin
1a4340fabb Bump infra 2020-10-27 15:12:33 +03:00
Jan Iwaszkiewicz
8b6f61e688 [ONNX] Extend ONNX importer with Round-5 (#2749) 2020-10-27 11:01:23 +01:00
Andrey Kamaev
a6520995fe MSVC warnings fix (#2620)
* Fix MSVC build warnings in Ngraph

* Fix MSVC build warnings in transformations library

* Fix MSVC build warnings in core,legacy,preprocessing

* Fix MSVC build warnings in XLink

* Fix MSVC build warnings in Myriad plugin
2020-10-27 12:24:57 +03:00
Gleb Kazantaev
d36bd8c87b Avoid excess tensor copy for Reshape/Squeeze/Unsqueeze folding (#2834)
* Updated Reshape ConstantFolding to avoid excess tensor copies

* Updated Squeeze/Unsqueeze CF to avoid excess tensor copies

* Fixed typo
2020-10-27 12:05:02 +03:00
Monica-elena Burger
314ec2df72 [IE][VPU]: Config key to disable weights analysis pass (#2714)
* Add config key to disable weights analysis pass in graph transformer
2020-10-27 11:52:18 +03:00
Polina Brzezinskaya
0040d47b00 [IE][VPU]: Bidirectional mode for broadcast on vpu (#2627)
* Support for bidirectional broadcast mode
2020-10-27 11:49:35 +03:00
Roman Lyamin
77365bcb4c [IE CLDNN] Added Round-5 operation (#2838) 2020-10-27 10:56:15 +03:00
Mikhail Ryzhov
dc52ec7880 [Samples] Python: added support of onnx models (#2782)
* [Samples] Python: added support of onnx models

* [Docs] Python: added support of onnx models

Updated documentation
2020-10-27 10:23:25 +03:00
Mateusz Tabaka
73c40722fd Remove obsoleted v0::Gather and v0::GatherND (#2826) 2020-10-27 10:07:48 +03:00
Jozef Daniecki
c6fc247f99 Add nGraph function serialization. (#2579)
* Add nGraph function serialization.

* Turn of execption throwing on failed visitation.

* CNNNetworkNgrapImpl serialize also support fallback to v7 serialization.

* Add error message for legacy IR not implemented case.

* Store tests models in files.

* Add tests with multiple layers.

* Style aligned to IE rules.

* Add visit_attributes to ExecutionNode.

* Layer version XML atribute implementation.

* Fix opset atribute creation for ExecutionGraph. Refactoring.

* Add missing header.

* Move opset collecting to private scope.

* Add missing header.

* Add test wit multiple oututs. Fix found issues: constant name, result
outputs.

* Move serialization to transformation library.

* Add versioning to serialization transformation.

* Add functional tests with ONNX importer path.

* Add nodes unique name checking and correction.

* Add checks for unsuported cases: dynamic shapes & GenericIE node

* General refactoring.

* Add comment describing type name translations.

* Add serialization deterministicity tests.

It's needed to ensure that subsequent calls to serialize() on the same function are giving the same results.

* Serialization in CNNNetworkNGraphImpl::serialize executed via pass::Manager.

Co-authored-by: Gleb Kazantaev <gleb.nnstu@gmail.com>

* NGRAPH_CHECK messages refactored.

* Performance and const correctness refactoring.

* Style formatting applied.

* Code simplifaction.

* Serialize transformation documentation refactoring.

* Changed compare_function() to throw on functions with multiple outputs.

Before this check was implemented with assert which means it was working
only in debug builds. Now it is working also in release build.

* Adjust tests to new compare_functions() behaviour.

* Replace cmakes add_definitions with more modern target_compile_definitions

Co-authored-by: Gleb Kazantaev <gleb.nnstu@gmail.com>
2020-10-27 06:57:48 +03:00
Andrey Zaytsev
940eb43095 Feature/azaytsev/merge to master (#2786)
* [IE CLDNN] Memory allocation optimizations (#2178)

* [GNA] Safety fixes (#2193)

* LSTMCell test [GNA] LSTMCell fix for GNA (#2216)

* [GNA] fix scale factor calculation for unfused bias after fc (2021.1) (#2195)

* [GNA] fix scale factor calculation for unfused bias after fc

* change check

* add test

* apply requested changes

* cpplint fix

* apply test changes

* modify model for test to match ::op::

* [LPT] Copy constant with several outputs before blob update (#2197)

* [LPT] Copy constant implementation

* [LPT] the same Constant ops as FQ interval boundaries

* [Scripts] Fixing issue with exporting path-like env when it undef  (#2164)

* setupvars.sh: Added logic for exporting path env in case if it not defined

* setupvars: Removed duplicated colon

* Kept quotes where they were

* setupvars: updated copyrights

* FakeQuantize + Mul fusion (#2133)

* FQ+Mul fusion transform skeleton

* FQ+Mul fusion transform tests prep

* Basic UT for the transform

* Basic implementation of the transform

* Parametrized UTs for FQMul transform

* Parametrization of FQ+Mul UTs

* Make sure that the shapes of constants match

* Check if the mul constant matches FQ data

* CentOs compilation error fix

* PR feedback and adjusted tests

* NHWC layout of the mul constant

* UT: FQ output limits 4D

* Redundant CF pass removed

* Rewrite the graph in a different way

* Shape checking infrastructure skeleton

* Handle some negative cases

* Check the rt info in the fusion test

* Fuse all Mul nodes detected after FQ node

* Dont cast the original FQ node

* Dont throw if CF fails in new output range calculation

* More UTs

* Accept any type of input to FQ in the transformation

* Test the fusion when all FQ inputs are non-const

* Fusion test when only one output limit is const

* Extend error message (#2174)

* some nGraph KW fixes (#2176)

* Removed redundant methods

* Fixed KW for linux

* Fix QueryNetwork for networks with KSO (#2202)

* Added a test to reproduce QueryNetwork with KSO

* Fixed QueryNetwork for networks with KSO

* Added additional test

* Fixed output names for case with redundant ops before result (#2209)

* [IE][VPU]: Workaround to support parameter Beta for layer Swish (#2207)

* Workaround to full support Swish layer. It is faster than native Swish for now.

* [IE][VPU]: Remove the second call of ngraph::CommonOptimizations (#2221)

* Remove the second call of ngraph::CommonOptimizations in myriad plugin
* Reuse code with vpu ngraph transformations

* Duplicate PR 2167 for release branch: GatherTree description was extended and outdated link fixed (#2235)

* add more alrifications to description

* move clarification to comment

* pseudo code become more accurate

* review changes

* Add exposing function signatures via Cython (#2244)

* [DOC] Reshape feature (#2194)

* [IE][VPU][OpenCL] 2021.1 release compiler (#2189)

* Statically analyzed issues. (#2261)

* [IE][VPU]: Fix K propagation through Reshape (2021.1) (#2180)

* Fix K propagation through Reshape
* Add test cases

* Revert "[IE TESTS] dynavic batch for mvn layer (#1010)" (#2256)

This reverts commit 2e3378c50f.

* Fixed KW warning and review issues (#2262)

* [IE][VPU]: update firmware 1381 (#2236)

* Reverting devicePriorities to be vector and respect the order, as opposed to the incorrect (recent?) refactoring that introduced the unordered_map that effectively ignores the priorities (#2251)

* update OpenCV version to 4.5.0 (#2260)

* Add VPUX configuration to compile_tool (#2248)

* [IE][TESTS] Fix compareRawBuffers and compareBlobData methods (#2246)

Use `<=` comparison instead of `<` with thresholds.
This allows to use `0` threshold for bit-exact comparison.

* [IE][VPU]: KW fixes (#2186)

* Some KW fixes
* Fix printTo in vpu ngraph transformations

* Fix for static PartialShape detection algorithm (#2177)

* Fixes for Interpolate-4. (#2281)

* Update get_ov_update_message.py (#2286)

* Clone a specific tag for pybind11 (#2296)

* [Scripts] Fix setting PYTHONPATH logic (#2305)

* setupvars.sh: Added logic for exporting path env in case if it not defined

* setupvars: Removed duplicated colon

* install_openvino_dependencies: Updated copyrights

setupvars.bat: Updated notification about incorrect Python version. Removed checking ICC2019
setupvars.sh: Removed logic with choosing higher version of installed Python. Added dynamic detecting python3 major and minor version for setting path. Add checking minimum required Python version(now 3.6)

* Added python3-gi package and fixed libglib2.0-0 package location. (#2294)

* [IE TESTS] CoreThreading_LoadNetwork tests were disabled for GPU plugin (#2245) (#2283)

* setupvars: Updated notifications, fixed calling python in Windows case (#2318)

* Updated operations specification documents (2021.1) (#2268)

* Updated documentation structure and remove incorrect added files for Acosh-1, Asinh-1 and Atanh-1

* Fixed broken links

* Fixed c samples build (#2278) (#2304)

* Fixed c samples build

fixed CVS-38816 - Failure to build samples in C

* Fixed issue with gflags

* Revert "[IE][VPU]: Fix K propagation through Reshape (2021.1) (#2180)" (#2322)

This reverts commit d604a03ac0.

* Added ONNX Resize-11 and ONNX Resize-13 to supported frameworks layers list. (#2325)

* Implement `run_executable.py` to run `TimeTests` several times (#2125) (#2188)

CI passed

* install_NEO_OCL_driver: Updated exit codes, messages. Updated way to remove old driver on Ubuntu (#2333)

* Bump cmake version to 3.13 (#2339)

* install_NEO_OCL_driver: Added checking of installed packages before trying to remove them. Added quotes for echo. (#2350)

* convert to doxygen comments

* add doxygen doc build configurations (#2191)

Co-authored-by: Nikolay Tyukaev <ntyukaev_lo@jenkins.inn.intel.com>

* [DOCS] Added an evaluate method for custom operation (#2272)

* Added an evaluate method for custom operation

* Fixed comments

* Downgrade cmake for samples (#2372)

* Downgrade cmake for samples

Downgraded cmake version to default version for Ubuntu 18.04

* Updated supported python version

The minimal python version in 2021.1 is 3.5

* Added notes about cmake requirements for samples and demo

* Install dependency refactoring. (#2381)

* Updated Transformation development doc (#2370)

* Delete xfail for resolved known issue (#2385)

* Fix layout links for dl streamer and c api (#2375)

* fix layouts

* change the dl-streamer link

Co-authored-by: Nikolay Tyukaev <ntyukaev_lo@jenkins.inn.intel.com>

* Added link options for cross-compilation (#2397)

* Added new GSG for macOS, made minor changes in Windows GSG (#2070) (#2405)

* Added new GSG for macOS, made minor changes in Windows GSG

* Update get_started_macos.md

Co-authored-by: Anastasiya Ageeva <anastasiya.ageeva@intel.com>

* Fixed docs build on Windows (#2383)

* layouts and code comments

* Replace absolute links to docs.openvinotoolkit.org by relative ones (#2439)

* Replaced direct links to docs.openvinotoolkit.org with relative links

* Replaced direct links to docs.openvinotoolkit.org with relative links. Added GSGs for Win and macOS

* Minor fixes in GSGs

* Replaced direct links to docs.openvinotoolkit.org with relative links

* Removed links to OpenVINO markdown files that contain anchor - they don't work in the current implementation of the doc process

* Fixed Notes

* Removed links to OpenVINO markdown files that contain anchor - they don't work in the current implementation of the doc process

* fixed link to installing-openvino-linux.md

* Update the menu to align with POT doc headers (#2433)

* Update the menu to align with POT doc headers

It changes the menu to align with Post-training Optimization Toolkit documentation titles.

* Corrected one title

Run Examples => How to Run Examples

* Added closing braсket (#2466)

Fixed syntax error (b4b03b1)

* Remove the deprecation notice (#2314)

* Removed deprecation notice

* Removed the note from other files

* [DOCS] Update Installation Guide - GPU steps (#2308)

* Initial commit

* fixing lists

* Update installing-openvino-linux.md

* Get rid of the note

* Added the scrrenshot

* Update installing-openvino-linux.md

* fixes

* separate layout

* [Docs] Update MO What's new description (#2481)

* Azure CI: Add separated pipelines for Windows, Linux, Mac

* Feature/azaytsev/benchmarks 2021 1 (#2501)

* Initial changes for 2021.1

* Inserted Graphtool scripts, updated configurations info

* Updated FAQ and minor changes to performance_benchmarks.md

* Updated for 2021.1

* Updated

* incorporated review comments

* incorporated review comments for FAQ

* fixed link

* Update build-instruction.md for MacOsX (#2457)

* Update build-instruction.md for MacOsX

* Removed call of install_dependencies.sh from the steps

* Changed layouts

* Feature/azaytsev/cvs-38240 (#2469)

* Updated for 2020 version, replaced Ubuntu 16.04 with Ubuntu 20.04

* Updated the release package numbers

* Removed FPGA from the documentation

* Updated according to the comments in the ticket CVS-37827 (#2448)

* Updated according to CVS-38225

* some changes

* Update docs for speech libs and demos (#2518)

* Made changes to benchmarks according to review comments

* Remove `--collect_results_only` (#2523)

* Remove `--collect_results_only` from MemCheckTests

* Remove CLI keys from README

* Added logo info to the Legal_Information, updated Ubuntu, CentOS supported versions

* Updated supported Intel® Core™ processors list

* Fixed table formatting

* [Jenkinsfile] Bump infra (#2546)

* [GNA] Documentation updates for 2021.1 (#2460)

* [GNA] Documentation updates for 2021.1

* Take Mike's comments into account

* More fixes according to review

* Fix processor generation names

* update api layouts

* Added new index page with overview

* Changed CMake and Python versions

* Fixed links

* some layout changes

* some layout changes

* nGraph Python API tutorial (#2500)

* nGraph Python API tutorial

* Tweaks

* Code review comments

* Code review comments

* some layout changes

* COnverted svg images to png

* layouts

* update layout

* Added a label for nGraph_Python_API.md

* fixed links

* Fixed image

* First draft of nGraph documentation (#2271)

* First draft of nGraph documentation

* updated according to review comments

* Updated

* Reviewed the nGraph Transformation section, added missing images

* Update nGraph_dg.md

* Delete python_api.md

Removed since there is already the nGraph_Python_API.md document with a comprehensive overview.

Co-authored-by: Andrey Zaytsev <andrey.zaytsev@intel.com>
Co-authored-by: CCR\avladimi <anastasiya.ageeva@intel.com>

* Feature/azaytsev/docs 2021 1 (#2560)

* Removed FPGA from the documentation

* Updated according to CVS-38225

* Added logo info to the Legal_Information, updated Ubuntu, CentOS supported versions

* Updated supported Intel® Core™ processors list

* Added new index page with overview

* Changed CMake and Python versions

* Fixed links

* COnverted svg images to png

* Added a label for nGraph_Python_API.md

* fixed links

* Fixed image

* Update SW requirements in build instructions and change latest release to 2021.1 (#2565)

* removed links to ../IE_DG/Introduction.md

* Removed links to tools overview page as removed

* some changes

* Remove link to Integrate_your_kernels_into_IE.md

* remove openvino_docs_IE_DG_Graph_debug_capabilities from layout as it was removed

* Fixed links to images (#2569)

* update layouts

* Added deprecation note for PassConfig class (#2593)

* Post-release fixes and installation path changes

* Added pip install documentation (#2465)

* Added pip install documentation

* Change references

* tiny fixes of links

* Update installing-openvino-pip.md

Co-authored-by: Alina Alborova <alina.alborova@intel.com>

* Update OpenVino ONNX CI check (#2599)

* Update OpenVino ONNX CI

* Change parallel execution to single

* Enlarge timeout

* Remove timeout

* Add timeout to test execution

* Added PIP installation and Build from Source to the layout

* Fixed formatting issue, removed broken link

* Renamed section EXAMPLES to RESOURCES according to review comments

* add mo faq navigation by url param

* Skip hanging test case of OpenVino ONNX CI (#2608)

* Update OpenVino ONNX CI

* Change parallel execution to single

* Enlarge timeout

* Remove timeout

* Add timeout to test execution

* Skip hanging test

* Add description to skip issue

* Removed DLDT description

* Replaced wrong links

* MInor fix for path to the cpp samples

* fixes

* Update ops.py

* Fix style

* Improve pip installation guide (#2644)

* Improve pip installation guide

* Updated after comments

* Feature/ntyukaev/separate layout (#2629)

* convert to doxygen comments

* layouts and code comments

* separate layout

* Changed layouts

* Removed FPGA from the documentation

* Updated according to CVS-38225

* some changes

* Made changes to benchmarks according to review comments

* Added logo info to the Legal_Information, updated Ubuntu, CentOS supported versions

* Updated supported Intel® Core™ processors list

* Fixed table formatting

* update api layouts

* Added new index page with overview

* Changed CMake and Python versions

* Fixed links

* some layout changes

* some layout changes

* some layout changes

* COnverted svg images to png

* layouts

* update layout

* Added a label for nGraph_Python_API.md

* fixed links

* Fixed image

* removed links to ../IE_DG/Introduction.md

* Removed links to tools overview page as removed

* some changes

* Remove link to Integrate_your_kernels_into_IE.md

* remove openvino_docs_IE_DG_Graph_debug_capabilities from layout as it was removed

* update layouts

* Post-release fixes and installation path changes

* Added PIP installation and Build from Source to the layout

* Fixed formatting issue, removed broken link

* Renamed section EXAMPLES to RESOURCES according to review comments

* add mo faq navigation by url param

* Removed DLDT description

* Replaced wrong links

* MInor fix for path to the cpp samples

* fixes

* Update ops.py

* Fix style

Co-authored-by: Nikolay Tyukaev <ntyukaev_lo@jenkins.inn.intel.com>
Co-authored-by: Tyukaev <nikolay.tyukaev@intel.com>
Co-authored-by: aalborov <alina.alborova@intel.com>
Co-authored-by: Rafal Blaczkowski <rafal.blaczkowski@intel.com>
Co-authored-by: Alexander Zhogov <alexander.zhogov@intel.com>

* Fixed CVS-35316 (#2072) (#2670)

Co-authored-by: Anastasiya Ageeva <anastasiya.ageeva@intel.com>

* [install_dependencies.sh] install latest cmake if current version is lower 3.13 (#2695) (#2701)

* [install_dependencies.sh] install latest cmake if current version is lower 3.13

* add shellcheck for Ubuntu

* install python 2.7 for Ubuntu

* Removed redundant file

* Exclude files that we didn't changed from merging

Co-authored-by: Sergey Shlyapnikov <sergey.shlyapnikov@intel.com>
Co-authored-by: Denis Orlov <denis.orlov@intel.com>
Co-authored-by: Kamil Magierski <kamil.magierski@intel.com>
Co-authored-by: Anna Alberska <anna.alberska@intel.com>
Co-authored-by: Edward Shogulin <edward.shogulin@intel.com>
Co-authored-by: Artyom Anokhov <artyom.anokhov@intel.com>
Co-authored-by: Tomasz Dołbniak <tomasz.dolbniak@intel.com>
Co-authored-by: Ilya Churaev <ilya.churaev@intel.com>
Co-authored-by: Roman Vyunov (Intel) <roman.vyunov@intel.com>
Co-authored-by: Maksim Doronin <maksim.doronin@intel.com>
Co-authored-by: Svetlana Dolinina <svetlana.a.dolinina@intel.com>
Co-authored-by: Evgeny Talanin <evgeny.talanin@intel.com>
Co-authored-by: Evgenya Stepyreva <evgenya.stepyreva@intel.com>
Co-authored-by: Maxim Kurin <maxim.kurin@intel.com>
Co-authored-by: Nikolay Shchegolev <nikolay.shchegolev@intel.com>
Co-authored-by: Andrew Bakalin <andrew.bakalin@intel.com>
Co-authored-by: Gorokhov Dmitriy <dmitry.gorokhov@intel.com>
Co-authored-by: Evgeny Latkin <evgeny.latkin@intel.com>
Co-authored-by: Maxim Shevtsov <maxim.y.shevtsov@intel.com>
Co-authored-by: Alexey Suhov <alexey.suhov@intel.com>
Co-authored-by: Alexander Novak <sasha-novak@yandex.ru>
Co-authored-by: Vladislav Vinogradov <vlad.vinogradov@intel.com>
Co-authored-by: Vladislav Volkov <vladislav.volkov@intel.com>
Co-authored-by: Vladimir Gavrilov <vladimir.gavrilov@intel.com>
Co-authored-by: Zoe Cayetano <zoe.cayetano@intel.com>
Co-authored-by: Dmitrii Denisov <dmitrii.denisov@intel.com>
Co-authored-by: Irina Efode <irina.efode@intel.com>
Co-authored-by: Evgeny Lazarev <evgeny.lazarev@intel.com>
Co-authored-by: Mikhail Ryzhov <mikhail.ryzhov@intel.com>
Co-authored-by: Vitaliy Urusovskij <vitaliy.urusovskij@intel.com>
Co-authored-by: Nikolay Tyukaev <ntyukaev_lo@jenkins.inn.intel.com>
Co-authored-by: Nikolay Tyukaev <nikolay.tyukaev@intel.com>
Co-authored-by: Gleb Kazantaev <gleb.kazantaev@intel.com>
Co-authored-by: Rafal Blaczkowski <rafal.blaczkowski@intel.com>
Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
Co-authored-by: Anastasiya Ageeva <anastasiya.ageeva@intel.com>
Co-authored-by: Maksim Proshin <mvproshin@gmail.com>
Co-authored-by: Alina Alborova <alina.alborova@intel.com>
Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
Co-authored-by: azhogov <alexander.zhogov@intel.com>
Co-authored-by: Alina Kladieva <alina.kladieva@intel.com>
Co-authored-by: Michał Karzyński <4430709+postrational@users.noreply.github.com>
Co-authored-by: Anton Romanov <anton.romanov@intel.com>
2020-10-27 00:41:46 +03:00
Alexander Peskov
6e5a4714ac Make MVN behaviour deterministic (#2458)
* Change default parallel reduce alg into deternimistic way

Signed-off-by: Alexander Peskov <alexander.peskov@intel.com>

* Introduce ie::parallel_for semantic with group_id parameter

Signed-off-by: Alexander Peskov <alexander.peskov@intel.com>

* [CPU] Make MVN behaviour deterministic

Signed-off-by: Alexander Peskov <alexander.peskov@intel.com>
2020-10-26 21:01:38 +03:00
Evgenya Stepyreva
40a4ae3cfa [SSR] Transformation mimicking oldSetBatchSize logic (#2597)
* [SSR] Transformation mimicking oldSetBatchSize logic

* Self-review

* gkazanta comments adressed

* support for opset1::Proposal and  opset4::Proposal. Use of pattern predicates

* Constant Folding during setBatchSize

* StridedSlice->Squeeze resolver

* SR tests added

* Squeeze->StridedSlice

* Comments

* getting rid of folding

* comment

* sq->ss transformation

* Revert "sq->ss transformation"

This reverts commit 9731b1cf52.

* Revert "comment"

This reverts commit a57b4f863e.

* Revert "getting rid of folding"

This reverts commit 85405dab0a.
2020-10-26 20:51:59 +03:00
Jedrzej Hajduczenia
8884791362 [IE CLDNN] Improve LO rules for expected FQ format (#2790) 2020-10-26 20:36:00 +03:00
Ivan Tikhonov
735c8747b5 Loop operation: IE IR Reader update (#2766)
* ie_ir_reader update, Loop implementation update

* fix ie ir reader
2020-10-26 19:30:14 +03:00
Alexandra Sidorova
de686fce39 [CPU] Added operation HSigmoid-5 (#2005) 2020-10-26 18:42:30 +03:00
Edward Shogulin
5007cba70a [LPT] bfloat enabling fix (#2819) 2020-10-26 16:02:11 +03:00
Mikhail Ryzhov
0267cbd286 Fixed ngraph sample logical errors (#2600)
* Fixed ngrapth sample logical errors

- added batch size, because sample accepts several images
- set label file as optional
2020-10-26 15:36:49 +03:00
Ilya Lavrenov
166ab89b95 Reorganize LPT: (#2803)
- inference_engine_lp_transformations keep ngraph LPT
- inference_engine_lp_transformations_legacy keep old CNNLayer based LPT
2020-10-26 14:10:17 +03:00
Patryk Elszkowski
5036b12544 enable reference implementation in CTCGreedyDecoder single layer test (#2680)
* enable reference implementation for CTCGreedyDecoder single layer tests

* update unit test to have blnak_index

* remove merge_repeated disable flag for CPU test because CPU impl always
merge

* add CTCGreedyDecoder single layer tests for CPU

* changes to match xPU implementations

* apply reviewers suggestions

Co-authored-by: Patryk Elszkowski <patryk.elszkowki@intel.com>
2020-10-26 13:34:50 +03:00
Aleksandr Korolev
d34dc7e206 [IE][VPU]: Add runtime precision info in MYRIAD plugin (#2535)
* Add runtime precision info in MYRIAD plugin
2020-10-26 11:32:43 +03:00
Evgeny Latkin
77ba9acada [IE][VPU][Myriad]: Mish layer optimization (#2648)
* Myriad: new firmware version 1426
2020-10-26 10:50:37 +03:00
Vladimir Paramuzov
c722f6a05a [IE CLDNN] Fixed fusing config for fsv16 eltw kernel (#2807) 2020-10-26 09:03:00 +03:00
Tomasz Dołbniak
6c341df85a ONNX models validation tweak and test (#2798)
* Test checking the current ONNX ir_version support

* Model stream rewinding in ONNX reader only

* Fix for CentOS
2020-10-26 06:35:20 +03:00
Mateusz Tabaka
4d2674962d Remove obsoleted v0::Broadcast and BroadcastLike operators (#2779)
* Remove obsoleted v0::Broadcast and BroadcastLike operators

* remove NGRAPH_DEPRECATED marks from autobroadcast functions

* restore NGRAPH_SUPPRESS_DEPRECATED_START in autobroadcast.cpp
2020-10-26 06:32:49 +03:00
Vladimir Paramuzov
980bbd172a [IE CLDNN] Enabled more functional tests and added several fixes into ops implementations (#2763) 2020-10-24 23:38:13 +03:00
iliya mironov
ce19e1fb9a Add hsigmoid fusing for MO (#2750)
* Add hsigmoid fusing for MO

* Update Bom file

* Remove comments

* Refactoring hsigmoid fusion according to review

* Add div and mul patterns for hsigmoid fusion

* Refactoring code according to review

* Fix HSigmoid fusion transformation
2020-10-24 12:51:15 +03:00
Jedrzej Hajduczenia
7bd8391aba [IE CLDNN] Fix narrowing conversion error on VS2017 (#2804) 2020-10-24 00:57:30 +03:00
Alexey Suhov
2087b39cb4 Add OpenCV for CentOS 8 and RHEL 8 to dependencies.cmake (#2806) 2020-10-23 23:58:33 +03:00
Mikhail Ryzhov
dea5f43c9a Added onnx support for C samples (#2747)
* ngraph python sample

This sample demonstrates how to execute an inference using ngraph::Function to create a network
- added sample
- added readme
- added lenet weights

* Added onnx support for C samples

* Revert "ngraph python sample"

This reverts commit 8033292dc3.

* Added onnx support for C samples

Fixed codestyle mistake

* Removed optional code

Co-authored-by: Alexander Zhogov <alexander.zhogov@intel.com>
2020-10-23 21:47:01 +03:00
Vladislav Vinogradov
d846969a1c [IE] Fix UNITY build (#2799) 2020-10-23 19:21:02 +03:00
Gleb Kazantaev
33371ca1ac Added dynamic check for convertFunctionToCNNNetwork functoin (#2797)
* Keep changes

* Added dynamic check for convertFunctionToCNNNetwork

* Fixed test
2020-10-23 18:17:26 +03:00
Tatiana Troilova
0802c40527 added third party programs files (#2751)
* added third party programs files

* changed third party programs files location
2020-10-23 18:03:01 +03:00
Anton Chetverikov
c020fd3e7e Remove ExtractImagePatchesToReorgYolo transformation (#2687)
Co-authored-by: Anton Chetverikov <anton.chetverikov@.intel.com>
Co-authored-by: Ilya Churaev <ilya.churaev@intel.com>
2020-10-23 17:32:54 +03:00
Andrew Bakalin
cab7a77cba [IE][VPU][GT][DTS]: Update MyriadPlugin to work with dynamic NMS-5 (#2698)
* [VPU][GT][NGraph] Get rid of DynamicNMS and transformation
* [VPU][NGraph] Update DTS for NMS
* [VPU][NGraph] Update StaticShapeNMS to be inherrited from NMS-5
* [VPU][GT] Update StaticShapeNMS stage to work with updated NGraph op
* [VPU][Tests] Update tests
* [VPU][GT] Fix StaticShapeNMS to be inherited from NonMaxSuppressionIE3
* [VPU][GT] Remove unused NonMaxSuppression
2020-10-23 17:04:36 +03:00
Gleb Kazantaev
c4e0b74fb1 Add dynamic shape checks to nGraph transformations (#2735)
* Added dynamic shape checks for BatchNormDecompositoin pass

* Added dynamic shapes checks for FQTranspose fusion pass

* Added patter::has_static_rank predicate

* Added dynamic shapes checks for BroadcastToTiles pass

* Fixed BN inputs order

* Add dynamic shape checks for DepthToSpace/SpaceToDepth passes

* Added dynamic check for ReduceToPooling pass

* Updated BN transformation

* Fix PR comments

* size_t to int64_t

* Updated reduce to pooling pattern
2020-10-23 15:39:47 +03:00
Alexey Ershov
8c97127aa7 [IE][VPU]: Proposal: Implemented support for optional 2nd output (scores) (#2762)
* Proposal stage: added support for optional 2nd output
* firmware updated
2020-10-23 15:19:20 +03:00
Rafal Blaczkowski
46e8c12a5d Add watchdog of OpenVino ONNX CI (#2550) 2020-10-23 14:16:43 +02:00
Krzysztof Bruniecki
9c78a4855a Remove CNN GNA1/2 compatibility enforcement when other GNA device detected (#2745) 2020-10-23 13:30:16 +03:00
Edward Shogulin
c2271da637 Es/lpt/lpt to ngraph fixes2 with master (#2671)
* [LPT] Replace creation of dequantization with factory

* [ngraph][LPT] Add ScaleShift replace for dequantization operations

* [LPT] SubtractMultiplyToMultiplyAdd refactoring

* [LPT] Code style fix

* [LPT] Edit SubtractMultiplyToMultiplyAdd transformation for dequantization

* [LPT] Linux compilation quick fix

* [LPT] [WIP] runtime info applying

* [LPT] Concat transformation functional tests extending

* [LPT] MultiplyToConvolution + Subtract to add fusing + improvements in LowPrecisionTransformer

* [LPT] linux compilation error fix

* [LPT] compilation error

* [LPT] MultiplyToGroupConvolution fix: 5D support

* [LPT] Multiply transformation extending: FQ weights support - wip

* [LPT] FQ folding & precision selection

* [LPT] code style fixes

* [LPT] code style fixes

* [LPT] Linux compilation error fix

* [LPT] SubtractMultiplyToMultiplyAdd: refactoring

* [LPT] Tests fixes

* [LPT] MultiplyToGroupConvolution tests

* [LPT] Convert subtract with int inputs to Eltwise sub

* [LPT] Constant folding fix for quant models

* [LPT] 1) Asymmetric quantization improvement 2) tests extending

* [LPT] 2 fixes for se_resnext_50

* [LPT] Add transformation priority branch selection test

* [LPT] AddMultiplyFusion: legacy transformation quick fix

* [LPT] nGraph tests temporary disabling

* [LPT] Fix for eltwise inputs with multiple outputs

* [LPT] Fix for FQ fuse

* [LPT] Reshape by channel, batch temporary disabled

* [nGraph][LPT] MatMul fix for reading FP16 models

* [LPT] 1) Add (not after Convolution/GroupConvolution/MatMul with Constant) to Subtract 2) precision selection fix: MultiplyToGroupConvolution quick fix

* [LPT] DenseNet improvments: AddTransformation: Add to Subtract + tests

* [LPT] AddTransformarion refactoring

* [LPT] AddTransformation tests temporay disabled

* [LPT] ReshapeTransformation improvements: degradation fix

* [LPT] code style fix

* [LPT] Concat tests temporary disabling

* [LPT] tests unification
1) plugin tests: added test-cases and nGraph-validation for clamp, split and variadic split
2) func tests: added test-cases
3) transformNGraph: added the ability to run additional transformations

* [LPT] split & variadic split merge fix

* [LPT] Clamp: added support for asymmetric quantization

* [LPT] added DequantizationAttr run-time attribute

* [LPT] debug info removal

* [LPT] ConcatTransformation: zero point fix

* [LPT] CNNNetwork ReLU transformation quick fix

* [LPT]
1) Concat fix
2) ConcatMultiChannels fix
3) Added "Concat with Split" test-cases
4) Subgraph fix

* [LPT]
1) Concat fix
2) Added "Concat with different precision on childs" test-case

* [LPT] concat fix Ubuntu18

* [LPT] Concat test fixes

* [LPT] Not fp32 FQ input support

* [LPT] MatMul Fix + separateInStandaloneBranch Fix

* [LPT] Fix reference input types in mish fusion tests

* [LPT] Fix cpuFuncTests on CentOS building

* [nGraph][LPT] ScaleShift 2d, 3d nGraph conversion enabling

* [LPT] 1) FullyConnected workaround removing 2) validate_nodes_and_infer_types for LPT

* [ngraph] Add check for childs for ConvertSubtract

* [LPT] Squeeze/Unsqueeze tests unification

* [LPT] Squeeze/Unsqueeze change signature for getReference/getOriginal

* [LPT] Mul & Add -> ScaleShift quick fix

* [LPT] nGraph tests emporary disabling

* [LPT] code style fix

* [LPT] code style fix #2

* [LPT] nGraph tests temporary disabling

* [LPT] code styl fix #3

* [LPT] shared plugin tests temporary disabling

* [LPT] cleanup

* [LPT] nGraph unit_tests tests temproary disabling

* [LPT] nGraph unit tests disabling #2

* [LPT] nGraph tests disabling

* [LPT] nGraph tests temporary disabling

* [LPT] WA removing

* [LPT] CentOS compilation fix

* [LPT] KMB wa to avoid compilation error

* [LPT] functional test temporary disabling

* [nGraph] code style fixes

* [LPT] ConcatTransformation: data movement operation as intermediate handling

* [LPT] FuseSubtractToFakeQuantize after VariadicSplit

* [LPT] ConcatWithSplitTransformation functional test temporary disabling

* [LPT] Clamp and ConcatWithDifferentPrecisionsOnChilds: tests fix

* [LPT] MatMul: bert-nv-mlperf-quantized fix

* [LPT] Add to convolution biases fuse fix

* [LPT] GPU plugin tests fixes

* [LPT] Normalize GPU plugin tests fix

* [LPT] test-commit

* [LPT] CLDNN Plugin FP16 conversion

* [LPT] AvgPool update precision if there is not FQ after + convolution
precision limitation on activation

* [LPT] Convolution fixes

* [LPT] FuseSubtractToFakequantize & FuseMultiplyToFakeQuantize improvement

* [LPT] FuseSubtractToFakeQuantize test fix

* [LPT] FuseSubtractToFakeQuantizeTransformation tests

* [LPT] code style fix

* [LPT] AvgPool child recursive extend

* [LPT] AvgPool tests + fix

* [LPT] compilation quick fix

* [LPT] Add to convolution biases fuse fix

* [LPT] Linux issues: MatMulWithOptimizedConstantFakeQuantizeTransformation temporary disabled

* [LPT] Normalize GPU plugin tests fix

* [LPT] test-commit

* [LPT]
1) added the ability to create sub without dequantizationAttribute
2) fixed optimizeMulAfter: added copying rt_info
3) Tests Unification: Convolution transformation
4) added cleanRunTimeInfo into Network Helper

* [LPT] Tests Unification: GroupConvolution

* [LPT] removed debug info

* [LPT] functional tests for Convolution & GroupConvolution extending

* [LPT] [MatMul] Quick fix ubuntu error

* [LPT] MatMulTransformation quick test fix: one constant for both intervals

* [nGraph] code style fix

* [LPT] added output_precision to NormalizeIE

* [nGraph] NormalizeIE fix for LPT support

* [LPT] nGraph WA removal

* [LPT] fixed fillSubgraph for concat multi channels

* [LPT] MatMul fix

* [nGraph] WA removal: 1) nGraph tests enabling 2) LPT extanding: not handle in FP32

* [LPT] nGraph WA removal: function tests skip config rollback

* [LPT] WA removal: precision propagation fix

* [LPT] ConvertMulOrAddFinally transformation extending

* [nGraph] ConvolutionMultiplyFusion rollback (move from legacy to common)

* [nGraph] ConvertMulAddToScaleShiftOrPower: WA removal

* [nGraph] TypeRelaxed: WA removal

* [nGraph] WA removal: TypeRelaxed

* [LPT] WA removal: ConcatTransformation

* [nGraph] WA removal: Eltwise & ConvertMulOrAddFinally fixes to support LPT

* [nGraph] MulAddConversion fix: 2D & 3D ScaleShift are supproted

* [nGraph] VisualizeTree extending

* [LPT] FakeQuantizeDequantization extending: check element wise dequantization operation

* [LPT] FakeQuantizeDequantization extending: SubtractMultiplyToMultiplyAddTransformation & WeightableLayerTransformation

* [LPT] Convolution + test infrastructure update

* [LPT] GPU compilation error

* [nGraph] BatchNorm plugin tests: input tensor definition

* [LPT] LowPrecisionTransformer::isFunctionQuantized was added

* [nGraph] WA final cleanup

* [nGraph] ScaleShiftIE quick fix

* [LPT] Functional tests: added test-cases "Concat with intermediate with constant"

* [LPT] Transformer::isNetworkquantized fix

* [LPT] SubtractMultiplyToMultiplyAdd zero Add remove: fix for ssd300 on gpu

* [LPT] MultiplyToGroupConvolution not transform on Const

* [LPT] workaround for negative scales

* [LPT] Convert standalone dequantization Mul,Sub,Add to ScaleShift

* [LPT] SubtractMultiplyToMultiplyAdd test fix

* [LPT] Clamp transformation: GPU tests fix

* [LPT] Transformer tests

* [LPT] FakeQuantizePrecisionSelectionTransformation was disabled for GPU

* [LPT] TransformerIsFunctionQuantized refactoring

* [nGraph] code style fix

* [LPT] mobilenet_v2_tf_depthwise test update

* [LPT] TMP: dequantization folding

* [LPT] Elementwise transformation fix: dequantization operations constant folding

* [LPT] cleanup

* [LPT] denormal values fix

* [LPT] FuseFakeQuantize test fixed + negative multiply case

* [LPT] FP32 -> FP16 conversion info

* [LPT] FQ dot interval support + swapMultiplyAdd safely division

* [LPT] test fix

* [LPT] Tests for dot interval on FQ + tests for addTransformation enabling

* [LPT] Clamp transformation fix

* [LPT] FQ prec selection test fix

* [LPT] Clamp test case

* [LPT] Concat division precision fix

* [LPT] cleanup

* [LPT] merge fix

* [LPT] WIP: MatMul asymmetric quantization fix (BERT)

* [LPT] MatMulWithOptimizedConstantFakeQuantizeTransformation disabled

* [LPT] GPU Plugin set config fix

* [LPT] Fix merge mistakes

* [LPT] Rollback device specific INT8

* [LPT] ReshapeFullyConnected fix: FullyConnected output fix

* [LPT] bert-base-chinese GPU fix

* [ngraph/LPT] Tests for fix convert_mul_or_add_finally with dequantization

[ngraph/LPT] Fix convert mul_or_add_finally with dequantization

* [LPT] ScaleShift dim < 4 only dequantization conversion

* [LPT] MatMul transformation tests extensing

* [LPT] ReshapeFullyConnected legacy transformation: LPT test case addition

* [nGraph] VisualizeTree extending: property names displying to simplify search

* [LPT] getDequantization extending

* [LPT] MulAddToScaleshiftOrPower: out precision fix & tests

* [LPT] Multiply to ScaleShiftIE: Multiply transformation: remove DEQUANTIZATION if not valid

* [LPT] Concat test case

* [nGraph] try to fix opencv compatibility

* [nGraph] nGraph code style fix

* [LPT] InPlace dequantization folding

* [LPT] Multiply constant folding test

* [LPT] Fix plugin test case for MatMulWithOptimizedConstantFakeQuantize

[LPT] Enable MatMulWithOptimizedConstantFakeQuantize plugin test

* [LPT] Convolution transformation: mulConst shape fix

* [LPT] INT8 Constant folding branch for elementwise ops optimization removal

* [LPT] eltwise for const branch fix

* [LPT] linux fix

* [LPT] Multiply test refactoring

* [LPT] Convert Fuse in Constant + tests

* [LPT] function comparation: runtime info comparation rollback

* [LPT] linux build fix

* [LPT] linux build fix2

* [LPT] MatMul transformation limitation was added to be similar as CNNNetwork LPT

* [LPT] Reshape transformation update: don't broadcast by batch

* [LPT] MatMul transformation limitation was added to be similar as CNNNetwork LPT - refactoring

* [LPT] MatMul transformation: transpose input tensors fix

* [LPT] checkElementwise for AddTransformation WA: should be moved to getDequantization

* [LPT] merge fix

* [LPT] MatMul fix & tests

* [LPT] AddTransformation tests

* [LPT] Interpolate transformation enabled

* [LPT] constant folding before LPT

* [LPT] WIP: not completed tests

* [LPT] GPU degradation fix

* [LPT] FuseConvert workaround

* [LPT] code cleanup

* [LPT] Interpolate GPU test quick fix

* [LPT] GroupConvolution fix

* [LPT] Fix fusing multiply for non-dequantization layers

* [LPT] GPU pipeline update: enableInt8 initialization place update

* [LPT] tests compilation fix

* [LPT] merge fix

* [LPT] tests enabling

* [LPT] merge issue resolving

* [LPT] LPT CNNNetwork usage macros: part #1: source code

* [LPT] LPT CNNNetwork usage macros: part #2: cmake files update and tests addoption

* [LPT] LPT workaround from nGraph core removing

* [LPT] previous LPT version tests

* [LPT] inference_engine_lp_transformations was returned back

* [LPT] replace_node rollback

* [LPT] ConvertSubtract fix

* [LPT] GPU: baselineIsFP16 reuse fix

* [LPT] FakeQuantizeTransformation: GPU workaround: I32 -> FP32 Convert is not fused

* [LPT] AvgPool output precision workaround

* [LPT] Group convolution precision + Subtract to ScaleShift const fix

* [LPT] SubMulToMulAdd & Transpose: action-recognition-0001 fix

* [LPT] Transpose: added test with per-tensor quantization

Co-authored-by: Aleksandr Pertovsky <aleksandr.pertovsky@intel.com>
Co-authored-by: Zinoviev, Vladimir <vladimir.zinoviev@intel.com>
Co-authored-by: Vladislav Golubev <vladislav.golubev@intel.com>
Co-authored-by: Gorokhov Dmitriy <dmitry.gorokhov@intel.com>
2020-10-23 13:22:55 +03:00
Egor Churaev
ca95240c91 [IE CLDNN] Fix linear_onnx Interpolate selection (#2769) 2020-10-23 13:16:47 +03:00
Evgenya Stepyreva
1bae540895 [ MO ] KSO=ON for Kaldi (#2028)
* [ MO ] KSO=ON for Kaldi

* [ MO ] Kaldi KSO

* set static_shape for graph cycle making transformation
2020-10-23 13:14:00 +03:00
Tomasz Dołbniak
f1444b33e7 ONNX Reader supportModel() implementation (#2744) 2020-10-23 12:13:04 +02:00
iliya mironov
0a59be6f1e Transformations for hsigmoid op (#2531)
* Add hsigmoid op

* Add tests for hsigmoid

* Add fusion hsigmoid

* Add unit tests for fuse hsigmoid

* Add python api for hsigmoid. Update opset 5

* Update opset5 file

* Add hsigmoid decomposition transformation

* fix

* Move transformations for hsigmoid

* Hot fix

* Fix unit tests

* fix unit tests

* Fix unit test

* Fix code style

* Reverse changes

* Add includes for hsigmoid transformations

* Enable in cldnn

* Refactoring hsigmoid fusion

* Move hsigmoid transforms patterns to cpp file

* Reverse hsigmoid fusion refactoring

* Fix according to code review

* Refactoring transformation

* Hot fix
2020-10-23 12:35:56 +03:00
Piotr Szmelczynski
85b06835aa Reference implementation for Tile op (#2641) 2020-10-23 10:39:00 +02:00
Mateusz Tabaka
32b886a892 Remove obsoleted Dequantize op (#2780)
* Remove obsoleted Dequantize op

* apply code style
2020-10-23 11:25:08 +03:00
Ilya Lavrenov
ddad7e3505 Fixed -Werror=catch-value= gcc-9 error (#2773) 2020-10-23 10:39:55 +03:00
Mikołaj Życzyński
6b02cd380f [IE CLDNN] Fix padding in reduce fsv16 kernel (#2787) 2020-10-23 10:16:21 +03:00
Tomasz Dołbniak
d5cd8673f4 Fix the model downloader script (#2784) 2020-10-23 09:58:12 +03:00
Roman Donchenko
ba3fc7fb8a Fix spelling errors in the API and bindings (#2781) 2020-10-23 09:17:03 +03:00
Ilya Lavrenov
258c51bd1f Openvino extra module adding - refactored (#2754)
* Rename plugin to module

* Added openvino_contrib handling

* Moved NEON flags to common place

* Fixed -Werror=catch-value= gcc-9 error
2020-10-23 08:54:48 +03:00
Ilya Lavrenov
82ea01b7ff Removed obsolete comments from cmake (#2748) 2020-10-22 16:11:28 +03:00
Jan Iwaszkiewicz
77794535ab [ONNX] WA for I64 images (#2411) 2020-10-22 14:06:23 +02:00
Andrew Bakalin
3dfec639f0 [VPU][GT][Tests] Make gemmTranspose pass layout agnostic (#2666)
* [VPU][GT] Make permTranspose pass layout agnostic

* [IE][Tests] Improve MatMul common test class

* [VPU][Tests] Add tests for MatMul

* [VPU][Tests] Review fixes

* [Tests] Add combineShapes for MatMul

* [VPU][GT] Fix assertion condition
2020-10-22 15:04:53 +03:00
Vladimir Paramuzov
16a73508bd [IE CLDNN] Base kernels refactoring (#2758) 2020-10-22 14:42:42 +03:00
Ilya Churaev
e364271cf6 Constant->Result networks (#2639)
* Added tests

* Changed iterator algorithm

* Fixed legacy tests

* Added plugin tests

* Disabled some tests

* Remover parameter tests

* Fixed conversion

* Use old approach for old tests

* Temp commit

* Fixed iterator

* Fixed some tests

* Change logic to compare iterators

* Disabled CPU functional test

* Temp commit

* Disabled test for GPU

* Fixed network copy

* Try to fix test for Windows

* Disabled test for GNA

* Disable plugin tests

* Disable legacy test

* Remove redundant code
2020-10-22 13:22:38 +03:00
Ilya Churaev
1594489a2f Added new version of BatchNormInference (#2728)
* Added new version of BatchNormInference

* Fixed code style

* Fixed batch norm inference v5

* Added opset4 and opset5 to IE backend

* Fixed functional test

* Fixed cpuFunc tests

* Fixed transformation order

* Try to fix validation

* Revert some changes

* Updated python API and added tests

* Fixed code style

* Fixed python code style

* Disabled test
2020-10-22 13:21:23 +03:00
Vladimir Paramuzov
4519097e47 [IE CLDNN] Extend supported fusing cases for scale and eltwise (#1960) 2020-10-22 13:06:27 +03:00
Mateusz Tabaka
d901bbfce3 Use MVN in GroupNorm/InstanceNorm in ONNX importer (#2711)
* Use MVN in GroupNorm/InstanceNorm in ONNX importer

* Remove mosaic_8 model from xfail list
2020-10-21 13:48:53 +03:00
Jedrzej Hajduczenia
458425ac9e [IE CLDNN] Another try to fix multiple-kernel implementations profiling (#2630) 2020-10-21 13:36:32 +03:00
Tomasz Dołbniak
3688ff4c51 Use LogSoftmax-5 in the onnx_importer (#2602) 2020-10-21 10:50:16 +02:00
Anton Pankratv
8a1653b0d1 Supported threading command line options for other devices (#2725)
* Supported thrieding command line options for ohter devices

* Fixed python benchmark
2020-10-21 06:40:18 +03:00
Vladislav Vinogradov
b2747e68f5 [NGRAPH] Fix UNITY build (#2732) 2020-10-21 06:34:35 +03:00
Anton Chetverikov
44406691e5 Add Round-5 operation (#2328)
* Add Round-5 operation

* Add ONNX Round to supported operation list

* Add ngraph implementation for Round operation

* Update MO part

* Create UnaryElementwise class, update Round Operation

* Fix mode attr in mxnet extractor

* Add tests for Round shape infer

* Update 'enable' attr

* Update MO IR Reader to support UnaryElementwise operations

* Minor test refactor

* Update ngraph Round operation

* Add reference implementation

* Add test for reference implementation

* Add test for shape infer

* Add test for IE IR Reader

* AddRound operation to python api

* Fix missed mode attr

* Update Round operation version

* Fix codestyle

* Add MxNet Round to supported layers list

* Fix error in reference

* Fix comments style

* Update CMake file

* Update Ngraph reference test

* Update IE IR Reader tests

* Return v0::Round operation

* Update shape infer tests

* Fix v0::Round reference

* Fix codestyle

* Enum instead of string

* Fix codestyle

* Add Mode attribute adapter

* Update Mode attr

* Fix reference for v0::Round

* Fix codestyle

* Fix mode attr

* Fix get() method

* Fix codestyle in python api

* Update test info

* Fix ngraph api part

* Ad round v5 to interpreter tests

* Fix codestyle is ie reader test

* Update ngraph python api __init__.py file

* Adde opser5 to dafault opsets in ie_ir reader

* Add parser for Round layer

* Remove redundant spaces

* Add round creator to appropriate list

* Remove redundant import

* Commit to bump infrastructure version

I'm sorry for this, but this commit will be squashed on merge to master anyway and it is needed for your PR to correctly pass the pipeline

* Fix import

* fix codestyle

* Fix ngraph api part

* Add shape infer tests in python api

* Add .upper() for mode attr

* Refactor MO shape infer test for Round op

* Update tests and add comments

* Revert "Commit to bump infrastructure version"

This reverts commit 56e6ae1e4c.

* remove parser for Round layer

* Update Ronund-5 evaluate test

* Resolve review comments

Co-authored-by: User <user@nnlvdp-achetver.inn.intel.com>
Co-authored-by: Andrey Babushkin <andrey.babushkin@intel.com>
Co-authored-by: Anton Chetverikov <anton.chetverikov@.intel.com>
2020-10-20 18:36:19 +03:00
Irina Efode
a2e49469b5 Cleanup single_layer_tests (#2716) 2020-10-20 14:31:59 +03:00
Maxim Vafin
a405546054 Add LogSoftmax-5 to MO and ngraph (#2409)
Co-authored-by: Evgeny Lazarev <evgeny.lazarev@intel.com>
2020-10-20 13:40:06 +03:00
Mateusz Tabaka
83670dd5cb Remove deprecated Any op from nGraph (#2719) 2020-10-20 12:36:46 +03:00
Mateusz Tabaka
8002b16eb2 [ONNX] Add type conversion for Pow op inputs (#2589)
Co-authored-by: mitruska <katarzyna.mitrus@intel.com>
2020-10-20 11:19:03 +02:00
Roman Kazantsev
c2394508c1 Implement LookupTableInsert shape inference (#2348)
* Implement LookupTableInsertV2 shape inference

It is needed if other nodes not beeing pruned in the graph
have a conditional dependence on LookupTableInsertV2 node.

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

* Fix after core-review #1

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

* Fix the code after review #2

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

* Fix after code review #3
2020-10-20 09:57:55 +03:00
Anna Likholat
347e92cc82 [JAVA] Fixed IECore constructor (#2685) 2020-10-19 19:38:55 +03:00
Vladimir Paramuzov
9367266ed5 [IE CLDNN] DispatchData refactoring (#2508) 2020-10-19 18:45:05 +03:00
Nikolay Shchegolev
ff7fc01c76 [CPU] CTCLoss performance improvement. 2020-10-19 13:01:39 +03:00
Anton Potapov
8715b60d88 [PP GAPI] Extended plug-ins shared precision conversion tests to use (#2677)
`GetBlob()` as well

- test were extended to cover case when input tensors are copied into
Blob return by `InferRequest::GetBlob`
- channel number of input tensor is made a test parameter
2020-10-19 12:35:59 +03:00
Krzysztof Bruniecki
e1428ecf1d Improve GNA MT sychronization (#2553)
* Sync GNA lib calls to avoid multi threads and plugins crash

* Remove TODO

* Enable sync for GNA1

* Fix GNA1 sync

* Add core_threading_tests to GNA Plugin to address story 31709

* Disable and change test description
2020-10-19 12:21:01 +03:00
Vitaliy Urusovskij
3c5aefb427 Remove memcheck_pregen_irs_tests MemCheck configs due obsolescence (#2693) 2020-10-19 09:48:38 +03:00
Mateusz Tabaka
5965010bec Revise LRN reference implementation (#2672)
* fix typo in LRN docs

* fix link to reference in LRN doc

* LRN, LRN_IE types alignment with spec

* align LRN ref implementation to plugins behavior

* update LRN docs

* Improve LRN reference implementation performance

* restore LRN constructor with no axes in the input

* apply code format

* revert double->float size_t->int change

* small fix to example in doc

* revert double->float size_t->int in onnx_importer and backend tests

* Changes to docs after review
2020-10-19 08:40:04 +03:00
Ivan Tikhonov
84b5fc51dc [opset5] ngraph implementation of Loop op (#2583)
* Loop op ngraph implementation, update IE IR Reader and ngraph to cnn converter

* refactoring SubGraphOp class

* type prop unit tests

* ngraph code style

* update comment

* single layer tests for Loop operation

* fix file name

* Add SpecialBodyPorts attribute in Loop op, update single layer tests

* add several new tests cases, strict checks in Loop impl, temporary disable single layer tests

* ngraph codestyle, refactoring, clone_new_args test

* resolve review remarks

* fix build

* fix tests

* add a new constructor of Loop op, resolve review remarks
2020-10-19 06:53:46 +03:00
Roman Lyamin
cc569d2254 [IE CLDNN] Added HSigmoid operation (#2700) 2020-10-18 20:47:22 +03:00
Michał Karzyński
cc2bfcf1d7 Improve python_wheel CMake target (#2688) 2020-10-18 17:12:25 +02:00
Michał Karzyński
2b5ed2e9eb Tweaks for ONNX scoreboard (#2697) 2020-10-18 17:08:06 +02:00
Alexey Suhov
f0a37743e1 [install_dependencies.sh] install latest cmake if current version is lower 3.13 (#2695)
* [install_dependencies.sh] install latest cmake if current version is lower 3.13

* add shellcheck for Ubuntu

* install python 2.7 for Ubuntu
2020-10-16 21:03:46 +03:00
Jesus Espinoza
595a52ae67 Updating broken link on getting started linux doc (#2507)
Link to build instructions was broken, updated link to the correct location.
2020-10-16 19:02:41 +03:00
Ilya Churaev
d8466cf6ee Small fix for python doc (#2696) 2020-10-16 18:12:20 +03:00
Andrey Dmitriev
aff7a66082 [GNA][Speech sample] Add option to specify blob names (#1529)
* Added output names

* Add input, output, ref names

* Added zero scale factor

* Adding support for multiple reference files
2020-10-16 15:34:22 +03:00
Kamil Magierski
95d7c29628 [GNA] Fix remove layer + identity layer insertion (#2626)
* [GNA] Fix remove layer + identity layer insertion

test stub

Test impl

style

hpp style

* disable FP16 for GPU
2020-10-16 13:23:32 +03:00
Michał Karzyński
fd774f0c58 Remove segfault marks form test_unary_op_scalar and test_range tests (#2692)
Co-authored-by: Ewa21 <ewa.tusien@intel.com>
2020-10-16 11:34:26 +02:00
Tomasz Dołbniak
5eee1ea925 Avoid unnecessary Reshape in ONNX Softmax impl (#2686) 2020-10-16 11:30:20 +02:00
Tomasz Dołbniak
0dde02e44f Use GatherND-5 in the onnx_importer (#2634) 2020-10-16 11:30:00 +02:00
Ilya Lavrenov
a4584d77a2 Added apiValidator post-build checks for WCOS compliance (#2657)
* Added apiValidator post-build checks for WCOS compiance

* WA for cmake

* Additional checks for old WDK version
2020-10-16 10:58:38 +03:00
Egor Churaev
73fceedf1d [IE CLDNN] Add FP16 axes precision to Interpolate-4 (#2681)
JIRA: 40805
2020-10-16 10:14:22 +03:00
Michał Karzyński
ddd9cf6bf5 Workaround for Cython issue on Python 3.8 (#2684) 2020-10-16 08:44:03 +02:00
azhogov
5501f2c66d Set chmod +x for model_zoo_preprocess.sh 2020-10-16 08:19:46 +03:00
Vladislav Vinogradov
c5e9ebc05c [NGRAPH] Fix UNITY build under Windows (#2678) 2020-10-16 06:57:30 +03:00
Gabriele Galiero Casay
c9b16a79f5 Reference Implementation for RegionYolo operator (#2474) 2020-10-15 22:30:12 +02:00
Michał Karzyński
db85069713 Update nGraph Python API build instructions (#2610) 2020-10-15 22:15:33 +02:00
Evgenya Stepyreva
6ae28bdd62 Broadcast visit_attributes fix (#2649)
* Broadcast visit_attributes fix

* Broadcast: Python API adjustment

* Revert back deserialization change
2020-10-15 21:39:42 +03:00
Tomasz Socha
7cead20209 [ONNX] Replace global poolings with reduce operations (#2650) 2020-10-15 19:04:43 +02:00
Mateusz Tabaka
dda71338dd Update test_shufflenetv2 tolerance values (#2674)
* Update test_shufflenetv2 tolerance values

* Update model path

* Update models xfails

* Update mounting volumes to container

Co-authored-by: rblaczko <rafal.blaczkowski@intel.com>
2020-10-15 16:47:20 +03:00
Katarzyna Mitrus
fadd16ce89 ReorgYolo reference implementation (#2384)
* Align ReorgYolo to the spec (vector strides -> int stride)

* ReorgYolo ref impl

* ReorgYolo evaluate method

* ReorgYolo tests

* Tests update

* Style apply

* Add some coments

* Code refactor

* Comment update

* Style apply

* Build fix, mark evaluate as override

* Revert "Align ReorgYolo to the spec (vector strides -> int stride)"

* Use int_executable instead of evaluate

* Use char* instead of templates

* Code refactor

* Comment update

* Code review comment

* Add constructor aligned with spec

* Update shape validation

* Update attributes tests

* Add type_prop tests

* Update backend tests

* Add single layer tests

* Update the spec

* Remove wrong transformation test
2020-10-15 13:42:21 +03:00
Vladimir Paramuzov
49e760381e [IE CLDNN] Fixes for GatherTree and ReverseSequence (#2660) 2020-10-15 10:28:00 +03:00
iliya mironov
a8c77add83 Add hsigmoid op to ngraph (#2647) 2020-10-15 07:41:46 +03:00
Roman Kazantsev
d1e4ef392c Extend MO for operation GatherND (#2540)
* Extend MO for operation GatherND

* Update documentation

* Rename GatherNd.py to gathernd.py

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2020-10-15 07:40:58 +03:00
Anastasiya Ageeva
cdfb1f0ea7 Fixed CVS-35316 (#2072) 2020-10-14 21:50:02 +03:00
Vitaliy Urusovskij
12b690952c Time tests improvements (#2642)
* Remove extra functions from run_timetest.py

* Add `log.debug` of raw and aggregated statistics in run_timetest.py

* Implement storing of models locally for test_timetest.py
2020-10-14 20:05:52 +03:00
Evgeny Lazarev
4f80da4126 Loop-5 operation specification (#2291)
The Loop-5 operation specification
2020-10-14 19:12:25 +03:00
Andrey Somsikov
0742ef8251 Fix itt build (#2662) 2020-10-14 18:35:21 +03:00
Artyom Anokhov
a5ab41ef87 setupvars.sh: Updated setting pyenv error to warning. (#2663) 2020-10-14 18:33:17 +03:00
Vladimir Gavrilov
d277334028 nGraph implementation of NMS-5 (without evaluate()) (#2651)
* Written nGraph NMS-5 without evaluate().

* Used NGRAPH_RTTI_DECLARATION.
2020-10-14 16:47:43 +03:00
Evgeny Lazarev
d86019d104 Leaky relu transformation refactor (#2640)
* Refactored LeakyRelu transformation

* Added unit test for LeakyRelu transformation + removed duplicate test function valued_const
2020-10-14 16:43:29 +03:00
Maksim Doronin
3bc6151567 [IE][VPU]: Added DSR_Reshape tests with dynamic output shape descriptor (#2607)
* Added DSR_Reshape tests with dynamic output shape descriptor
2020-10-14 14:30:59 +03:00
Andrew Bakalin
6bfe41875e [IE][VPU]: TopK: Relax requirement for supporting Sort::None mode if K==1 (#2653)
* Update firmware
* Add TopK tests
* Disable some cases
2020-10-14 13:35:17 +03:00
Andrey Somsikov
0eb176c815 Use ittnotify built from sources (#2577)
* Use  ittnotify built from sources

ITT tracing was only possible on the platfroms supported by VTune.
Building ittnotify from sources removes VTune dependency.

ITT traces was found significantly slowdown tests execution time.
Disabling ENABLE_PROFILING_ITT by default. This is also
a current behavior of Intel Distribution of OpenVINO.

* Fix missprint

* Add include directories to itt
2020-10-14 13:08:06 +03:00
Mateusz Bencer
c0d71900fd Provide ONNX external data mechanism to ReadNetwork (#2588)
* added unit test

* added python test

* using pword approach

* Added passing path to onnx reader

* support for wstring

* Added more tests

* Apply suggestions from code review

Co-authored-by: Michał Karzyński <4430709+postrational@users.noreply.github.com>

* fix build for Windows

* styles applied

* Fixed Windows tests

* styles applied

* fixed styles in tests

* review remarks

* cmake order

* Used target_compile_definitions instead of add_definitions

* Move ONNX_TEST_MODELS to other scope

Co-authored-by: Michał Karzyński <4430709+postrational@users.noreply.github.com>
2020-10-14 12:30:53 +03:00
Roman Kazantsev
9956639531 Extend nGraph for operation GatherND-5 and implement reference (#2587)
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2020-10-14 12:20:22 +03:00
Mateusz Bencer
6d72110365 Fix using numpy scalars in Python API (#2520)
* fixed numpy scalars

* reverted tests changes

* python style fixed
2020-10-14 11:17:44 +03:00
Andrew Bakalin
0f2a4b1824 [IE][VPU]: Support DTS for Split (#2576)
* [IE Tests] Remove unnecessary cout
* [VPU] Add DTS for split
* [VPU][Tests] Add tests
2020-10-14 11:02:21 +03:00
Gleb Kazantaev
94eacc6544 Move legacy transformations and ops to legacy library (#2624)
* Initial movement

* Divided transformations to common and legacy

* Changed ngraph visibility to ie_api.h

* CommonTransformaitons to Internal

* New trasnformations location structure

* fixde typo; move convert_quantize_dequantize to common

* Added control_flow folder
2020-10-14 10:58:01 +03:00
Ilya Lavrenov
82d0aaf1dd used native LTO support from cmake 3.9.6 (#2625)
* used native LTO support from cmake 3.9.6

* Removed compilation flags push / pop

* Fixes

* Fixes for VPU unit tests

* Temp WA for old gcc
2020-10-14 10:43:24 +03:00
Ilya Churaev
72d387c702 Do reshape only if input shapes will be changed (#2632)
* Added private reshape

* Removed incorrect check
2020-10-14 09:42:39 +03:00
Anton Chetverikov
8c48a6044d Round-5 nGraph implementation (#2652)
* Implement nGraph Round-5 operation

* Remove reference implementation

* Add shape infer tests

* Fix codestyle
2020-10-14 08:10:05 +03:00
Maxim Vafin
cf09752a29 Add LogSoftmax-5 to ngraph (#2645) 2020-10-14 08:08:27 +03:00
Maksim Derbasov
93c2d6db41 General code fixes (#2609) 2020-10-14 06:46:12 +03:00
Irina Efode
e79a44c02e [IE TESTS] Remove some deprecated single layer tests (#2646)
* [IE TESTS] Remove some deprecated single layer tests

* Gather Tree
2020-10-14 00:58:28 +03:00
Vladislav Vinogradov
8331c397cd [IE][NGRAPH][BUILD] Enable UNITY build for more targets (#2592)
* Avoid symbols clash due to source merging.
* Tested on Ubuntu 20.04 with GCC 9.3.0.
2020-10-13 17:35:55 +03:00
Ilya Lavrenov
1e66624799 Plugin interface refactoring (#2591)
* Simplified plugin interface

* Allow not implemented

* Fixes

* Fixed CPU plugin tests

* Fixed tests dependencies

* Fixes

* Fixed GPU plugin compilation

* Renamed plugin

* Fixes

* Removed tests for plugin base

* Fix2

* Fix 2

* Define a macro to define plugin creation function

* Clean-up

* Fixed OSX build

* Fixed CentOS

* Removed statuscode from IExecutableNetworkInternal interface

* Interface

* Removed not used macro

* QueryNetwork returns result using return value

* LoadNetwork interface

* Fixed compilation with private plugins

* Fixed compilation when NGRAPH_INTERP is not enabled

* Return ExecutableNetwork from ImportNetwork with fileName

* Updated GetContext method

* Return exec graph information as return value

* Message about deprecation of Export with file name

* Message about deprecation of QueryState

* Updated ExecutableNetwork::GetConfig signature

* Updated ExecutableNetwork::GetMetric signature

* Updated docs

* WIP createIR

* Simplified IR creation

* CreateInferRequest returns value

* Removed GetExecutor from ExecutableNetworkThreadSafeDefault

* execDataPreprocessing is protected

* Fixed mock test
2020-10-13 17:22:51 +03:00
Jedrzej Hajduczenia
4d138307f4 [IE CLDNN] Revert fix for profiling of multiple kernel implementations (#2219) (#2595) 2020-10-13 16:40:30 +03:00
Alexander Zhogov
565b504c1c GitHub CI: Add files_size.yml (#2570)
* GitHub CI: Add files_size.yml

* Update job name
2020-10-13 13:27:34 +03:00
Vladislav Vinogradov
ab0fb29853 [IE][BUILD] Fix C5208 warning under Windows (#2628)
* C++ feature in C `typedef struct` code.
* The warning can be promoted to error in dependent projects.

C5208: unnamed class used in typedef name cannot declare members other than
non-static data members, member enumerations, or member classes
2020-10-13 11:37:30 +03:00
helmutg
15a338e89b add build option USE_SYSTEM_PUGIXML (#2502)
It allows skipping inference-engine/thirdparty/pugixml and using the
system copy instead.

Thanks to @Osse for helping understand cmake scoping rules.

Co-authored-by: Helmut Grohne <helmut.grohne@intenta.de>
2020-10-12 23:24:24 +03:00
Alexander Zhogov
7ac8cd8586 Azure CI: Fix nGraph ONNX 2020-10-12 19:23:00 +03:00
Alexander Zhogov
3a2e33962c Azure CI: Disable steps in nGraph ONNX 2020-10-12 19:20:28 +03:00
azhogov
5835974fad Azure CI: Add linux_ngraph_onnx.yml 2020-10-12 18:46:14 +03:00
Nikita Kudriavtsev
5ce622f4f4 [IE Myriad] Fix layer tests for logical_and (#2622) 2020-10-12 16:37:31 +03:00
Ilya Lavrenov
d617f1c230 Fixed ODR for LTO with gcc5 (#2615) 2020-10-12 14:16:30 +03:00
Pavel Esir
2110a29b7c [MO] [Kaldi] Add TDNN Component (#1870)
* [MO] [Kaldi] Added TDNN Component

* TdnnComponent replacer graphical comment updated

* Added SpecAugmentTimeMaskComponent

* some refactor of memoryoffset shape_infer

* moved memoryoffset splitting to the middle stage

* some corrections
- set `need_shape_inferenc`=False in split_memoryoffset
- use cycle instead of pattern in tdnn_replacer

* separated splitting of MemoryOffsets in LSTM and TDNN blocks

* set transpose_weights=True in TdnnComponent

* Corrected Supported_Frameworks_Layers

* corrected comments

* separate naming for tdnn and lstm memoryoffset splits

* corrected BOM file

* corrected generaldropout_ext.py and removed 'has_default' for tdnn_component

* corrections after PR review

* renamed LSTM -> recurrent; added setting element_size for paired nodes of tdnn_memoffset and othe minor changes

* Update split_tdnn_memoryoffset.py

* corrected partial infer with new API in elemental.py and split_tdnn_memoryoffset.py
2020-10-12 14:10:27 +03:00
Anastasia Kuporosova
9f1b4e0854 [IE TOOLS] Support of models with output port in names (#2594) 2020-10-12 13:52:49 +03:00
Pavel Esir
9a9b231c98 [MO] Fix ONNX Clamp-11 shape infer with no min/max inputs (#2603) 2020-10-12 09:55:45 +03:00
Ilya Znamenskiy
ef2aa3ad67 [IE CLDNN] TopK registry spill avoiding for sort-by-value mode (#2590) 2020-10-12 08:36:57 +03:00
Mateusz Tabaka
24b2c41f3a Tests and docs for registering custom ONNX operators (#2416)
* Add tests, examples and documentation changes for custom ONNX operators registration mechanism

* Change snippet paths

* fix CoreThreadingTests.ReadNetwork - data race in ops_bridge

* Make TemplateExtension::Operation externally visible

* changes after review

* apply code format

* use std::int64_t

* forward declare get_attribute_value specializations

* introduce unregister_operator in onnx_importer

* onnx_custom_op - lock mem first then take a buffer

* func tests - create template_extension via make_so_pointer

* fix build with NGRAPH_ONNX_IMPORT_ENABLE=OFF

* remove exports from Operation and Extension

* Move multithreaded AddExtension test to different directory to it can be excluded when NGRAPH_ONNX_IMPORT_ENABLE=OFF

* Dont include Extension tests if ENABLE_MKL_DNN=OFF

* fix excluding onnx_reader tests

* include extension tests only if mkl is enabled

* add comment on empty blob

* use register_operator conditionally in template_extension

* fix docs after review

* create static library from onnx_custom_op

* add additional test for unregister_operator

* move model example after register step

* revert changes to unit tests

* update ngraphConfig.cmake.in header

* add headers to onnx_custom_op

* changes to docs CMakeLists

* remove redundant onnx_importer dependency

* remove extension directory from func tests

* make onnx_importer a component of ngraph package

* docs fixes

* update header of ngraph/cmake/share/ngraphConfig.cmake.in with ngraph_onnx_importer_FOUND
2020-10-12 07:36:19 +03:00
Ilya Lavrenov
39e7905fe1 Fixed LTO for gcc-9 (ubuntu 20.04) (#2616)
* Fixed LTO for gcc-9 (ubuntu 20.04)

* Fixed ODR rules violation for MKLDNN deprecated functional tests

* Fixed tests build for templatePlugin
2020-10-12 06:57:59 +03:00
Alexander Perepelkin
a1b8a11000 Allow to specify both in/out precision, add in/out layout in tests (#2516)
* test definitions

* CPU plugin shared tests

* CPU plugin custom tests

* GNA plugin shared tests

* GPU plugin shared tests

* MYR plugin shared tests

* TML plugin shared tests
2020-10-11 11:05:55 +03:00
Ilya Lavrenov
daf8bc6164 DOCS: added code snippets compilation and fixes (#2606) 2020-10-10 11:19:16 +03:00
Katarzyna Mitrus
00faee86e0 Update ONNX importer LSTM to use v5 LSTMSequence (#2511) 2020-10-09 15:24:10 +02:00
Gleb Kazantaev
2e49b4e4d8 Fine-Grain Transformation pipeline tuning (#2547)
* Initial version of transformation callback refactoring

* Improved fine-grain tuning for transformation pipeline

* Check disabled matchers in GraphRewrite

* Avoid deprecated classes inside PassConfig

* Enabled DepthToSpace fusion by default

* Removed doulbe search in map

* Moved back pass_config.hpp; Added doxygen documentation for new class and methods

* Added doxygen comment for Manager and GraphRewrite new mthods
2020-10-09 15:33:19 +03:00
Ilya Lavrenov
da625b995e Shellcheck update (#2557)
* Fixed SC2236 rules

* Fixed SC2086 rule

* Small fixes in other scripts
2020-10-09 13:25:53 +03:00
Rafal Blaczkowski
44c2477b78 Add strict timeout for test execution (#2598) 2020-10-09 13:08:50 +03:00
Mikhail Ryzhov
ba931c2d21 ngraph python sample (#2574)
This sample demonstrates how to execute an inference using ngraph::Function to create a network
- added sample
- added readme
- added lenet weights
2020-10-09 13:05:55 +03:00
Roman Donchenko
0e502ffb35 [MO] Fix many spelling and grammar errors (#2543) 2020-10-09 12:16:12 +03:00
Nikita Kudriavtsev
af661ae0fe [IE][VPU]: Added wrapper for LogicalNot layer (#2562) 2020-10-09 12:09:14 +03:00
Maxim Vafin
694d1dcd25 Specify LogSoftmax-5 operation (#2382)
* Specify LogSoftmax operation

* Fix feedback
2020-10-08 20:04:38 +03:00
Kate Generalova
3cbf92e778 doc: add openvino tag link on StackOverflow (#2585) 2020-10-08 16:17:30 +03:00
Vladimir Gavrilov
f4551acccf NonMaxSuppression-5 operation specification (#2310)
* The specification of NonMaxSuppression-5.

* Replaced opset4 with opset5.

* Fixed func(iou) when soft_nms_sigma == 0.

* Now outputs of NMS-5 have dynamic shapes.

* Now inputs 3, 4, 5, 6 can be 0D or 1D tensors.

* Now output 3 is 1D tensor.
2020-10-08 15:58:39 +03:00
Michał Karzyński
79d94f5af1 nGraph Python API tweaks and tutorial (#2471) 2020-10-08 14:09:17 +02:00
Vitaliy Urusovskij
a4fe59ba0a Specify cl_cache_dir env var: (#2581)
1. General behaviour doesn't work for some compute-runtime versions.
Specification of `cl_cache_dir` fixes it
2020-10-08 15:02:31 +03:00
Vitaliy Urusovskij
474dcc277f Prepare new test configuration for test_timetest.py (#2561)
* Add logging of DB upload to tconf with refs saving

* Prepare `.automation/tgl_test_config.yml` with models from VPUX package

* Add restriction on `exe` and `model` existence in run_timetest.py
2020-10-08 10:30:43 +03:00
Jedrzej Hajduczenia
76d2ba328d [IE CLDNN] Fix profiling of multiple kernel implementations (#2219) 2020-10-08 09:22:34 +03:00
Mikołaj Życzyński
dba94b1f19 [IE CLDNN] Refreshment of convolution_gpu_fs_byx_fsv32 kernel (#2536) 2020-10-08 09:20:51 +03:00
Gleb Kazantaev
3f55733b43 Updated ConstantFolding pass to propagate friendly name (#2572)
* Fixed concat output name when decomposing shape_of in CF

* Added friendly_name propagation for CF pass

* Propagate runtime info inside ConstantFolding pass

* Fixed rt info merge strategy to avoid cases when merge is not implemented but attributes number is equal to 1
2020-10-08 09:16:28 +03:00
Konstantin Satunin
30b526c307 increase http timeout for artifacts uploading (#2571) 2020-10-08 09:12:22 +03:00
Liubov Batanina
7f78dd797e [IE Tests] Added NormalizeL2 tests (#2327)
* Added NormalizeL2 tests

* Added NormalizeL2 reference

* Add nGraph tests

* Fix tests

* Added NormalizeL2 builder
2020-10-08 07:23:25 +03:00
Anton Chetverikov
8062f20c15 Add specification for Round operation (#2238)
* Add specification for Round operation

* Create opset5.md file

* Resolve review comments

* Remove useless formula section from specification

* Update specification

* Update Round specification

* Resolve review comments
2020-10-07 18:33:43 +03:00
iliya mironov
43dc605f50 Add HSigmoid spec (#2412)
* Add HSigmoid spec
2020-10-07 18:24:54 +03:00
Vitaliy Urusovskij
c3ff2948a4 Timetests test_runner improvements (#2552)
* Remove `generate_tmp_path` as unnecessary after refactoring

* Add `check_positive_int` check for `-niter` CLI key

* Replace `TestConfDumper` with number of fixtures:
1. Save all test info in global `request` and `pytestconfig` fixtures
2. Add `test_info` fixture for retrieving test info from test
3. Add `prepare_tconf_with_refs` fixture for test conf dump
2020-10-07 17:15:02 +03:00
Denis Orlov
1cc25fc885 Port 2021.1 documentation updates for GNA plugin and speech libs and demos. (#2564)
* Update docs for speech libs and demos (#2518)

* [GNA] Documentation updates for 2021.1 (#2460)

* [GNA] Documentation updates for 2021.1

* Take Mike's comments into account

* More fixes according to review

* Fix processor generation names
2020-10-07 15:13:16 +03:00
Vladislav Vinogradov
e9fde8f497 [IE][TOOLS] Improvements for compile_tool (#2555)
* Split cmd arguments onto sections (common, MYRIAD, FPGA).
* Add `-iol` cmd argument as `-iop` analogue for layouts.
* Remove limitations over `-ip`, `-op`, `-iop` arguments.
  Now they supports full meaningfull set of Precision/Layout values and will allow to user set any precision for any input/output.
  The applicability for this in under user reponsibility and support under plugin reponsibility.
* Add VPUX default configuration.
* Adjust code style to the project common style.

Co-authored-by: Alexander Novak <sasha-novak@yandex.ru>
2020-10-07 14:51:10 +03:00
Ilya Churaev
6f0aaf2bb5 ngraph docs to master (#2568)
* First draft of nGraph documentation

* updated according to review comments

* Updated

* Reviewed the nGraph Transformation section, added missing images

* Update nGraph_dg.md

* Delete python_api.md

Removed since there is already the nGraph_Python_API.md document with a comprehensive overview.

* Fixed links to images

Co-authored-by: Andrey Zaytsev <andrey.zaytsev@intel.com>
Co-authored-by: CCR\avladimi <anastasiya.ageeva@intel.com>
2020-10-07 14:49:47 +03:00
Bartosz Lesniewski
8f95e22a5c CTCGreedyDecoder reference implementation (#2284) 2020-10-07 13:44:56 +02:00
Alexey Suhov
7a389b7ef5 Update SW requirements in build instructions and change latest release to 2021.1 (#2566) 2020-10-07 00:37:26 +03:00
Roman Kazantsev
96bae7bd2c Specify GatherND-5 operation (#2414)
* Specify GatherND-5 operation

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

* Update ie_docs.xml with GatherND-5

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2020-10-06 21:26:13 +03:00
Konstantin Satunin
80d5171769 Test results publishing to Azure DevOps v2 (#2539)
* do not merge results
* add Linux and Mac publishing
2020-10-06 15:57:46 +03:00
Ilya Lavrenov
984357bdef Moved WA for legacy includes to dev package (#1712)
* Moved WA for legacy includes to dev package

* Fixed compilation

* Fixed compilation

* Fixes
2020-10-06 15:04:53 +03:00
Vladimir Gavrilov
554fb118e4 Added ONNX Resize-11 to supported layers in documentation (#2324)
* Commit.

* Fixed list of supported frameworks layers.

* Small fix.
2020-10-06 14:41:01 +03:00
Vitaliy Urusovskij
6949d93e42 Add "cl_cache" preparation in test_timetest.py (#2490) 2020-10-06 14:16:50 +03:00
Alexander Zhogov
170782b1c8 GitHub CI: Add ShellCheck (#2554)
* Add shellcheck
* Remove fetchDepth: 1
2020-10-06 13:16:46 +03:00
Alexander Zhogov
53020f414c Azure CI: Add --gtest_filter=*smoke* (#2551) 2020-10-06 13:04:14 +03:00
Tomasz Dołbniak
14416405cc Re-enable more unit tests (Resize & Interpolate) (#2331) 2020-10-06 10:53:02 +02:00
Kamil Magierski
4c1ae9b339 [GNA] Issue 39975 - cascade concat fix (#2486)
* concat input not used fix rough implementation

* [GNA] Cascade concat input not assigned fix

* reduce copying in recursive function

* [GNA] Aligned cascade concat test
2020-10-06 11:01:19 +03:00
Kamil Magierski
0e62e5e17f [GNA] FIX CopyLayerPass for concat parent cases (#2485)
* [GNA] fix cases when layer output is used in both memory and concat parent layer

* coma fixes

* Issue-36189 CopyLayerPass for concat parent cases fix test

* Fix test for CPU

* Remove test for GPU
2020-10-06 11:00:38 +03:00
Kamil Magierski
8abdc32676 [GNA] Fix LSTM Cell channel C being 0 on output (#1174)
* [GNA] get output before activation test

[GNA] SubstituteScaleShiftBroadCastPass fix for cases when there are multiple scaleshifts as an output from the layer

[GNA] Generalize Fix where LSTMCell output was zero due to being fused into activation

[GNA] Fix LSTMCell being zero on channel C if being output layer

* linux build fix
2020-10-06 10:59:03 +03:00
Ilya Lavrenov
de1cc8af2e Shellcheck tests for bash scripts (#2532)
* Added bash scripts checks with shellcheck

* Fixed indentations

* Fixed setupvars.sh with shellcheck

* Fixed MO scripts

* Compilation with newer versions of shellcheck
2020-10-05 23:37:50 +03:00
Alina Kladieva
85dab59019 [Jenkinsfile] Bump infra (#2545) 2020-10-05 23:37:19 +03:00
Andrey Babushkin
65a9e0c8f3 Revert "Sync GNA lib calls to avoid multi threads and plugins crash (#2435)" (#2538)
This reverts commit 0879938250.
2020-10-05 18:11:14 +03:00
Vitaliy Urusovskij
05d70cfa43 Remove --collect_results_only (#2509)
* Remove CLI keys from README

* Remove `--collect_results_only` from MemCheckTests
2020-10-05 17:43:24 +03:00
Andrew Bakalin
f8fdd80830 [VPU][IE] Disable ConvertMinimum transformation for Myriad Plugin (#2437) 2020-10-05 14:18:43 +03:00
Konstantin Satunin
546c325a1f add test results publishing (#2513) 2020-10-05 12:52:00 +03:00
Pavel Esir
9149d899b3 [MO] Fix: add PermuteInputs to shape broadcasting (#2419)
* fix: add PermuteInputs to shape broadcasting

* fix type declaration typo
2020-10-05 12:48:57 +03:00
Krzysztof Bruniecki
0879938250 Sync GNA lib calls to avoid multi threads and plugins crash (#2435)
* Sync GNA lib calls to avoid multi threads and plugins crash

* Remove TODO

* Enable sync for GNA1

* Fix GNA1 sync

* Add core_threading_tests to GNA Plugin to address story 31709
2020-10-05 12:34:57 +03:00
Anton Pankratv
b21d0fe978 Removed similar behaviour tests (#2528) 2020-10-05 12:21:03 +03:00
Vladislav Vinogradov
605cf75901 [IE][TESTS][CMAKE] Add -Wno-deprecated-copy compile flag for GTest (#2514)
It fixes build on Ubuntu 20.04 with gcc 9.3.0.
2020-10-05 12:08:57 +03:00
Aleksandr Korolev
7f64984ed5 [IE TESTS] move MultipleAllocations test to nightly (#2512)
Co-authored-by: kora6 <kora6@github.com>
2020-10-05 11:46:34 +03:00
Ilya Churaev
5d291c3c84 [DOCS] Added an evaluate method for custom operation (#2273)
* Added an evaluate method for custom operation

* Fixed comments
2020-10-05 08:55:11 +03:00
Andrey Zaytsev
7535f80bd3 Feature/azaytsev/cherry pick pr2448 2469 2457 to master (#2515)
* Feature/azaytsev/cvs-38240 (#2469)

* Updated for 2020 version, replaced Ubuntu 16.04 with Ubuntu 20.04

* Updated the release package numbers

* Updated according to the comments in the ticket CVS-37827 (#2448)

* Update build-instruction.md for MacOsX (#2457)

* Update build-instruction.md for MacOsX

* Removed call of install_dependencies.sh from the steps
2020-10-03 14:00:24 +03:00
Zoe Cayetano
62a33f7f4b Update get_ov_update_message.py (#2499) 2020-10-02 23:19:54 +03:00
Sergey Shlyapnikov
534a7b81a9 [IE CLDNN] Fix eltwise fused ops in NO_PITCH_SAME_DIMS mode (#2454) 2020-10-02 16:52:00 +03:00
Sergey Shlyapnikov
6b456e58a1 [IE CLDNN] Fix unsupported dims number error (#2453) 2020-10-02 16:51:09 +03:00
Artemy Skrebkov
20c20ad87a Update fluid to 7c22cd49a7eb76ae1d9606672ee467fb52383de0 (#2407) (#2504)
* Update fluid to 7c22cd49a7eb76ae1d9606672ee467fb52383de0

   OpenCV 4.5.0

* Fix windows build
2020-10-02 13:15:10 +03:00
Irina Efode
229ca5e17b [IE Tests] Added test filters for gpuFuncTests target (#2496) 2020-10-02 12:13:23 +03:00
Irina Efode
13924f9e3b [IE Tests] Added test filters for cpuFuncTests target (#2495) 2020-10-02 12:13:07 +03:00
Irina Efode
a546d2d912 [IE Tests] Added test filters for gnaFuncTests target (#2492) 2020-10-02 12:11:36 +03:00
Irina Efode
3205108821 [IE Tests] Added test filters for myriadFuncTests target (#2494) 2020-10-02 12:11:21 +03:00
Sergey Nesterov
5d6c1a0140 [IE CLDNN] Changed the way of using fused ops to use activation appropriately (#2415) 2020-10-02 08:14:17 +03:00
Jedrzej Hajduczenia
d18073260b [IE CLDNN] Remove debug code from reference_convolve (#2493) 2020-10-02 08:09:39 +03:00
Roman Donchenko
0c79804bcd IECore.read_network: accept arbitrary PathLike objects and not just Path (#1611) 2020-10-01 20:34:11 +03:00
azhogov
6a87cbc8e2 Azure CI: Remove azure-pipelines.yml 2020-10-01 20:32:06 +03:00
Mateusz Bencer
7784b97bbc Relax shape inference for Split:v1 (#2444)
* Relaxed shape inference for Split

* added unit tests

* review remarks
2020-10-01 20:29:19 +03:00
Gleb Kazantaev
e3270b6b34 Move passes to CommonOptimizations (#2442)
* Move passes to CommonOptimizations

* Updated BN tests to use ranges for constant value generation

* Added some decomposition passes into legacy conversion

* Added WA for FQReshapeFusion pass
2020-10-01 20:08:41 +03:00
azhogov
3a5ba5581f Azure CI: Add separated pipelines for Windows, Linux, Mac 2020-10-01 18:43:19 +03:00
Andrey Dmitriev
949e23d0e8 [GNA]specific execution order for delayer copy layer (#2117)
[GNA]specific execution order for delayer copy layer + Test
2020-10-01 15:09:53 +03:00
Mikhail Kozlov
6ae332b072 Fix virtual class inheritance for single layer test detection output (#2472) 2020-10-01 14:34:04 +03:00
Kate Generalova
59ecc8279d doc: add docker ci link to README.md (#2483) 2020-10-01 13:17:50 +03:00
Mikhail Ryzhov
a7b1228e85 Hide input redirection error (#2473)
timeout cmd can throw an input redirection error in background mode.
Replaced default timeout() with custom function delay()
2020-10-01 12:27:31 +03:00
Mikhail Ryzhov
afd7d63466 Added closing braсket (#2466) (#2479)
Fixed syntax error (b4b03b1)
2020-10-01 12:26:56 +03:00
Egor Churaev
a05333217c Support operation Interpolate-4 in OpenVINO (#1596)
JIRA: 26973
2020-10-01 11:41:51 +03:00
Mikhail Ryzhov
6e3a69c3f1 Downgrade cmake for samples (#2372) (#2434)
* Downgrade cmake for samples

Downgraded cmake version to default version for Ubuntu 18.04

* Updated supported python version

The minimal python version in 2021.1 is 3.5

* Added notes about cmake requirements for samples and demo
2020-10-01 11:37:39 +03:00
Vitaliy Urusovskij
639052d0b8 Support references in test_timetest.py (#2431) 2020-10-01 11:35:57 +03:00
Vitaliy Urusovskij
c8530201dd Support DB reporting for test_timetest.py (#2359) 2020-10-01 08:39:19 +03:00
Alina Alborova
9ba4db7eae [Cherrypick] Remove the deprecation notice (#2408)
* cherry-pick 1/2

* Removed deprecation notice
2020-09-30 20:32:25 +03:00
Piotr Szmelczynski
55451266c6 Host tensor 2 vector refactor (#2443) 2020-09-30 16:20:41 +02:00
Mateusz Tabaka
fd80873fca Add support for custom ONNX GroupNorm operator (#2267) 2020-09-30 16:17:15 +02:00
helmutg
f858b0c46f drop unnecessary cmake dependency on ext_gtest (#2389)
ngraph_test_util links libgtest, which depends on ext_gtest already.

Co-authored-by: Helmut Grohne <helmut.grohne@intenta.de>
2020-09-30 16:01:11 +03:00
Andrey Zaytsev
d7d42f79be Replace absolute links to docs.openvinotoolkit.org by relative ones (#2439) (#2461)
* Replaced direct links to docs.openvinotoolkit.org with relative links

* Replaced direct links to docs.openvinotoolkit.org with relative links. Added GSGs for Win and macOS

* Minor fixes in GSGs

* Replaced direct links to docs.openvinotoolkit.org with relative links

* Removed links to OpenVINO markdown files that contain anchor - they don't work in the current implementation of the doc process

* Fixed Notes

* Removed links to OpenVINO markdown files that contain anchor - they don't work in the current implementation of the doc process

* fixed link to installing-openvino-linux.md
2020-09-30 14:00:19 +03:00
Vladislav Volkov
8f1ee05385 MKLDNN nodes factory improvements (#2252) 2020-09-30 11:31:19 +03:00
Eugene Smirnov
fecc7eac90 [GNA] fixed conversion from fp16 to fp32 networks in case of const blobs (#2446) 2020-09-29 19:44:12 +03:00
helmutg
266d275293 don't attempt to install an external tbb (#2390)
Co-authored-by: Vladislav Vinogradov <vlad.vinogradov@intel.com>

Co-authored-by: Helmut Grohne <helmut.grohne@intenta.de>
Co-authored-by: Vladislav Vinogradov <vlad.vinogradov@intel.com>
2020-09-29 19:22:41 +03:00
Konstantin Satunin
2d3d703445 Add wget retry (#2455)
* Add wget retry

Make CMake download more tolerant to network issues

* Sync log message
2020-09-29 19:10:04 +03:00
Rafal Blaczkowski
e4875f2a6b Add MSFT models to OpenVino ONNX CI check (#2377)
* Add MSFT models to OpenVino ONNX CI and update xfails

* Update paths

* Fix typo and update xfails

* Unset xfails to check current behavior

* Update:
* add MSFT models to preprocesing script
* update xfail names

* Final update of xfail test cases

* Update xfail paths

* Update xfails

* Uncomment part of preprocesing script

* Update script

* Add cleaning support for MSFT preprocesing

* Add -e option to script help

* Initilze variables

* Update ngraph/python/tests/test_onnx/model_zoo_preprocess.sh

Fix a mistake

Co-authored-by: Tomasz Socha <tomasz.socha@intel.com>

* Update ngraph/python/tests/test_onnx/model_zoo_preprocess.sh

align spaces

Co-authored-by: Tomasz Socha <tomasz.socha@intel.com>

Co-authored-by: Tomasz Socha <tomasz.socha@intel.com>
2020-09-29 19:05:31 +03:00
Anna Alberska
1cfa47cde8 [GNA] clear input scale factor from configuration for imported model (#2172)
* [GNA] clear input scale factor from configuration for imported model

* add test

* [GNA] add warning for using imported scale factors
2020-09-29 18:32:09 +03:00
Eugene Smirnov
2be6032c8d [IE][TESTS] Test params generator: fixed conversion from map of vectors into vectors of pairs in case of empty vector. (#2445) 2020-09-29 14:02:01 +03:00
Ilya Lavrenov
a5c01343c1 Added link options for cross-compilation (#2399) 2020-09-28 18:59:48 +03:00
Mateusz Tabaka
56a7a67dd2 Remove xfail_issue_36533 from ngraph tests (#2436) 2020-09-28 18:55:50 +03:00
Vladislav Vinogradov
d28a5d6c4f [CMAKE] Introduce FASTER_BUILD experimental feature (#2438)
It uses CMake 3.16 built-in utilities to speed up build time:

* Unity builds
* Precompiled headers

The feature is controlled via `ENABLE_FASTER_BUILD` CMake option (disabled by default).
The option avaialble only on CMake >= 3.16.
The feature is enabled per-target via `ie_faster_build` function.

Some observations:

* Don't have actual numbers for compile time, but subjectively can see
  speed up locally with VS 2019.
* Unity builds gives much more effect, but has some restriction on source files,
  so are not used everywhere.
2020-09-28 18:53:11 +03:00
Andrey Markelov
63fbe78d76 Fix tile layer test header (#2315) 2020-09-28 17:13:49 +03:00
Evgeny Latkin
4dd1d57ccf [IE][VPU]: Disables data type check of temp buffer in LSTMCell (#2423) 2020-09-28 12:36:44 +03:00
Mateusz Bencer
3e2a131441 Added support of external data for ONNX Importer (#2303) 2020-09-28 11:08:36 +02:00
Anton Pankratv
c8233b7b7c Fixed canStartSeveralAsyncInsideCompletionCallbackWithSafeDtor (#2404) 2020-09-28 11:08:34 +03:00
Krzysztof Bruniecki
a14e12ee63 Return REQUEST_NOT_READY if GNA Wait returns busy status (#2401)
* Return REQUEST_NOT_READY if GNA Wait returns busy status

* Apply fixes from review
2020-09-28 10:22:23 +03:00
Anton Pankratv
863a7bd663 Holder test thread safe for all (#2425) 2020-09-25 21:12:24 +03:00
Andrew Bakalin
03d184726a [IE][VPU]: Supports I32 for some eltwise precisions + tests (#2364) 2020-09-25 18:29:34 +03:00
Aleksandr Korolev
eda9498b79 [IE][VPU]: Reduce tests execution time (#2378)
* [IE][VPU]: Reduce tests execution time

* [IE TESTS] Remove 'ConfigurePlugin()' from 'memory_LSTMCell.hpp'

* [IE VPU TESTS] Myriad conv layer tests was changed

Co-authored-by: Maksim Doronin <maksim.doronin@intel.com>
Co-authored-by: kora6 <kora6@github.com>
2020-09-25 14:24:12 +03:00
Vitaliy Urusovskij
0bd966ad08 Add fill_inputs step in timetests (#2413) 2020-09-25 14:08:03 +03:00
Pavel Esir
1c97b13e9a [MO] Add explicit broadcasting mode (#2077)
* [MO] Add explicit broadcasting mode

* corrected value broadcast, added nontrivial test cases

* added negative unit-tests

* added axes normalization and permute inputs

* corrected axes normalization

* Update model-optimizer/mo/utils/broadcasting.py

Co-authored-by: Evgenya Stepyreva <evgenya.stepyreva@intel.com>
2020-09-25 13:26:47 +03:00
Artemy Skrebkov
31ad2ddc46 Update setupvars to add path to XLink (#2371)
- Do not export KMB_INSTALL_DIR. It is exported by another script
2020-09-24 15:03:16 +03:00
Gladilov, Gleb
10df5907b5 [IE][VPU]: Fixes addCopyForOutputsInsideNetwork (#2393)
* [IE][VPU]: Fixes addCopyForOutputsInsideNetwork

In case of dynamic output with consumer pass tries
to connect output's shape with new intermediate data
twice: one at the moment of duplicateData call (successful)
and once more at the end of the pass manually. The second
try leads to error since child data is already connected.

Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>

* [IE][VPU]: Introduces tests on addCopyForOutputsInsideNetwork

Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>
2020-09-24 12:40:10 +03:00
Andrey Sokolov
cfb6fae2c9 [IE][VPU]: Reduces memory consumption by temporary buffers (#2317) 2020-09-24 12:27:44 +03:00
Ilya Lavrenov
071485b81d Fixed docs build on Windows (#2398) 2020-09-24 12:13:27 +03:00
Evgenya Stepyreva
97fad1cb35 [ nG transformation ] Const -> FQ -> Reshape fuse (#2388)
* [ nG transformation ] Const -> FQ -> Reshape fuse
	Ticket: 39124

* fix dtype incompatibility: uint64 vs size_t

* Review comments adressed
2020-09-24 11:44:08 +03:00
Anastasiya Ageeva
23373b5502 Added new GSG for macOS, made minor changes in Windows GSG (#2070)
* Added new GSG for macOS, made minor changes in Windows GSG

* Update get_started_macos.md
2020-09-24 00:17:50 +03:00
Piotr Szmelczynski
ac1a1e3e9f Bug fix (#2380)
* Change request.infer to use param_names instead of request._input_list because it fix the bug

* remove xfail mark

* remove xfail_issue_35893 form tests/ __init__.py

* Remove xfail_issue_35893. Add OnnxBackendNodeModelTest.test_convtranspose_3d_cpu to xfail_issue_38091

* Remove OnnxBackendNodeModelTest.test_convtranspose_3d_cpu from xfail_issue_38091 in test_backend.py
2020-09-23 17:54:59 +03:00
Gleb Kazantaev
30eeb1a5a0 Updated Transformation development doc (#2391) 2020-09-23 17:26:12 +03:00
Dmitrii Denisov
4a7f9ff86f Install dependency refactoring. (#2379) 2020-09-23 14:03:02 +03:00
Liubov Batanina
f8a17a1317 Changed pad data type (#2354) 2020-09-23 13:10:58 +03:00
Nikolay Tyukaev
101ef50f4e add doxygen doc build configurations and scripts (#1703)
* add doxygen doc build configurations

* fix layouts

* change the dl-streamer link

Co-authored-by: Nikolay Tyukaev <ntyukaev_lo@jenkins.inn.intel.com>
2020-09-23 11:15:02 +03:00
Katarzyna Mitrus
8f843c620a [ONNX] Update ONNX importer to use RNN/GRU Sequence ops (#2035) 2020-09-23 10:11:34 +02:00
Gleb Kazantaev
1afeb8470f Apply transformations to TI body recursively (#2114)
* Apply transformations to TI body recursively

* Add missing header
2020-09-23 09:46:28 +03:00
helmutg
2e6c95f389 fix hetero to stop using deprectaed pugixml methods (#2362)
Co-authored-by: Helmut Grohne <helmut.grohne@intenta.de>
2020-09-22 19:05:34 +03:00
Alexey Varyzgin
193bdb3195 [CPU BF16] FP32 exception was removed (#2326) 2020-09-22 18:19:50 +03:00
Anton Potapov
2ea02b2012 [PP GAPI] Split/Merge kernels; support for 8S, 16U, 16S, 32S (#2276)
- introduced type_dispatch primitive
 - refactored SplitX and MergeX kernels to use type_dispatch
 - extended SplitX and MergeX to support 8S, 16U, 16S, 32S types
2020-09-22 18:18:26 +03:00
Kamil Magierski
4ac8ac943b [GNA] Fix sporadic failures in IE tests (#2336)
* [GNA] Fix sporadic failures in IE tests
review comments impl

* [GNA] fix GNA1 segfault

* [GNA] GNA1 build fixes
2020-09-22 18:14:20 +03:00
Kamil Magierski
9fca26b21e [GNA] LSTMCell fixes (#2080) 2020-09-22 18:13:28 +03:00
Polina Mishanina
898d4ee8f0 Update md files. Add cpp in docs/examples (#1769)
* Update md files. Add cpp in docs/examples

* Normalize all the line endings

* Fix block_id in snippets

* Fix utf-8 encoding

* Add new folder for snippets

* Fix issues with compiling code from snippets

* Added conteiner iterator fix
2020-09-22 18:01:48 +03:00
Ilya Lavrenov
23c1c3b6ad Updated UWP toolchain (#2355) 2020-09-22 17:41:21 +03:00
Anton Potapov
f9c8b692fb [PP GAPI] Extended preprocessing graph to support precision conversions (#2290)
- not yet visible via plugin interface
- for resize non U8 input is converted to  FP32
- tests
2020-09-22 17:40:01 +03:00
Eugene Smirnov
079bf2b092 support for conversion between fp32 and fp16 types for ngraph_helpers (#2357) 2020-09-22 13:21:06 +03:00
Evgeny Latkin
171bf0fcc5 [IE][VPU]: Enables check of parameters count for LSTMCell (#2335) 2020-09-22 12:06:25 +03:00
Rafal Blaczkowski
15ebc443d0 Add timeout to OpenVino ONNX CI check (#2352)
* Test timeout

* Another test

* Final test

* Final version of timeout and cleaning containers after CI execution
2020-09-21 23:10:30 +03:00
Andrey Somsikov
4c51090f9b Fix link in SECURITY.md (#2259)
Co-authored-by: Alina Alborova <alina.alborova@intel.com>
2020-09-21 21:35:24 +03:00
Vitaliy Urusovskij
d48d2109dc Test timetest MVP (#2345) 2020-09-21 21:33:42 +03:00
Artyom Anokhov
5e4cd10568 install_NEO_OCL_driver: Added checking of installed packages before trying to remove them. Added quotes for echo. (#2351) 2020-09-21 17:35:49 +03:00
Bartosz Lesniewski
9af49a7f95 Reference ROIAlign-3 implementation (#2128) 2020-09-21 14:04:39 +02:00
Tomasz Socha
3f52e64c25 [nGraph] Use additional models logic to run ONNX Model Zoo (#2253) 2020-09-21 13:55:02 +02:00
Eugene Smirnov
f0b10bf071 [GNA] fake quantize single layer tests for GNA plugin (#2060)
* fake quantize single layer test for GNA plugin

* implemented fakequantize for fp32 case as an activation function

* added proper seed randomisation within single test run

* [GNA] [FAKEQUANTIZE] fixed ref-fp32 implementation on GNA to use nearbyint instead of roundf

* [GNA] [FAKEQUANTIZE] restored random seed

* [GNA][FAKEQUANTIZE] disabled 4d and integer tests for FakeQuantize

* [GNA][FAKEQUANTIZE]updated ngraph FakeQuantize builder to accept seed

* [GNA][FAKEQUANTIZE]aligned FP calculations order on GNA with reference ngraph - this however gives more error

* [CPU]build of FakeQuantise tests restored

* [TESTS][FAKEQUANTIZE] ignore extra inferRequests for disabled tests

* [GNA] Fixed legacy unit test failuers appeared due to extra check for possible segfault in import frames

* [GNA] adopted fuse multiple identities for FakeQunatize layer

* [GNA]fp32 runtime code review
2020-09-21 14:22:14 +03:00
Tomasz Dołbniak
dda6d9136b Backport of FQ+Mul transform to master (#2214)
* Backport of FQ+Mul transform to master

* Accept any type of input to FQ in the transformation

* Test the fusion when all FQ inputs are non-const

* Fusion test when only one output limit is const

* Test passing the output of FQ to second input of Mul
2020-09-21 13:21:27 +03:00
Alexander Perepelkin
c13ec24e1e Specify in and out precisions separately, add layouts for convolution (#2211)
* Specify in and out precisions separately, add layouts for convolution

* Align convolution layer tests instantiations with updated definition

* Align convolution layer tests instantiations with updated definition for template plugin

* net, in, out prcs

Co-authored-by: Mikhail Treskin <mikhail.treskin@intel.com>
2020-09-21 13:03:01 +03:00
Liubov Batanina
6839ef7699 Add TopK tests (#2165) 2020-09-21 11:37:22 +03:00
Vitaliy Urusovskij
babff1fd15 Extend timetest_infer pipeline with infer track and blob's support (#2298) 2020-09-21 02:09:41 +03:00
Evgenya Stepyreva
3bd46c0b21 [ DOC ] TF FakeQuantWithMinMaxVars(PerChannel) support (#2338) 2020-09-19 15:48:18 +03:00
Ivan Tikhonov
61a7cdde23 Introduce opset5, include GRU/RNN/LSTM Sequences to opset5 (#2265)
* introduce new opset5, include GRU/RNN/LSTM Sequences to opset5

* resolve review remarks
2020-09-18 21:26:21 +03:00
Anastasia Kuporosova
58d8de98cc [Python API Tests] Update ngraph and iecore tests (#2329)
Co-authored-by: Alexander Zhogov <alexander.zhogov@intel.com>
2020-09-18 19:42:36 +03:00
Evgeny Talanin
fe99e055f2 Bump cmake version to 3.13 (#2258) 2020-09-18 18:58:12 +03:00
Vitaliy Urusovskij
20266276ec New layout for time_tests (#2321)
* Change folders' layout for `time_tests`

* Refactoring of namings in `time_tests`
2020-09-18 18:53:49 +03:00
Andrey Sokolov
676ce76650 [IE][VPU]: Makes ROIAlign to use 2 stage pipeline (to support ma2485) (#2123) 2020-09-18 18:12:16 +03:00
Artyom Anokhov
1721a9cc5a install_NEO_OCL_driver: Updated exit codes, messages. Updated way to remove old driver on Ubuntu (#2334) 2020-09-18 17:49:06 +03:00
Ilya Lavrenov
147a508a51 fixes for UWP (#2255)
* UWP fixes

* Commented code for compilation with UWP

* Current state: compiled for DESKTOP_APP

* Fixes

* Added toolchain

* Enabled ONNX imported for Windows Store

* Updated toolchain

* Fixes

* Disable ONNX in case of UWP

* Fix for Windows Driver

* Applied style check

* Dynamic loading of GetDLLDirectory symbols

* Clean-up in the toolchain

* Updated mkldnn plugin cmake
2020-09-18 17:13:27 +03:00
Evgenya Stepyreva
cd391389ce [ MO ] Complete weights layout permutation (#2299)
* MO TF: FQPerChannel extractor

* [ MO ] Complete weights layout permutation

* removed deleted file out of BOM

* Bring back stashed changes

* Skip if no weights permutation

* Conditional permutation

* Comments
2020-09-18 14:42:16 +03:00
Tomasz Jankowski
8dcff4a741 fix move assignment operator of Shape class (#2280) 2020-09-18 11:19:12 +03:00
Tomasz Dołbniak
a0da3d360c Accept ONNX Constants with empty tensors (#2287) 2020-09-18 10:08:29 +02:00
Mateusz Tabaka
a34b6e38f3 ConvertPrecision - saturate Constant's value to std::numeric_limits<dst… (#2206)
* ConvertPrecision - saturate Constant's value to std::numeric_limits<dst_type>::lowest() if it's below that limit.

* Remove clamping to std::numeric_limits<int32_t>::lowest() in U32/U64 case
2020-09-18 10:56:11 +03:00
Ivan Tikhonov
1b7dfc6e4c Fix bidirectional mode in reference implementations of GRU/LSTM/RNN Sequences (#2264)
* fix bidirectional case in references of sequences ops, enable decomposition of bidirectional cases in CommonOptimizations

* introduce new opset5, include GRU/RNN/LSTM Sequences to opset5

* Revert "introduce new opset5, include GRU/RNN/LSTM Sequences to opset5"

This reverts commit 73c22a11db.
2020-09-18 10:14:01 +03:00
Evgeny Lazarev
93074590de Updated operations specification documents (2021.2) (#2270)
* Updated documentation structure and remove incorrect added files for Acosh-1, Asinh-1 and Atanh-1

* Fixed broken links
2020-09-18 08:16:14 +03:00
Ilya Lavrenov
73a31bad15 Fixed compilation without OpenCV (#2309) 2020-09-18 06:30:29 +03:00
Maksim Doronin
b0308d91a5 [IE][VPU]: Enable some DSR+Op tests (#2118)
* Introduced a new way to test DSR+Op cases
* Enabled DSR_Reduce, DSR_VariadicSplit, DSR_TopK, DSR_Scatter, DSR_Unsqueeze tests
* Other disabled tests are still disabled until reference function is implemented. Added related comments
* Reduce DSR+Op tests execution time via reducing tensor shapes
2020-09-17 23:52:16 +03:00
Artyom Anokhov
fecce756a4 setupvars: Updated notifications, fixed calling python in Windows case (#2319) 2020-09-17 21:20:12 +03:00
Dmitrii Denisov
2a9ec98d13 Glstreamer dependencies (#2292)
* Refactoring: install_openvino_dependencies.sh script

* Added python3-gi package

* Correcting typos

* Update install_openvino_dependencies.sh

Fixed libglib2.0-0 package location.
2020-09-17 16:43:03 +03:00
Artyom Anokhov
ab4fdfc671 install_openvino_dependencies: Updated copyrights (#2306)
setupvars.bat: Updated notification about incorrect Python version. Removed checking ICC2019
setupvars.sh: Removed logic with choosing higher version of installed Python. Added dynamic detecting python3 major and minor version for setting path. Add checking minimum required Python version(now 3.6)
2020-09-17 16:42:04 +03:00
Andrew Bakalin
8ebd3440c7 [IE][VPU]: Enable DTS for some eltwise operations (#2242)
* Enable DTS for Maximum, Minimum, Less, LogicalNot
2020-09-17 15:28:33 +03:00
Vladislav Vinogradov
60ad6edf32 [IE][CMAKE] Add some libraries to ie_developer export list (#2279)
The following libraries:

* `vpu_common_lib_test_static`
* `ieTestHelpers_s`

Those libraries might be helpful for standalone plugins tests.
2020-09-17 15:24:19 +03:00
Vladimir Gavrilov
f30656ed6d Fixing bugs in nGraph reference implementation of Interpolate-4 (#2204)
* Now coordinate_transformation_mode used for all axes in the 'nearest' mode.

* Temporarily added tests for Interpolate-4 evaluate().

* Deleted temporarily added tests.

* Fixed documentation for the 'nearest' mode.

* Small fixes.

* Disabled Interpolate-4 layer tests for CPU.

* Disabled some Interpolate-4 CPU tests.

* do not change index table when execute each time

* layout check added

* interpolate for no batch size even scale is 1

* coordinate transformation with div scale, not multiple 1/scale, for higher accuracy

* disable tests temporal

* test modification

* Some changes.

* Enabled some tests.
2020-09-17 14:15:57 +03:00
Mikhail Ryzhov
dbf8fbf9c6 Fixed c samples build (#2278)
* Fixed c samples build

fixed CVS-38816 - Failure to build samples in C

* Fixed issue with gflags
2020-09-17 13:51:23 +03:00
Vitaliy Urusovskij
383152db28 Fix TimeTests build and README (#2275)
* Fix searching of pipelines for `time_tests` build

* Add `realpath` use in README for IEDevPackage because of limitation

* Add `mkdir build && cd build` commands in README

* Rename `time-tests` to `time_tests` in README
2020-09-17 13:01:40 +03:00
Anton Pankratv
34636ba7dd Default Infer leads to correct infer request state (#1562) 2020-09-17 11:57:11 +03:00
Andrey Somsikov
e35b720e8f Fix time_tests gcc 4.8.5 build error (#2208) 2020-09-17 11:50:40 +03:00
Ivan Tikhonov
379158fc11 Move PriorBox to PriorBoxIE transformation from CommonOptimization pass (#2185)
* move PriorBox to PriorBoxIE transformation from CommonOptimization pass

* call initNodeInfo transformation before PriorToPriorIE

* update comments
2020-09-17 11:45:45 +03:00
Maxim Shevtsov
6b9376e0c6 Reverting devicePriorities to be vector and respect the order, as opposed to the incorrect (re (#2249)
cent?) refactoring that introduced the unordered_map that effectively ignores the priorities
2020-09-17 09:31:42 +03:00
Tomasz Dołbniak
304c37216a Clone a specific tag for pybind11 (#2297) 2020-09-16 23:04:47 +03:00
Nikolay Shchegolev
5e4377b250 [CPU] RNN layer. Blobs precision validation. (#2223) 2020-09-16 18:19:14 +03:00
Nikolay Shchegolev
1e5edf86a1 Statically analyzed issues. (#2274) 2020-09-16 18:09:59 +03:00
Irina Efode
12abb2eb49 [IE TESTS] CoreThreading_LoadNetwork tests were disabled for GPU plugin (#2245) 2020-09-16 16:46:02 +03:00
Piotr Szmelczynski
1337997134 Test refactor (#2225) 2020-09-16 15:33:02 +02:00
Alexey Suhov
fe49d5743b update OpenCV version to 4.5.0 (#2254)
* update OpenCV version to 4.5.0

* fix Azure pipelines
2020-09-16 16:13:41 +03:00
Ilya Churaev
ce9c171f46 Fixed KW warning and review issues (#2263) 2020-09-16 15:33:23 +03:00
Gorokhov Dmitriy
83e96891ca Revert "[IE TESTS] dynavic batch for mvn layer (#1010)" (#2257)
This reverts commit 2e3378c50f.
2020-09-16 14:11:48 +03:00
Evgeny Latkin
339cd5e49e [IE][VPU]: update firmware 1378 (#2182) 2020-09-16 13:51:33 +03:00
Andrew Bakalin
18521f2dcb [VPU] Fix K propagation through Reshape (#2184)
* [VPU][DTS] Fix K propagation through Reshape

* [VPU] Add test cases
2020-09-16 12:41:49 +03:00
Anton Potapov
d590144545 [PP GAPI] Addded tests to cover exisiting precision conversions done by (#1976)
some plugins

- added shared parameterized tests
- instantiated for template plugin
- instantiated for cpu plugin
- fixed CPU plugin to properly handle U16 input
- fixed CPU reverse_sequence primitive to alolw input/oputput tensors to
be in FP32 only
- updated ngraph test_simple_computation_on_ndarrays to not expect
failure on U16 input
2020-09-16 12:41:14 +03:00
Svetlana Dolinina
cdedc4af19 added check to avoid IR generation in case of wrong input shape (#2127)
* added check to avoid IR generation in case of wrong input shape

* review changes
2020-09-16 11:29:05 +03:00
Maxim Kurin
cb70ae064b [IE][VPU][OpenCL] 2021.1 release compiler (#2166) 2020-09-16 00:44:25 +03:00
Evgeny Talanin
83238b23db Revert "Eliminated invalid subgraphs (#2196)" (#2250)
This reverts commit 89a6f926a4.
2020-09-15 19:24:57 +03:00
Konstantin Satunin
25ba600db1 Added Public CI badge to main page (#2241) 2020-09-15 17:39:32 +03:00
Anna Alberska
3ecee2ce49 [GNA] fix scale factor calculation for unfused bias after fc (#2097)
* [GNA] fix scale factor calculation for unfused bias after fc

* change check

* add test

* apply requested changes

* cpplint fix

* apply test changes

* modify model for test to match ::op::
2020-09-15 16:04:06 +03:00
Mateusz Bencer
e55653b519 Fix running nG Python tests on Windows and update doc (#2162) 2020-09-15 15:02:48 +02:00
Gladilov, Gleb
6e0611566c [IE][VPU]: Merges transformations calls from LoadExeNetwork and Frontend (#2220)
Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>
2020-09-15 15:28:28 +03:00
Ilya Lavrenov
9ca5fbaf02 Reshape v7: remove (#1379)
* Removed shape inference fr IR v7 and older

* Disabled dynamic batch tests which require reshape

* Fixes tests 2

* Disabled MKLDNN tests with convolution reshape

* Fixed GPU tests

* Disable VPU tests with batch size > 1 for old IRs

* Removed most of shape infer functions for old representation

* Removed most of CNNLayer validators

* Fixed validators and keep only parseParams

* Removed tests on invalid IR v7

* Disabled more VPU tests

* Removed Backetize validator

* Disable one more Myriad tests case where reshape for old IR is needed

* Removed useless reshape

* Need to replace GRUCell with Unique

* Moved shape infer functions for experimental layers to Core IE

* Fixed shape inference functions not to depend on legacy

* Added missed SparseToDense

* Added descriptive error message

* Fixed comments
2020-09-15 15:08:17 +03:00
Roman Vyunov (Intel)
9e8b42ff95 [IE][VPU]: Workaround to support parameter Beta for layer Swish (#2205)
* Workaround to full support Swish layer. It is faster than native Swish for now.
2020-09-15 14:39:27 +03:00
Vladislav Vinogradov
a0938a92d4 [IE][TESTS] Fix compareRawBuffers and compareBlobData methods (#2222)
Use `<=` comparison instead of `<` with thresholds.
This allows to use `0` threshold for bit-exact comparison.
2020-09-15 14:04:47 +03:00
Anton Pankratv
89a6f926a4 Eliminated invalid subgraphs (#2196) 2020-09-15 14:03:24 +03:00
Ilya Churaev
e3174fa752 nGraph some KW fixes (#2102)
* Removed redundant methods

* Fixed KW for linux
2020-09-15 14:03:07 +03:00
Ilya Churaev
3cecc3ffbe Extend error message (#2175) 2020-09-15 14:02:42 +03:00
Ilya Churaev
1bae5504ca Fixed query network for networks with KSO (#2201)
* Added a test to reproduce QueryNetwork with KSO

* Fixed QueryNetwork for networks with KSO

* Added additional test
2020-09-15 14:02:15 +03:00
Ilya Churaev
baac903cdc Fixed output names for case with redundant ops before result (#2210) 2020-09-15 14:01:43 +03:00
Maksim Doronin
27c03b35be [IE][VPU]: Some KW fixes (#2142)
* Some KW fixes
* Fix printTo in vpu ngraph transformations
2020-09-15 12:42:16 +03:00
Denis Orlov
eea5acaacc [GNA] Safety fixes (#2158) 2020-09-15 11:24:17 +03:00
Gladilov, Gleb
e4f0d8053a [IE][VPU][Tests]: Enables tests on MergeSubsequentDSROperations (#2149)
Signed-off-by: Gladilov, Gleb <gleb.gladilov@intel.com>
2020-09-15 10:44:25 +03:00
Ivan Tikhonov
cd722d72df TensorIterator to RNN/GRU/LSTM Sequence transformation (#2146)
* ti to sequences transformations

* fix sequences to sequences ie conversion

* resolve review marks

* resolve review remarks, fix ti to sequences transformations to support batch > 1 if slice axis == 0

* temporary enable ngraph ti transformations for cpu plugin

* fix includes

* Revert "fix includes"

This reverts commit 6cf15b97be.

* Revert "temporary enable ngraph ti transformations for cpu plugin"

This reverts commit fd528d7216.

* delete todo comments
2020-09-15 10:11:51 +03:00
Edward Shogulin
ac2370b420 [LPT] Copy constant with several outputs before blob update (cherry-pick to master) (#2198)
* [LPT] Copy constant implementation

* [LPT] the same Constant ops as FQ interval boundaries
2020-09-15 09:18:58 +03:00
Artyom Anokhov
ff3c5fce99 setupvars: update logic for setting path-like vars in case if they are empty. Updated copyrights. (#2229) 2020-09-14 19:49:57 +03:00
Svetlana Dolinina
43d6bf045b GatherTree description was extended and outdated link fixed (#2167)
* add more alrifications to description

* move clarification to comment

* pseudo code become more accurate

* review changes
2020-09-14 19:49:29 +03:00
Alexey Suhov
5d59a112d7 Revert "update OpenCV version to 4.5.0"
This reverts commit 5d229a4564.
2020-09-14 18:47:19 +03:00
Alexey Suhov
5d229a4564 update OpenCV version to 4.5.0 2020-09-14 17:58:39 +03:00
Maxim Andronov
8cf84f58e7 [CPU] add check on equality of values IL and IH ranges (#2190) 2020-09-14 15:28:37 +03:00
Rafal Blaczkowski
706d2fe7c8 Add backend tests to ONNX OpenVino CI (#1972) 2020-09-14 13:07:47 +02:00
Andrey Somsikov
6d2424ddcf Define security policy (#2215) 2020-09-14 13:50:03 +03:00
Anastasia Kuporosova
f7ee106b21 [Python Tools] Fix several problems in cross-check-tool (#2170) 2020-09-14 13:49:01 +03:00
Evgenya Stepyreva
75601e62ed Super smart reshape: HC Reshape to 2D followed by MatMul (#2183)
* Initial commit

* [SSR] Reshape(2D)->MatMul constrain relaxation

* Moved common pattern mechanics to the common function

* Moving SmartReshape to CNNNetworkNgraphImpl ctors

* Review comment

* Tests
2020-09-14 13:45:27 +03:00
Andrey Somsikov
f84a6d97ac Split time-tests common library (#2173)
Split time-tests common library

Add a README.md with workflow description.
Defined "timetest_" suffix for all time tests.
Applied clang-format-9 and added a README.md

Co-authored-by: Alina Alborova <alina.alborova@intel.com>
2020-09-14 09:04:49 +03:00
Evgenya Stepyreva
1007b05104 [DOC] Reshape feature (#2023)
* [DOC] Reshape feature

* Comments adressed.

* Clarifications

* Converting_Model_General.md

* Update ShapeInference.md

* Update ShapeInference.md

* Comments

* Update Convert_Object_Detection_API_Models.md

Co-authored-by: Andrey Zaytsev <andrey.zaytsev@intel.com>
2020-09-11 21:41:42 +03:00
Gleb Kazantaev
1f555149dd Added type info for transformations (#2116) 2020-09-11 15:38:43 +03:00
Anton Chetverikov
e6e7f5158a Fix Mish and SoftPlus value propagation functions (#2120)
* Fix Mish and SoftPlus value propagation functions

* Add unit tests for SoftPlus & Mish operations value propagation functions
2020-09-11 12:58:14 +03:00
Anastasia Kuporosova
1fd2df6e0d [PYTHON API TESTS] Add ngraph tests (#2132)
Co-authored-by: Alexander Zhogov <alexander.zhogov@intel.com>
2020-09-11 12:56:57 +03:00
Vladislav Volkov
ba254d7669 Fix for static PartialShape detection algorithm (#2106) 2020-09-11 06:15:24 +03:00
Ivan Tikhonov
a20d7ba384 Added callback to disable PriorBox to PriorBoxIE transformation (#2159)
* move priorbox to ie transformations to Opset1ToLegacyOpset pipeline

* fix typo

* Revert "fix typo"

This reverts commit 4077a78cbd.

* Revert "move priorbox to ie transformations to Opset1ToLegacyOpset pipeline"

This reverts commit 910e41ff20.

* add functionality to disable prior box to ie transformation

* fix callback
2020-09-11 06:12:14 +03:00
Sergey Shlyapnikov
f157319792 [IE CLDNN] Memory allocation optimizations (#2007) 2020-09-10 23:18:26 +03:00
Evgeny Talanin
e23f575847 Add exposing function signatures via Cython (#2024) 2020-09-10 19:58:45 +03:00
Vitaliy Urusovskij
a8f8ab8c12 Implement run_executable.py to run TimeTests several times (#2125) 2020-09-10 19:41:23 +03:00
7877 changed files with 406706 additions and 298618 deletions

View File

@@ -0,0 +1,53 @@
# Copyright (C) 2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
"""
Analyze GTest logs
"""
import re
from argparse import ArgumentParser
def get_passed_tests(log_file_path):
"""Gets passed tests with OK status"""
ok_test_line_pattern = "[ OK ] "
ok_tests = []
with open(log_file_path) as log_file_obj:
for line in log_file_obj.readlines():
if ok_test_line_pattern in line:
ok_tests.append(line.split(ok_test_line_pattern)[1])
return ok_tests
def get_total_time(tests):
"""Gets total execution time (sec)"""
re_compile_time = re.compile(r".+ \(([0-9]+) ms\)")
total_time = 0.0
for test in tests:
re_time = re_compile_time.match(test)
if re_time:
total_time += int(re_time.group(1)) / 1000
else:
print("No time in the test line:", test)
return total_time
def main():
"""The main entry point function"""
arg_parser = ArgumentParser()
arg_parser.add_argument(
"--log-file", metavar="PATH", default="gtest.log", help="Path to GTest log file"
)
args = arg_parser.parse_args()
passed_tests = get_passed_tests(args.log_file)
print("PASSED tests count:", len(passed_tests))
print("Total execution time of passed tests (sec):", get_total_time(passed_tests))
print("\nPASSED tests:")
print("".join(sorted(passed_tests)))
if __name__ == "__main__":
main()

205
.ci/azure/linux.yml Normal file
View File

@@ -0,0 +1,205 @@
resources:
repositories:
- repository: openvino_contrib
type: github
endpoint: openvinotoolkit
name: openvinotoolkit/openvino_contrib
ref: releases/2021/3
- repository: testdata
type: github
endpoint: openvinotoolkit
name: openvinotoolkit/testdata
ref: releases/2021/3
jobs:
- job: Lin
# About 150% of total time
timeoutInMinutes: 90
pool:
name: LIN_VMSS_VENV_F16S_WU2
variables:
system.debug: true
VSTS_HTTP_RETRY: 5
VSTS_HTTP_TIMEOUT: 200
WORKERS_NUMBER: 16
BUILD_TYPE: Release
REPO_DIR: $(Build.Repository.LocalPath)
OPENVINO_CONTRIB_REPO_DIR: $(REPO_DIR)/../openvino_contrib
MODELS_PATH: $(REPO_DIR)/../testdata
WORK_DIR: $(Pipeline.Workspace)/_w
BUILD_DIR: $(WORK_DIR)/build
BIN_DIR: $(REPO_DIR)/bin/intel64/$(BUILD_TYPE)
INSTALL_DIR: $(WORK_DIR)/install_pkg
SETUPVARS: $(INSTALL_DIR)/bin/setupvars.sh
steps:
- script: |
curl -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2019-06-01"
whoami
uname -a
echo Python3 info ; which python3 ; python3 --version
echo Python info ; which python ; python --version
echo Java info ; which java ; java -version
echo gcc info ; which gcc ; gcc --version
lsb_release
env
cat /proc/cpuinfo
cat /proc/meminfo
cat /etc/fstab
vmstat -s
df
lsblk -o NAME,HCTL,SIZE,MOUNTPOINT | grep -i "sd"
free -h
displayName: 'System info'
- script: |
rm -rf $(WORK_DIR) ; mkdir $(WORK_DIR)
rm -rf $(BUILD_DIR) ; mkdir $(BUILD_DIR)
echo TargetBranch: $(System.PullRequest.TargetBranch)
echo SourceBranch: $(Build.SourceBranch)
displayName: 'Make dir'
- checkout: self
clean: true
lfs: false
submodules: recursive
path: openvino
- checkout: openvino_contrib
clean: true
lfs: false
submodules: recursive
path: openvino_contrib
- checkout: testdata
clean: true
lfs: true
path: testdata
- script: |
sudo apt --assume-yes install libusb-1.0-0-dev
python3 -m pip install -r $(REPO_DIR)/inference-engine/ie_bridges/python/requirements.txt
# For running Python API tests
python3 -m pip install -r $(REPO_DIR)/inference-engine/ie_bridges/python/src/requirements-dev.txt
# Speed up build
wget https://github.com/ninja-build/ninja/releases/download/v1.10.0/ninja-linux.zip
unzip ninja-linux.zip
sudo cp -v ninja /usr/local/bin/
# Speed up tests
git clone https://github.com/google/gtest-parallel.git
workingDirectory: $(WORK_DIR)
displayName: 'Install dependencies'
- task: CMake@1
inputs:
# CMake must get Python 3.x version by default
cmakeArgs: >
-GNinja
-DVERBOSE_BUILD=ON
-DENABLE_TEMPLATE_PLUGIN=ON
-DCMAKE_BUILD_TYPE=$(BUILD_TYPE)
-DENABLE_PYTHON=ON
-DPYTHON_EXECUTABLE=/usr/bin/python3.6
-DENABLE_TESTS=ON
-DENABLE_FASTER_BUILD=ON
-DIE_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)/modules
$(REPO_DIR)
workingDirectory: $(BUILD_DIR)
- script: ninja
workingDirectory: $(BUILD_DIR)
displayName: 'Build Lin'
- script: ls -alR $(REPO_DIR)/bin/
displayName: 'List files'
- script: cmake -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P cmake_install.cmake
workingDirectory: $(BUILD_DIR)
displayName: 'Install'
- script: $(BIN_DIR)/unit-test --gtest_print_time=1 --gtest_filter=-backend_api.config_unsupported:*IE_GPU* --gtest_output=xml:TEST-NGraphUT.xml
displayName: 'nGraph UT'
continueOnError: false
- script: $(BIN_DIR)/InferenceEngineUnitTests --gtest_print_time=1 --gtest_output=xml:TEST-InferenceEngineUnitTests.xml
displayName: 'IE UT old'
continueOnError: false
- script: $(BIN_DIR)/ieUnitTests --gtest_output=xml:TEST-ieUnitTests.xml
displayName: 'IE UT'
continueOnError: false
- script: $(BIN_DIR)/cpuUnitTests --gtest_output=xml:TEST-cpuUnitTests.xml
displayName: 'CPU UT'
continueOnError: false
- script: $(BIN_DIR)/gnaUnitTests --gtest_output=xml:TEST-gnaUnitTests.xml
displayName: 'GNA UT'
continueOnError: false
- script: $(BIN_DIR)/vpuUnitTests --gtest_output=xml:TEST-vpuUnitTests.xml
displayName: 'VPU UT'
continueOnError: false
- script: $(BIN_DIR)/onnxImporterUnitTests --gtest_output=xml:TEST-onnxImporterUnitTests.xml
displayName: 'ONNX Importer UT'
continueOnError: false
- script: $(BIN_DIR)/ieFuncTests --gtest_output=xml:TEST-ieFuncTests.xml
displayName: 'IE FuncTests'
continueOnError: false
- script: $(BIN_DIR)/templateFuncTests --gtest_filter=*smoke* --gtest_output=xml:TEST-templateFuncTests.xml
displayName: 'TEMPLATE FuncTests'
continueOnError: false
- script: $(BIN_DIR)/cpuFuncTests --gtest_filter=*smoke* --gtest_print_time=1 --gtest_output=xml:TEST-cpuFuncTests.xml
displayName: 'CPU FuncTests'
continueOnError: false
- script: $(BIN_DIR)/MklDnnBehaviorTests --gtest_output=xml:TEST-MklDnnBehaviorTests.xml
displayName: 'MklDnnBehaviorTests'
continueOnError: false
- script: |
export DATA_PATH=$(MODELS_PATH)
export MODELS_PATH=$(MODELS_PATH)
python3 $(WORK_DIR)/gtest-parallel/gtest-parallel $(BIN_DIR)/MklDnnFunctionalTests --workers=$(WORKERS_NUMBER) --dump_json_test_results=MklDnnFunctionalTests.json --gtest_filter=*smoke* -- --gtest_print_time=1
workingDirectory: $(WORK_DIR)
displayName: 'MklDnnFunctionalTests'
continueOnError: false
- script: |
export DATA_PATH=$(MODELS_PATH)
export MODELS_PATH=$(MODELS_PATH)
$(BIN_DIR)/InferenceEngineCAPITests --gtest_output=xml:TEST-InferenceEngineCAPITests.xml
displayName: 'IE CAPITests'
continueOnError: false
- script: |
export DATA_PATH=$(MODELS_PATH)
export MODELS_PATH=$(MODELS_PATH)
export LD_LIBRARY_PATH=$(BIN_DIR)/lib
export PYTHONPATH=$(BIN_DIR)/lib/python_api/python3.6
env
cd $(REPO_DIR)/inference-engine/ie_bridges/python/tests
pytest pytest --junitxml=TEST-PythonAPI.xml
displayName: 'Python API Tests'
continueOnError: false
enabled: false
- task: PublishTestResults@2
condition: always()
inputs:
testResultsFormat: 'JUnit' # Options: JUnit, NUnit, VSTest, xUnit, cTest
testResultsFiles: '**/TEST-*.xml'
#searchFolder: '$(BUILD_DIR)'
mergeTestResults: false # Optional
#failTaskOnFailedTests: false # Optional
#testRunTitle: 'Pre/Post-Commit' # Optional
buildPlatform: 'x64' # Optional
buildConfiguration: 'Linux' # Optional
#publishRunAttachments: true # Optional

View File

@@ -0,0 +1,87 @@
jobs:
- job: LinCC
# About 150% of total time
timeoutInMinutes: 90
pool:
name: LIN_VMSS_VENV_F16S_WU2
variables:
system.debug: true
VSTS_HTTP_RETRY: 5
VSTS_HTTP_TIMEOUT: 200
WORKERS_NUMBER: 16
BUILD_TYPE: Release
REPO_DIR: $(Build.Repository.LocalPath)
OPENVINO_CONTRIB_REPO_DIR: $(REPO_DIR)/../openvino_contrib
MODELS_PATH: $(REPO_DIR)/../testdata
WORK_DIR: $(Pipeline.Workspace)/_w
BUILD_DIR: $(WORK_DIR)/build
BIN_DIR: $(REPO_DIR)/bin/intel64/$(BUILD_TYPE)
INSTALL_DIR: $(WORK_DIR)/install_pkg
SETUPVARS: $(INSTALL_DIR)/bin/setupvars.sh
steps:
- script: |
curl -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2019-06-01"
whoami
uname -a
echo Python3 info ; which python3 ; python3 --version
echo Python info ; which python ; python --version
echo Java info ; which java ; java -version
echo gcc info ; which gcc ; gcc --version
lsb_release
env
cat /proc/cpuinfo
cat /proc/meminfo
cat /etc/fstab
vmstat -s
df
lsblk -o NAME,HCTL,SIZE,MOUNTPOINT | grep -i "sd"
free -h
displayName: 'System info'
- script: |
rm -rf $(WORK_DIR) ; mkdir $(WORK_DIR)
rm -rf $(BUILD_DIR) ; mkdir $(BUILD_DIR)
displayName: 'Make dir'
- checkout: self
clean: true
lfs: false
submodules: recursive
path: openvino
- script: |
sudo apt --assume-yes install libusb-1.0-0-dev
python3 -m pip install -r $(REPO_DIR)/inference-engine/ie_bridges/python/requirements.txt
# Speed up build
wget https://github.com/ninja-build/ninja/releases/download/v1.10.0/ninja-linux.zip
unzip ninja-linux.zip
sudo cp -v ninja /usr/local/bin/
workingDirectory: $(WORK_DIR)
displayName: 'Install dependencies'
- task: CMake@1
inputs:
cmakeArgs: >
-GNinja
-DVERBOSE_BUILD=ON
-DCMAKE_BUILD_TYPE=$(BUILD_TYPE)
-DENABLE_FASTER_BUILD=ON
-DENABLE_PROFILING_ITT=ON
-DSELECTIVE_BUILD=COLLECT
$(REPO_DIR)
workingDirectory: $(BUILD_DIR)
- script: ninja
workingDirectory: $(BUILD_DIR)
displayName: 'Build'
- script: ls -alR $(REPO_DIR)/bin/
displayName: 'List files'
- script: cmake -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P cmake_install.cmake
workingDirectory: $(BUILD_DIR)
displayName: 'Install'

View File

@@ -0,0 +1,82 @@
jobs:
- job: nGraph_ONNX_Lin
# About 300% of total time
timeoutInMinutes: 90
pool:
name: LIN_VMSS_VENV_ONNX_WU2
variables:
system.debug: true
VSTS_HTTP_RETRY: 5
VSTS_HTTP_TIMEOUT: 200
WORKERS_NUMBER: 8
BUILD_TYPE: Release
REPO_DIR: $(Build.Repository.LocalPath)
WORK_DIR: $(Pipeline.Workspace)/_w
MODELS_DIR: /mount/cinfsshare/onnxtestdata
TMP_DIR: /mnt/tmp
steps:
- script: |
curl -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2019-06-01"
whoami
uname -a
echo Python3 info ; which python3 ; python3 --version
echo Python info ; which python ; python --version
echo Java info ; which java ; java -version
echo gcc info ; which gcc ; gcc --version
lsb_release
env
cat /proc/cpuinfo
cat /proc/meminfo
cat /etc/fstab
vmstat -s
df
lsblk -o NAME,HCTL,SIZE,MOUNTPOINT | grep -i "sd"
free -h
displayName: 'System info'
- script: |
rm -rf $(WORK_DIR) ; mkdir $(WORK_DIR)
sudo rm -rf $(TMP_DIR) ; sudo mkdir $(TMP_DIR) ; sudo chmod 777 -R $(TMP_DIR)
sudo mkdir -p $(MODELS_DIR)
sudo apt --assume-yes install nfs-common
sudo mount -vvv -t nfs cinfsshare.file.core.windows.net:/cinfsshare/onnxtestdata $(MODELS_DIR) -o vers=4,minorversion=1,sec=sys
displayName: 'Make dirs'
- checkout: self
clean: true
lfs: false
submodules: recursive
path: openvino
- script: docker build --tag=openvino-onnx-ci-image --file=.ci/openvino-onnx/Dockerfile .
displayName: 'Docker build'
- script: ngraph/python/tests/test_onnx/model_zoo_preprocess.sh -d $(TMP_DIR) -o
displayName: 'Get models'
- script: |
##wget -O "$(TMP_DIR)/msft.zip" https://onnxruntimetestdata.blob.core.windows.net/models/20191107.zip
##unzip "$(TMP_DIR)/msft.zip" -d "$(MODELS_DIR)/msft"
#unzip "/mnt/onnxtestdata/models/20191107.zip" -d "$(MODELS_DIR)/msft"
#mv $(MODELS_DIR)/msft/opset9/LSTM_Seq_lens_unpacked/seq_lens_sorted $(MODELS_DIR)/msft/opset9/LSTM_Seq_lens_unpacked/test_data_set_0
#mv $(MODELS_DIR)/msft/opset9/LSTM_Seq_lens_unpacked/seq_lens_unsorted $(MODELS_DIR)/msft/opset9/LSTM_Seq_lens_unpacked/test_data_set_1
displayName: 'Get MSFT models'
enabled: false
- script: |
ls -alR $(MODELS_DIR)
ls -alR $(TMP_DIR)
displayName: 'List models'
enabled: false
- script: sudo fallocate -l 48G /swapfile ; sudo mkswap /swapfile ; sudo swapon /swapfile ; df ; free -h
displayName: 'Create swap'
- script: |
docker run --name openvino-onnx-ci-container --volume $(TMP_DIR)/model_zoo:/root/.onnx/model_zoo --volume $(MODELS_DIR)/msft:/root/.onnx/model_zoo/MSFT openvino-onnx-ci-image
displayName: 'Docker run'

172
.ci/azure/mac.yml Normal file
View File

@@ -0,0 +1,172 @@
resources:
repositories:
- repository: openvino_contrib
type: github
endpoint: openvinotoolkit
name: openvinotoolkit/openvino_contrib
ref: releases/2021/3
- repository: testdata
type: github
endpoint: openvinotoolkit
name: openvinotoolkit/testdata
ref: releases/2021/3
jobs:
- job: Mac
# About 250% of total time (perfomace of Mac hosts is unstable, 360 is max)
timeoutInMinutes: 360
pool:
vmImage: 'macOS-10.15'
variables:
system.debug: true
VSTS_HTTP_RETRY: 5
VSTS_HTTP_TIMEOUT: 200
WORKERS_NUMBER: 3
BUILD_TYPE: Release
REPO_DIR: $(Build.Repository.LocalPath)
OPENVINO_CONTRIB_REPO_DIR: $(REPO_DIR)/../openvino_contrib
MODELS_PATH: $(REPO_DIR)/../testdata
WORK_DIR: $(Pipeline.Workspace)/_w
BUILD_DIR: $(WORK_DIR)/build
BIN_DIR: $(REPO_DIR)/bin/intel64/$(BUILD_TYPE)
INSTALL_DIR: $(WORK_DIR)/install_pkg
SETUPVARS: $(INSTALL_DIR)/bin/setupvars.sh
steps:
- script: |
whoami
uname -a
which python3
python3 --version
which java
java -version
gcc --version
xcrun --sdk macosx --show-sdk-version
env
sysctl -a
displayName: 'System info'
- script: |
rm -rf $(WORK_DIR) ; mkdir $(WORK_DIR)
rm -rf $(BUILD_DIR) ; mkdir $(BUILD_DIR)
displayName: 'Make dir'
- checkout: self
clean: true
lfs: false
submodules: recursive
path: openvino
- checkout: openvino_contrib
clean: true
lfs: false
submodules: recursive
path: openvino_contrib
- checkout: testdata
clean: true
lfs: true
path: testdata
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
- script: |
brew install cython
brew install automake
# Speed up build
brew install ninja
# Speed up tests
git clone https://github.com/google/gtest-parallel.git
workingDirectory: $(WORK_DIR)
displayName: 'Install dependencies'
- script: |
export PATH="/usr/local/opt/cython/bin:$PATH"
export CC=gcc
export CXX=g++
# Disable errors with Ninja
export CXXFLAGS="-Wno-error=unused-command-line-argument"
export CFLAGS="-Wno-error=unused-command-line-argument"
cmake -GNinja -DVERBOSE_BUILD=ON -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_PYTHON=ON -DENABLE_TESTS=ON -DIE_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)/modules $(REPO_DIR)
workingDirectory: $(BUILD_DIR)
displayName: 'CMake'
- script: ninja
workingDirectory: $(BUILD_DIR)
displayName: 'Build Mac'
- script: ls -alR $(REPO_DIR)/bin/
displayName: 'List files'
- script: cmake -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P cmake_install.cmake
workingDirectory: $(BUILD_DIR)
displayName: 'Install'
- script: $(BIN_DIR)/unit-test --gtest_print_time=1 --gtest_filter=-backend_api.config_unsupported:*IE_GPU*:IE_CPU.onnx_model_sigmoid:IE_CPU/GRUSequenceOp.onnx_model_gru* --gtest_output=xml:TEST-NGraphUT.xml
displayName: 'nGraph UT'
continueOnError: false
- script: $(BIN_DIR)/InferenceEngineUnitTests --gtest_print_time=1 --gtest_filter=-MKLDNNGraphStructureTests.TestNoRedundantReordersBeforeDWConvolution:TestConvolution/MKLDNNGraphConvolutionTests.TestsConvolution/0:TestConvolutionDefaultPrimitivesPriority/MKLDNNGraphConvolutionTests.TestsConvolution/0 --gtest_output=xml:TEST-InferenceEngineUnitTests.xml
displayName: 'IE UT old'
continueOnError: false
- script: $(BIN_DIR)/ieUnitTests --gtest_output=xml:TEST-ieUnitTests.xml
displayName: 'IE UT'
continueOnError: false
- script: $(BIN_DIR)/cpuUnitTests --gtest_output=xml:TEST-cpuUnitTests.xml
displayName: 'CPU UT'
continueOnError: false
- script: $(BIN_DIR)/vpuUnitTests --gtest_output=xml:TEST-vpuUnitTests.xml
displayName: 'VPU UT'
continueOnError: false
- script: $(BIN_DIR)/onnxImporterUnitTests --gtest_output=xml:TEST-onnxImporterUnitTests.xml
displayName: 'ONNX Importer UT'
continueOnError: false
- script: $(BIN_DIR)/ieFuncTests --gtest_output=xml:TEST-ieFuncTests.xml
displayName: 'IE FuncTests'
continueOnError: false
- script: $(BIN_DIR)/cpuFuncTests --gtest_filter=*smoke* --gtest_print_time=1 --gtest_output=xml:TEST-cpuFuncTests.xml
displayName: 'CPU FuncTests'
continueOnError: false
- script: $(BIN_DIR)/MklDnnBehaviorTests --gtest_output=xml:TEST-MklDnnBehaviorTests.xml
displayName: 'MklDnnBehaviorTests'
continueOnError: false
- script: |
export DATA_PATH=$(MODELS_PATH)
export MODELS_PATH=$(MODELS_PATH)
python3 $(WORK_DIR)/gtest-parallel/gtest-parallel $(BIN_DIR)/MklDnnFunctionalTests --workers=$(WORKERS_NUMBER) --dump_json_test_results=MklDnnFunctionalTests.json --gtest_filter=*smoke*:-smoke_MobileNet/ModelTransformationsTest.LPT/mobilenet_v2_tf_depthwise_batch1_inPluginDisabled_inTestDisabled_asymmetric* -- --gtest_print_time=1
workingDirectory: $(WORK_DIR)
displayName: 'MklDnnFunctionalTests'
continueOnError: false
- script: |
export DATA_PATH=$(MODELS_PATH)
export MODELS_PATH=$(MODELS_PATH)
$(BIN_DIR)/InferenceEngineCAPITests --gtest_output=xml:TEST-InferenceEngineCAPITests.xml
displayName: 'IE CAPITests'
continueOnError: false
- task: PublishTestResults@2
condition: always()
inputs:
testResultsFormat: 'JUnit' # Options: JUnit, NUnit, VSTest, xUnit, cTest
testResultsFiles: '**/TEST-*.xml'
#searchFolder: '$(BUILD_DIR)'
mergeTestResults: false # Optional
#failTaskOnFailedTests: false # Optional
#testRunTitle: 'Pre/Post-Commit' # Optional
buildPlatform: 'x64' # Optional
buildConfiguration: 'Mac' # Optional
#publishRunAttachments: true # Optional

212
.ci/azure/windows.yml Normal file
View File

@@ -0,0 +1,212 @@
resources:
repositories:
- repository: openvino_contrib
type: github
endpoint: openvinotoolkit
name: openvinotoolkit/openvino_contrib
ref: releases/2021/3
- repository: testdata
type: github
endpoint: openvinotoolkit
name: openvinotoolkit/testdata
ref: releases/2021/3
jobs:
- job: Win
# About 150% of total time
timeoutInMinutes: 120
pool:
name: WIN_VMSS_VENV_F8S_WU2
variables:
system.debug: true
VSTS_HTTP_RETRY: 5
VSTS_HTTP_TIMEOUT: 200
WORKERS_NUMBER: 8
BUILD_TYPE: Release
REPO_DIR: $(Build.Repository.LocalPath)
OPENVINO_CONTRIB_REPO_DIR: $(REPO_DIR)\..\openvino_contrib
MODELS_PATH: $(REPO_DIR)\..\testdata
WORK_DIR: $(Pipeline.Workspace)\_w
BUILD_DIR: D:\build
BIN_DIR: $(REPO_DIR)\bin\intel64
MSVS_VARS_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
MSVC_COMPILER_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.24.28314\bin\Hostx64\x64\cl.exe
INSTALL_DIR: $(WORK_DIR)\install_pkg
SETUPVARS: $(INSTALL_DIR)\bin\setupvars.bat
IB_DIR: C:\Program Files (x86)\IncrediBuild
IB_TESTCONSOLE: $(IB_DIR)\IBTestConsole.exe
TEST_ENV_PATH: $(REPO_DIR)\inference-engine\temp\tbb\bin;$(REPO_DIR)\inference-engine\temp\opencv_4.5.2\opencv\bin;$(IB_DIR);%PATH%
steps:
- script: |
powershell -command "Invoke-RestMethod -Headers @{\"Metadata\"=\"true\"} -Method GET -Uri http://169.254.169.254/metadata/instance/compute?api-version=2019-06-01 | format-custom"
where python3
where python
python --version
where java
java -version
wmic computersystem get TotalPhysicalMemory
wmic cpu list
wmic logicaldisk get description,name
wmic VOLUME list
set
displayName: 'System info'
- script: |
rd /Q /S $(WORK_DIR) & mkdir $(WORK_DIR)
rd /Q /S $(BUILD_DIR) & mkdir $(BUILD_DIR)
displayName: 'Make dir'
- script: |
certutil -urlcache -split -f https://incredibuilddiag1wu2.blob.core.windows.net/incredibuild/install_ib_console.bat install_ib_console.bat
call install_ib_console.bat
workingDirectory: $(WORK_DIR)
displayName: 'Install IncrediBuild'
- checkout: self
clean: true
lfs: false
submodules: recursive
path: openvino
- checkout: openvino_contrib
clean: true
lfs: false
submodules: recursive
path: openvino_contrib
- checkout: testdata
clean: true
lfs: true
path: testdata
- script: |
certutil -urlcache -split -f https://github.com/ninja-build/ninja/releases/download/v1.10.0/ninja-win.zip ninja-win.zip
powershell -command "Expand-Archive -Force ninja-win.zip"
git clone https://github.com/google/gtest-parallel.git
workingDirectory: $(WORK_DIR)
displayName: 'Install dependencies'
- script: |
set PATH=$(WORK_DIR)\ninja-win;%PATH%
call "$(MSVS_VARS_PATH)" && cmake -GNinja -DENABLE_FASTER_BUILD=ON -DENABLE_TEMPLATE_PLUGIN=ON -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_TESTS=ON -DIE_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)\modules -DCMAKE_C_COMPILER:PATH="$(MSVC_COMPILER_PATH)" -DCMAKE_CXX_COMPILER:PATH="$(MSVC_COMPILER_PATH)" $(REPO_DIR)
workingDirectory: $(BUILD_DIR)
displayName: 'CMake'
- script: |
set PATH=$(WORK_DIR)\ninja-win;%PATH%
call "$(MSVS_VARS_PATH)" && "C:\Program Files (x86)\IncrediBuild\BuildConsole.exe" /COMMAND="ninja"
workingDirectory: $(BUILD_DIR)
displayName: 'Build Win'
- script: dir $(REPO_DIR)\bin\ /s
displayName: 'List files'
- script: cmake -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P cmake_install.cmake
workingDirectory: $(BUILD_DIR)
displayName: 'Install'
- script: |
set PATH=$(TEST_ENV_PATH)
$(BIN_DIR)\unit-test --gtest_print_time=1 --gtest_filter=-backend_api.config_unsupported:*IE_GPU* --gtest_output=xml:TEST-NGraphUT.xml
displayName: 'nGraph UT'
continueOnError: false
- script: |
set PATH=$(TEST_ENV_PATH)
"$(IB_TESTCONSOLE)" $(BIN_DIR)\InferenceEngineUnitTests.exe --gtest_output=xml:TEST-InferenceEngineUnitTests-IB.xml
displayName: 'IE UT old - IB'
- script: |
set PATH=$(TEST_ENV_PATH)
$(BIN_DIR)\ieUnitTests --gtest_output=xml:TEST-ieUnitTests.xml
displayName: 'IE UT'
continueOnError: false
- script: |
set PATH=$(TEST_ENV_PATH)
$(BIN_DIR)\cpuUnitTests --gtest_output=xml:TEST-cpuUnitTests.xml
displayName: 'CPU UT'
continueOnError: false
- script: |
set PATH=$(TEST_ENV_PATH)
$(BIN_DIR)\gnaUnitTests --gtest_output=xml:TEST-gnaUnitTests.xml
displayName: 'GNA UT'
continueOnError: false
- script: |
set PATH=$(TEST_ENV_PATH)
$(BIN_DIR)\vpuUnitTests --gtest_output=xml:TEST-vpuUnitTests.xml
displayName: 'VPU UT'
continueOnError: false
- script: |
set PATH=$(TEST_ENV_PATH)
$(BIN_DIR)\onnxImporterUnitTests --gtest_output=xml:TEST-onnxImporterUnitTests.xml
displayName: 'ONNX Importer UT'
continueOnError: false
- script: |
set PATH=$(TEST_ENV_PATH)
$(BIN_DIR)\ieFuncTests --gtest_output=xml:TEST-ieFuncTests.xml
displayName: 'IE FuncTests'
continueOnError: false
- script: |
set PATH=$(TEST_ENV_PATH)
$(BIN_DIR)\templateFuncTests --gtest_output=xml:TEST-templateFuncTests.xml
displayName: 'TEMPLATE FuncTests'
continueOnError: false
- script: |
set PATH=$(TEST_ENV_PATH)
"$(IB_TESTCONSOLE)" $(BIN_DIR)\cpuFuncTests.exe --gtest_filter=*smoke*:-*CompareWithRefs/base_size=16_pre_nms_topn=100_post_nms_topn=100_nms_thresh=0.7_feat_stride=1_min_size=1_ratio* --gtest_output=xml:TEST-cpuFuncTests-IB.xml /testlevel=24
displayName: 'CPU FuncTests - IB'
continueOnError: false
- script: |
set PATH=$(TEST_ENV_PATH)
$(BIN_DIR)\MklDnnBehaviorTests --gtest_output=xml:TEST-MklDnnBehaviorTests.xml
displayName: 'MklDnnBehaviorTests'
continueOnError: false
# Add for gtest-parallel, it hangs now (CVS-33386)
#python $(WORK_DIR)\gtest-parallel\gtest-parallel $(BIN_DIR)\MklDnnFunctionalTests --workers=$(WORKERS_NUMBER) --dump_json_test_results=MklDnnFunctionalTests.json --gtest_filter=*smoke* -- --gtest_print_time=1
- script: |
set PATH=$(TEST_ENV_PATH)
set DATA_PATH=$(MODELS_PATH)
set MODELS_PATH=$(MODELS_PATH)
rem "$(IB_TESTCONSOLE)" $(BIN_DIR)\MklDnnFunctionalTests.exe --gtest_filter=*smoke* --gtest_output=xml:TEST-MklDnnFunctionalTests-IB.xml
$(BIN_DIR)\MklDnnFunctionalTests.exe --gtest_filter=*smoke* --gtest_output=xml:TEST-MklDnnFunctionalTests.xml
displayName: 'MklDnnFunctionalTests'
continueOnError: false
- script: |
set PATH=$(TEST_ENV_PATH)
set DATA_PATH=$(MODELS_PATH)
set MODELS_PATH=$(MODELS_PATH)
$(BIN_DIR)\InferenceEngineCAPITests --gtest_output=xml:TEST-InferenceEngineCAPITests.xml
displayName: 'IE CAPITests'
continueOnError: false
- task: PublishTestResults@2
condition: always()
inputs:
testResultsFormat: 'JUnit' # Options: JUnit, NUnit, VSTest, xUnit, cTest
testResultsFiles: '**/TEST-*.xml'
#searchFolder: '$(BUILD_DIR)'
mergeTestResults: false # Optional
#failTaskOnFailedTests: false # Optional
#testRunTitle: 'Pre/Post-Commit' # Optional
buildPlatform: 'x64' # Optional
buildConfiguration: 'Windows' # Optional
#publishRunAttachments: true # Optional
- script: echo Stop IncrediBuild_Agent && net stop IncrediBuild_Agent
displayName: Stop IncrediBuild
continueOnError: true
enabled: false

View File

@@ -0,0 +1,89 @@
jobs:
- job: WinCC
# About 150% of total time
timeoutInMinutes: 120
pool:
name: WIN_VMSS_VENV_F8S_WU2
variables:
system.debug: true
VSTS_HTTP_RETRY: 5
VSTS_HTTP_TIMEOUT: 200
WORKERS_NUMBER: 8
BUILD_TYPE: Release
REPO_DIR: $(Build.Repository.LocalPath)
OPENVINO_CONTRIB_REPO_DIR: $(REPO_DIR)\..\openvino_contrib
MODELS_PATH: $(REPO_DIR)\..\testdata
WORK_DIR: $(Pipeline.Workspace)\_w
BUILD_DIR: D:\build
BIN_DIR: $(REPO_DIR)\bin\intel64
MSVS_VARS_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
MSVC_COMPILER_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.24.28314\bin\Hostx64\x64\cl.exe
INSTALL_DIR: $(WORK_DIR)\install_pkg
SETUPVARS: $(INSTALL_DIR)\bin\setupvars.bat
IB_DIR: C:\Program Files (x86)\IncrediBuild
IB_TESTCONSOLE: $(IB_DIR)\IBTestConsole.exe
TEST_ENV_PATH: $(REPO_DIR)\inference-engine\temp\tbb\bin;$(REPO_DIR)\inference-engine\temp\opencv_4.5.2\opencv\bin;$(IB_DIR);%PATH%
steps:
- script: |
powershell -command "Invoke-RestMethod -Headers @{\"Metadata\"=\"true\"} -Method GET -Uri http://169.254.169.254/metadata/instance/compute?api-version=2019-06-01 | format-custom"
where python3
where python
python --version
where java
java -version
wmic computersystem get TotalPhysicalMemory
wmic cpu list
wmic logicaldisk get description,name
wmic VOLUME list
set
displayName: 'System info'
- script: |
rd /Q /S $(WORK_DIR) & mkdir $(WORK_DIR)
rd /Q /S $(BUILD_DIR) & mkdir $(BUILD_DIR)
displayName: 'Make dir'
- script: |
certutil -urlcache -split -f https://incredibuilddiag1wu2.blob.core.windows.net/incredibuild/install_ib_console.bat install_ib_console.bat
call install_ib_console.bat
workingDirectory: $(WORK_DIR)
displayName: 'Install IncrediBuild'
- checkout: self
clean: true
lfs: false
submodules: recursive
path: openvino
- script: |
certutil -urlcache -split -f https://github.com/ninja-build/ninja/releases/download/v1.10.0/ninja-win.zip ninja-win.zip
powershell -command "Expand-Archive -Force ninja-win.zip"
workingDirectory: $(WORK_DIR)
displayName: 'Install dependencies'
- script: |
set PATH=$(WORK_DIR)\ninja-win;%PATH%
call "$(MSVS_VARS_PATH)" && cmake -GNinja -DENABLE_FASTER_BUILD=ON -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_PROFILING_ITT=ON -DSELECTIVE_BUILD=COLLECT -DCMAKE_C_COMPILER:PATH="$(MSVC_COMPILER_PATH)" -DCMAKE_CXX_COMPILER:PATH="$(MSVC_COMPILER_PATH)" $(REPO_DIR)
workingDirectory: $(BUILD_DIR)
displayName: 'CMake'
- script: |
set PATH=$(WORK_DIR)\ninja-win;%PATH%
call "$(MSVS_VARS_PATH)" && "C:\Program Files (x86)\IncrediBuild\BuildConsole.exe" /COMMAND="ninja"
workingDirectory: $(BUILD_DIR)
displayName: 'Build Win'
- script: dir $(REPO_DIR)\bin\ /s
displayName: 'List files'
- script: cmake -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P cmake_install.cmake
workingDirectory: $(BUILD_DIR)
displayName: 'Install'
- script: echo Stop IncrediBuild_Agent && net stop IncrediBuild_Agent
displayName: Stop IncrediBuild
continueOnError: true
enabled: false

View File

@@ -57,8 +57,6 @@ RUN cmake .. \
-DENABLE_OPENCV=OFF \
-DENABLE_CPPLINT=OFF \
-DENABLE_TESTS=OFF \
-DENABLE_BEH_TESTS=OFF \
-DENABLE_FUNCTIONAL_TESTS=OFF \
-DENABLE_MKL_DNN=ON \
-DENABLE_CLDNN=OFF \
-DENABLE_PROFILING_ITT=OFF \
@@ -75,9 +73,9 @@ RUN make -j $(nproc) install
# Run tests via tox
WORKDIR /openvino/ngraph/python
ENV NGRAPH_CPP_BUILD_PATH=/openvino/dist
ENV LD_LIBRARY_PATH=/openvino/dist/lib
ENV NGRAPH_CPP_BUILD_PATH=/openvino/dist/deployment_tools/ngraph
ENV LD_LIBRARY_PATH=/openvino/dist/deployment_tools/ngraph/lib
ENV NGRAPH_ONNX_IMPORT_ENABLE=TRUE
ENV PYTHONPATH=/openvino/bin/intel64/Release/lib/python_api/python3.8:${PYTHONPATH}
RUN git clone --recursive https://github.com/pybind/pybind11.git
RUN git clone --recursive https://github.com/pybind/pybind11.git -b v2.5.0 --depth 1
CMD tox

View File

@@ -4,6 +4,25 @@
DOCKER_CONTAINER_NAME= "openvino-onnx-ci-container"
DOCKER_IMAGE_TAG = "openvino-onnx-ci-image"
// workaround for aborting previous builds on PR update
@NonCPS
def stopPreviousRunningBuilds() {
def jobname = env.JOB_NAME
if (jobname.startsWith("onnx/openvino_ci/PR")){
def buildnum = env.BUILD_NUMBER.toInteger()
def job = Jenkins.instance.getItemByFullName(jobname)
def job_newest = job.builds.first()
for (build in job.builds.reverse()[0..<-1]) {
if (build.isBuilding()){
echo "Stop task = ${build} because newest #${job_newest} is on the way"
build.doStop();
continue;
}
}
}
}
def getGitPrInfo(String project) {
def gitPrInfo = [
prAuthorEmail : "",
@@ -58,7 +77,14 @@ def gitSubmoduleUpdate(String repository_name) {
}
}
def updateModels() {
sh """
./ngraph/python/tests/test_onnx/model_zoo_preprocess.sh -d ${HOME}/ONNX_CI/data -o
"""
}
def buildDockerImage() {
updateModels()
sh """
docker build --tag=${DOCKER_IMAGE_TAG} --file=.ci/openvino-onnx/Dockerfile \
--build-arg http_proxy=http://proxy-chain.intel.com:911/ \
@@ -68,11 +94,13 @@ def buildDockerImage() {
def runTests() {
sh """
docker run --rm --name ${DOCKER_CONTAINER_NAME} \
--volume ${HOME}/ONNX_CI/onnx_models/.onnx:/root/.onnx ${DOCKER_IMAGE_TAG}
docker run --name ${DOCKER_CONTAINER_NAME} \
--volume ${HOME}/ONNX_CI/data/model_zoo:/root/.onnx/model_zoo \
${DOCKER_IMAGE_TAG}
"""
}
pipeline {
agent {
label "OpenVino"
@@ -83,10 +111,12 @@ pipeline {
}
options {
skipDefaultCheckout true
timeout(activity: true, time: 60, unit: 'MINUTES')
}
stages {
stage("Clone repository") {
steps{
stopPreviousRunningBuilds()
dir("${WORKDIR}") {
checkout scm
}
@@ -95,12 +125,15 @@ pipeline {
}
stage("Prepare Docker environment") {
steps{
dir("${WORKDIR}") {
dir("${WORKDIR}") {
buildDockerImage()
}
}
}
stage("Run tests") {
options {
timeout(time: 60, unit: 'MINUTES')
}
steps{
runTests()
}
@@ -118,6 +151,7 @@ pipeline {
deleteDir()
sh """
docker image prune -f
docker rm -f ${DOCKER_CONTAINER_NAME}
"""
}
}

65
.ci/openvino-onnx/watchdog/Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,65 @@
// Copyright (C) 2018-2020 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
timeout(30)
{
node(LABEL) {
BUILD_WORKSPACE = "$WORKSPACE/$BUILD_NUMBER"
WATCHDOG_ROOT = "$BUILD_WORKSPACE/.ci/openvino-onnx/watchdog"
VENV_PATH = "${BUILD_WORKSPACE}/.wdvenv"
try {
stage("Clone repository") {
dir ("$BUILD_WORKSPACE") {
checkout([$class: 'GitSCM', branches: [[name: "*/$BRANCH"]],
doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CloneOption', timeout: 30]], submoduleCfg: [],
userRemoteConfigs: [[credentialsId: "${GITHUB_KEY}", url: "${OPEN_VINO_URL}"]]])
}
}
stage("Prepare environment") {
sh """#!/bin/bash
if [ ! -d ${VENV_PATH} ]; then
python3 -m venv ${VENV_PATH}
source ${VENV_PATH}/bin/activate
pip install -r ${WATCHDOG_ROOT}/requirements.txt
fi
"""
}
stage("Run script") {
withCredentials([
usernamePassword(credentialsId: '7157091e-bc04-42f0-99fd-dc4da2922a55',
usernameVariable: 'username',
passwordVariable: 'password')])
{
dir ("$BUILD_WORKSPACE") {
sh """#!/bin/bash
source ${VENV_PATH}/bin/activate
export PYTHONHTTPSVERIFY=0
python ${WATCHDOG_ROOT}/src/main.py \
--msteams-url=${MSTEAMS_URL_FILE} \
--github-credentials '${username}' '${password}' \
--github-org=${GITHUB_ORG} \
--github-project=${GITHUB_PROJECT} \
--jenkins-token=${JENKINS_TOKEN_FILE} \
--jenkins-server=${JENKINS_SERVER} \
--jenkins-user=${JENKINS_USER} \
--ci-job=${CI_JOB_NAME} \
--watchdog-job=${WATCHDOG_JOB_NAME}
"""
}
}
}
} catch (e) {
echo "$e"
currentBuild.result = "FAILURE"
} finally {
stage("Cleanup") {
sh """
cd $BUILD_WORKSPACE
rm -rf ..?* .[!.]* *
"""
}
}
}
}

View File

@@ -0,0 +1,6 @@
python-jenkins==1.7.0
retrying==1.3.3
pygithub==1.51
timeout-decorator==0.4.1
requests==2.23.0
wheel

View File

@@ -0,0 +1,108 @@
#!/usr/bin/python3
# Copyright (C) 2018-2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import logging
import timeout_decorator
from datetime import datetime
from retrying import retry
from github import Github, GithubException
# Logging
logging.basicConfig(format='%(name)s - %(levelname)s - %(message)s')
log = logging.getLogger(__name__)
log.setLevel(logging.INFO)
_RETRY_LIMIT = 3
_RETRY_COOLDOWN_MS = 2000
_REQUEST_TIMEOUT_S = 10
class GitWrapper:
"""Class wrapping PyGithub API.
The purpose of this class is to wrap methods from PyGithub API used in Watchdog, for less error-prone and
more convenient use. Docs for used API, including wrapped methods can be found at:
https://pygithub.readthedocs.io/en/latest/introduction.html
:param github_credentials: Credentials used for GitHub
:param repository: GitHub repository name
:param project: GitHub project name
:type github_credentials: String
:type repository: String
:type project: String
"""
def __init__(self, github_credentials, repository, project):
self.git = Github(*github_credentials)
self.repository = repository
self.project = project
self.github_credentials = github_credentials
@retry(stop_max_attempt_number=_RETRY_LIMIT, wait_fixed=_RETRY_COOLDOWN_MS)
def get_git_time(self):
"""Retrieve time from GitHub.
Used to reliably determine time during Watchdog run.
:return: Datetime object describing current time
:rtype: datetime
"""
try:
datetime_object = self._get_git_time()
except ValueError as e:
raise GitWrapperError(str(e))
except GithubException as e:
message = 'GitHub Exception during API status retrieval. Exception: {}'.format(str(e))
raise GitWrapperError(message)
except timeout_decorator.TimeoutError:
message = 'GitHub Exception during API status retrieval. Timeout during API request.'
raise GitWrapperError(message)
return datetime_object
@retry(stop_max_attempt_number=_RETRY_LIMIT, wait_fixed=_RETRY_COOLDOWN_MS)
def get_pull_requests(self):
"""Retrieve paginated list of pull requests from GitHub.
:return: Paginated list of Pull Requests in GitHub repo
:rtype: github.PaginatedList.PaginatedList of github.PullRequest.PullRequest
"""
try:
prs = self._get_pull_requests()
except GithubException as e:
message = 'GitHub Exception during API status retrieval. Exception: {}'.format(str(e))
raise GitWrapperError(message)
return prs
@timeout_decorator.timeout(_REQUEST_TIMEOUT_S)
def _get_git_time(self):
"""Private method retrieving time from GitHub.
:return: Datetime object describing current time
:rtype: datetime
"""
datetime_string = self.git.get_api_status().raw_headers.get('date', '')
datetime_format = '%a, %d %b %Y %H:%M:%S %Z'
datetime_object = datetime.strptime(datetime_string, datetime_format)
return datetime_object
@timeout_decorator.timeout(_REQUEST_TIMEOUT_S)
def _get_pull_requests(self):
"""Private method retrieving pull requests from GitHub.
:return: Paginated list of Pull Requests in GitHub repo
:rtype: github.PaginatedList.PaginatedList of github.PullRequest.PullRequest
"""
return self.git.get_organization(self.repository).get_repo(self.project).get_pulls()
class GitWrapperError(Exception):
"""Base class for exceptions raised in GitWrapper.
:param message Explanation of the error
"""
def __init__(self, message):
self.message = message
log.exception(message)

View File

@@ -0,0 +1,91 @@
#!/usr/bin/python3
# Copyright (C) 2018-2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import requests
import jenkins
import logging
from retrying import retry
# Logging
logging.basicConfig(format='%(name)s - %(levelname)s - %(message)s')
log = logging.getLogger(__name__)
log.setLevel(logging.INFO)
_RETRY_LIMIT = 3
_RETRY_COOLDOWN_MS = 5000
class JenkinsWrapper:
"""Class wrapping Python-Jenkins API.
The purpose of this class is to wrap methods from Python-Jenkins API used in Watchdog, for less error-prone and
more convenient use. Docs for used API, including wrapped methods can be found at:
https://python-jenkins.readthedocs.io/en/latest/
:param jenkins_token: Token used for Jenkins
:param jenkins_user: Username used to connect to Jenkins
:param jenkins_server: Jenkins server address
:type jenkins_token: String
:type jenkins_user: String
:type jenkins_server: String
"""
def __init__(self, jenkins_token, jenkins_user, jenkins_server):
self.jenkins_server = jenkins_server
self.jenkins = jenkins.Jenkins(jenkins_server, username=jenkins_user,
password=jenkins_token)
@retry(stop_max_attempt_number=_RETRY_LIMIT, wait_fixed=_RETRY_COOLDOWN_MS)
def get_build_console_output(self, job_name, build_number):
return self.jenkins.get_build_console_output(job_name, build_number)
@retry(stop_max_attempt_number=_RETRY_LIMIT, wait_fixed=_RETRY_COOLDOWN_MS)
def get_job_info(self, job_name):
return self.jenkins.get_job_info(job_name)
@retry(stop_max_attempt_number=_RETRY_LIMIT, wait_fixed=_RETRY_COOLDOWN_MS)
def get_build_info(self, job_name, build_number):
return self.jenkins.get_build_info(job_name, build_number)
@retry(stop_max_attempt_number=_RETRY_LIMIT, wait_fixed=_RETRY_COOLDOWN_MS)
def get_queue_item(self, queue_id):
"""Attempt to retrieve Jenkins job queue item.
Exception communicating queue doesn't exist is expected,
in that case method returns empty dict.
:param queue_id: Jenkins job queue ID number
:type queue_id: int
:return: Dictionary representing Jenkins job queue item
:rtype: dict
"""
try:
return self.jenkins.get_queue_item(queue_id)
except Exception as e:
# Exception 'queue does not exist' is expected behaviour when job is running
if 'queue' in str(e) and 'does not exist' in str(e):
return {}
else:
raise
@retry(stop_max_attempt_number=_RETRY_LIMIT, wait_fixed=_RETRY_COOLDOWN_MS)
def get_idle_ci_hosts(self):
"""Query Jenkins for idle servers.
Send GET request to Jenkins server, querying for idle servers labeled
for OpenVino-ONNX CI job.
:return: Number of idle hosts delegated to OpenVino-ONNX CI
:rtype: int
"""
jenkins_request_url = self.jenkins_server + 'label/ci&&onnx/api/json?pretty=true'
try:
log.info('Sending request to Jenkins: %s', jenkins_request_url)
r = requests.Request(method='GET', url=jenkins_request_url, verify=False)
response = self.jenkins.jenkins_request(r).json()
return int(response['totalExecutors']) - int(response['busyExecutors'])
except Exception as e:
log.exception('Failed to send request to Jenkins!\nException message: %s', str(e))
raise

View File

@@ -0,0 +1,89 @@
#!/usr/bin/python3
# Copyright (C) 2018-2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import argparse
import sys
from watchdog import Watchdog
DEFAULT_MSTEAMS_URL_FILE = '/home/lab_nerval/tokens/msteams_url'
DEFAULT_GITHUB_ORGANIZATION = 'openvinotoolkit'
DEFAULT_GITHUB_PROJECT = 'openvino'
DEFAULT_JENKINS_TOKEN_FILE = '/home/lab_nerval/tokens/crackerjack'
DEFAULT_JENKINS_SERVER = 'https://crackerjack.intel.com/'
DEFAULT_JENKINS_USER = 'lab_nerval'
DEFAULT_CI_JOB_NAME = 'onnx/OpenVino_CI'
DEFAULT_WATCHDOG_JOB_NAME = 'onnx/ci_watchdog'
def main(args):
"""
Read args passed to script, load tokens and run watchdog.
Keyword arguments:
:param args: arguments parsed by argparse ArgumentParser
:return: returns status code 0 on successful completion
"""
jenkins_server = args.jenkins_server.strip()
jenkins_user = args.jenkins_user.strip()
jenkins_token = open(args.jenkins_token).read().replace('\n', '').strip()
msteams_url = open(args.msteams_url).read().replace('\n', '').strip()
github_credentials = args.github_credentials
github_org = args.github_org
github_project = args.github_project
ci_job = args.ci_job.strip()
watchdog_job = args.watchdog_job.strip()
quiet = args.quiet
wd = Watchdog(jenkins_token=jenkins_token,
jenkins_server=jenkins_server,
jenkins_user=jenkins_user,
github_credentials=github_credentials,
git_org=github_org,
git_project=github_project,
msteams_url=msteams_url,
ci_job_name=ci_job,
watchdog_job_name=watchdog_job)
wd.run(quiet=quiet)
return 0
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--msteams-url', help='Path to MS Teams channel url to communicate messages.',
default=DEFAULT_MSTEAMS_URL_FILE, action='store', required=False)
parser.add_argument('--github-credentials', help='GitHub user credentials to access repo.',
nargs="+", required=True)
parser.add_argument('--github-org', help='Name of organization on GitHub.',
default=DEFAULT_GITHUB_ORGANIZATION, action='store', required=False)
parser.add_argument('--github-project', help='Name of project on GitHub.',
default=DEFAULT_GITHUB_PROJECT, action='store', required=False)
parser.add_argument('--jenkins-token', help='Path to Jenkins user token to access build info.',
default=DEFAULT_JENKINS_TOKEN_FILE, action='store', required=False)
parser.add_argument('--jenkins-server', help='Jenkins server address.',
default=DEFAULT_JENKINS_SERVER, action='store', required=False)
parser.add_argument('--jenkins-user', help='Jenkins user used to log in.',
default=DEFAULT_JENKINS_USER, action='store', required=False)
parser.add_argument('--ci-job', help='Jenkins CI job name.',
default=DEFAULT_CI_JOB_NAME, action='store', required=False)
parser.add_argument('--watchdog-job', help='Jenkins CI Watchdog job name.',
default=DEFAULT_WATCHDOG_JOB_NAME, action='store', required=False)
parser.add_argument('--quiet', help="Quiet mode - doesn\'t send message to communicator.",
action='store_true', required=False)
args = parser.parse_args()
sys.exit(main(args))

View File

@@ -0,0 +1,128 @@
#!/usr/bin/python3
# Copyright (C) 2018-2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import requests
class MSTeamsCommunicator:
"""Class communicating with MSTeams using Incoming Webhook.
The purpose of this class is to use MSTeams API to send message.
Docs for used API, including wrapped methods can be found at:
https://docs.microsoft.com/en-us/outlook/actionable-messages/send-via-connectors
"""
def __init__(self, _ci_alerts_channel_url):
self._ci_alerts_channel_url = _ci_alerts_channel_url
self._queued_messages = {
self._ci_alerts_channel_url: [],
}
@property
def messages(self):
"""
Get list of queued messages.
:return: List of queued messages
:return type: List[String]
"""
return self._queued_messages.values()
def queue_message(self, message):
"""
Queue message to be sent later.
:param message: Message content
:type message: String
"""
self._queued_messages[self._ci_alerts_channel_url].append(message)
def _parse_text(self, watchdog_log, message):
"""
Parse text to display as alert.
:param watchdog_log: Watchdog log content
:param message: Unparsed message content
:type watchdog_log: String
:type message: String
"""
message_split = message.split('\n')
log_url = None
if len(message_split) == 3:
log_url = message_split[-1]
title = message_split[0]
text = message_split[1]
header = watchdog_log.split(' - ')
header_formatted = '{} - [Watchdog Log]({})'.format(header[0], header[1])
return title, log_url, '{}\n\n{}'.format(header_formatted, text)
def _json_request_content(self, title, log_url, text_formatted):
"""
Create final json request to send message to MS Teams channel.
:param title: Title of alert
:param log_url: URL to PR
:param text_formatted: General content of alert - finally formatted
:type title: String
:type title: String
:type title: String
"""
data = {
'@context': 'https://schema.org/extensions',
'@type': 'MessageCard',
'themeColor': '0072C6',
'title': title,
'text': text_formatted,
'potentialAction':
[
{
'@type': 'OpenUri',
'name': 'Open PR',
'targets':
[
{
'os': 'default',
'uri': log_url,
},
],
},
],
}
return data
def _send_to_channel(self, watchdog_log, message_queue, channel_url):
"""
Send MSTeams message to specified channel.
:param watchdog_log: Watchdog log content
:param message_queue: Queued messages to send
:param channel_url: Channel url
:type watchdog_log: String
:type message_queue: String
:type channel_url: String
"""
for message in message_queue:
title, log_url, text_formatted = self._parse_text(watchdog_log, message)
data = self._json_request_content(title, log_url, text_formatted)
try:
requests.post(url=channel_url, json=data)
except Exception as ex:
raise Exception('!!CRITICAL!! MSTeamsCommunicator: Could not send message '
'due to {}'.format(ex))
def send_message(self, watchdog_log, quiet=False):
"""
Send queued messages as single communication.
:param watchdog_log: Watchdog log content
:param quiet: Flag for disabling sending report through MS Teams
:type watchdog_log: String
:type quiet: Boolean
"""
for channel, message_queue in self._queued_messages.items():
if not quiet and message_queue:
self._send_to_channel(watchdog_log, message_queue, channel)

View File

@@ -0,0 +1,505 @@
#!/usr/bin/python3
# Copyright (C) 2018-2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import datetime
import time
import re
import logging
import requests
from ms_teams_communicator import MSTeamsCommunicator
from jenkins_wrapper import JenkinsWrapper
from jenkins import NotFoundException
from git_wrapper import GitWrapper, GitWrapperError
import os
import json
# Logging
logging.basicConfig(format='%(name)s - %(levelname)s - %(message)s')
log = logging.getLogger(__name__)
log.setLevel(logging.INFO)
# Watchdog static constant variables
_SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
_BUILD_DURATION_THRESHOLD = datetime.timedelta(minutes=60)
_CI_START_THRESHOLD = datetime.timedelta(minutes=30)
_AWAITING_JENKINS_THRESHOLD = datetime.timedelta(minutes=5)
_WATCHDOG_DIR = os.path.expanduser('~')
_PR_REPORTS_CONFIG_KEY = 'pr_reports'
_CI_BUILD_FAIL_MESSAGE = 'ERROR: py3: commands failed'
_CI_BUILD_SUCCESS_MESSAGE = 'py3: commands succeeded'
_GITHUB_CI_CHECK_NAME = 'OpenVINO-ONNX'
INTERNAL_ERROR_MESSAGE_HEADER = '!!! --- !!! INTERNAL WATCHDOG ERROR !!! --- !!!'
ERROR_MESSAGE_HEADER = '!!! OpenVino-ONNX CI Error !!!'
WARNING_MESSAGE_HEADER = 'OpenVino-ONNX CI WARNING'
INFO_MESSAGE_HEADER = 'OpenVino-ONNX CI INFO'
class Watchdog:
"""Class describing OpenVino-ONNX-CI Watchdog.
Watchdog connects to GitHub and retrieves the list of current pull requests (PRs) in
OpenVino repository. Then it connects to specified Jenkins server to
check CI jobs associated with every PR. Watchdog verifies time durations for Jenkins
initial response, job queue and execution against time treshold constants. Every fail
is logged and reported through MS Teams communicators.
:param jenkins_token: Token used for Jenkins
:param jenkins_server: Jenkins server address
:param jenkins_user: Username used to connect to Jenkins
:param github_credentials: Credentials used to connect to GitHub
:param msteams_url: URL used to connect to MS Teams channel
:param ci_job_name: OpenVino-ONNX CI job name used in Jenkins
:param watchdog_job_name: Watchdog job name used in Jenkins
:type jenkins_token: String
:type jenkins_server: String
:type jenkins_user: String
:type github_credentials: String
:type msteams_url: String
:type ci_job_name: String
:type watchdog_job_name: String
.. note::
Watchdog and OpenVino-ONNX CI job must be placed on the same Jenkins server.
"""
def __init__(self, jenkins_token, jenkins_server, jenkins_user, github_credentials, git_org,
git_project, msteams_url, ci_job_name, watchdog_job_name):
self._config_path = os.path.join(_WATCHDOG_DIR, '{}/.{}_ci_watchdog.json'.format(_WATCHDOG_DIR, git_project))
# Jenkins Wrapper object for CI job
self._jenkins = JenkinsWrapper(jenkins_token,
jenkins_user=jenkins_user,
jenkins_server=jenkins_server)
# Load GitHub token and log in, retrieve pull requests
self._git = GitWrapper(github_credentials, repository=git_org, project=git_project)
# Create MS Teams api object
self._msteams_hook = MSTeamsCommunicator(msteams_url)
self._ci_job_name = ci_job_name.lower()
self._watchdog_job_name = watchdog_job_name
# Read config file
self._config = self._read_config_file()
# Time at Watchdog initiation
self._now_time = datetime.datetime.now()
self._current_prs = {}
self._ms_teams_enabled = True
def run(self, quiet=False):
"""Run main watchdog logic.
Retrieve list of pull requests and pass it to the method responsible for checking them.
:param quiet: Flag for disabling sending report through communicator
:type quiet: Boolean
"""
try:
pull_requests = self._git.get_pull_requests()
except GitWrapperError:
message = 'Failed to retrieve Pull Requests!'
log.exception(message)
self._queue_message(message, message_severity='internal')
# Check all pull requests
for pr in pull_requests:
try:
self._check_pr(pr)
except Exception as e:
log.exception(str(e))
self._queue_message(str(e), message_severity='internal', pr=pr)
self._update_config()
self._send_message(quiet=quiet)
def _read_config_file(self):
"""Read Watchdog config file stored on the system.
The file stores every fail already reported along with timestamp. This
mechanism is used to prevent Watchdog from reporting same failure
multiple times. In case there's no config under the expected path,
appropriate data structure is created and returned.
:return: Returns dict of dicts with reported fails with their timestamps
:rtype: dict of dicts
"""
if os.path.isfile(self._config_path):
log.info('Reading config file in: {}'.format(self._config_path))
file = open(self._config_path, 'r')
data = json.load(file)
else:
log.info('No config file found in: {}'.format(self._config_path))
data = {_PR_REPORTS_CONFIG_KEY: {}}
return data
def _check_pr(self, pr):
"""Check pull request (if there's no reason to skip).
Retrieve list of statuses for every PR's last commit and interpret them. Filters out statuses
unrelated to OpenVino-ONNX Jenkins CI and passes relevant statuses to method that interprets them.
If no commit statuses related to Jenkins are available after time defined by
**_AWAITING_JENKINS_THRESHOLD** calls appropriate method to check for builds waiting in queue.
:param pr: GitHub Pull Requests
:type pr: github.PullRequest.PullRequest
"""
log.info('===============================================')
log.info('Checking PR#{}'.format(pr.number))
# Get last Jenkins status
last_status = self._get_last_status(pr)
# Append PR checked in current run for Watchdog config
self._current_prs[str(pr.number)] = self._get_pr_timestamps(pr, last_status)
if self._should_ignore(pr) or self._updated_since_last_run(pr):
log.info('Ignoring PR#{}'.format(pr.number))
return
# Calculate time passed since PR update (any commit, merge or comment)
pr_time_delta = self._now_time - pr.updated_at
if last_status:
# Interpret found CI statuses
log.info('Last status: {} at {}'.format(last_status.description, last_status.updated_at))
self._interpret_status(last_status, pr)
elif pr_time_delta > _CI_START_THRESHOLD:
# If there's no status after assumed time - check if build is waiting in queue
log.info('CI for PR {}: NO JENKINS STATUS YET'.format(pr.number))
self._check_missing_status(pr)
@staticmethod
def _get_pr_timestamps(pr, last_status):
"""Get dict containing PR timestamp and last status timestamp.
:param pr: Single PR being currently checked
:type pr: github.PullRequest.PullRequest
:return: Dictionary with PR and last status update timestamps
:rtype: dict
"""
pr_timestamp = time.mktime(pr.updated_at.timetuple())
if last_status:
status_timestamp = time.mktime(last_status.updated_at.timetuple())
else:
status_timestamp = None
pr_dict = {'pr_timestamp': pr_timestamp,
'status_timestamp': status_timestamp}
return pr_dict
@staticmethod
def _get_last_status(pr):
"""Get last commit status posted from Jenkins.
:param pr: Single PR being currently checked
:type pr: github.PullRequest.PullRequest
:return: Either last PR status posted from Jenkins or None
:rtype: github.CommitStatus.CommitStatus
"""
# Find last commit in PR
last_commit = pr.get_commits().reversed[0]
# Get statuses and filter them to contain only those related to Jenkins CI
# and check if CI in Jenkins started
statuses = last_commit.get_statuses()
jenk_statuses = [stat for stat in statuses if
_GITHUB_CI_CHECK_NAME in stat.context]
try:
last_status = jenk_statuses[0]
except IndexError:
last_status = None
return last_status
@staticmethod
def _should_ignore(pr):
"""Determine if PR should be ignored.
:param pr: Single PR being currently checked
:type pr: github.PullRequest.PullRequest
:return: Returns True if PR should be ignored
:rtype: Bool
"""
# Ignore PR if it has WIP label or WIP in title
if 'WIP' in pr.title:
log.info('PR#{} should be ignored. WIP tag in title.'.format(pr.number))
return True
label_names = [label.name for label in pr.labels]
if 'WIP' in label_names:
log.info('PR#{} should be ignored. WIP label present.'.format(pr.number))
return True
# Ignore PR if base ref is not master
if 'master' not in pr.base.ref:
log.info('PR#{} should be ignored. Base ref is not master'.format(pr.number))
return True
# Ignore PR if mergeable state is 'dirty' or 'behind'.
# Practically this ignores PR in case of merge conflicts
ignored_mergeable_states = ['behind', 'dirty', 'draft']
if pr.mergeable_state in ignored_mergeable_states:
log.info('PR#{} should be ignored. Mergeable state is {}. '.format(pr.number, pr.mergeable_state))
return True
# If no criteria for ignoring PR are met - return false
return False
def _updated_since_last_run(self, pr):
# Ignore if PR was already checked and there was no update in meantime
pr_number = str(pr.number)
current_pr_timestamps = self._current_prs.get(pr_number)
last_pr_timestamps = self._config[_PR_REPORTS_CONFIG_KEY].get(pr_number)
if current_pr_timestamps == last_pr_timestamps:
log.info('PR#{} - No update since last check'.format(pr.number))
return True
else:
return False
def _check_missing_status(self, pr):
"""Verify if missing status is expected.
This method checks if CI build for last was scheduled and still waits in queue for
executor.
:param pr: Single PR being currently checked
:type pr: github.PullRequest.PullRequest
"""
pr_time_delta = self._now_time - pr.updated_at
try:
build_number = self._build_scheduled(pr)
if self._build_in_queue(pr, build_number):
message = ('PR# {}: build waiting in queue after {} minutes.'
.format(pr.number, pr_time_delta.seconds / 60))
severity = 'warning'
else:
message = ('PR# {}: missing status on GitHub after {} minutes.'
.format(pr.number, pr_time_delta.seconds / 60))
severity = 'error'
self._queue_message(message, message_severity=severity, pr=pr)
except TypeError:
log.info('Committer outside of OpenVino organization')
def _build_scheduled(self, pr):
"""Check if Jenkins build corresponding to PR was scheduled.
This method takes last Jenkins build for given PR and compares hash from Jenkins console output
and sha from PR object to determine if CI build for appropriate commit was scheduled.
:param pr: Single PR being currently checked
:type pr: github.PullRequest.PullRequest
:return: Returns build number or -1 if no build found
:rtype: int
"""
pr_number = str(pr.number)
project_name_full = self._ci_job_name + '/PR-' + pr_number
try:
# Retrieve console output from last Jenkins build for job corresponding to this PR
last_build_number = self._jenkins.get_job_info(project_name_full)['lastBuild']['number']
console_output = self._jenkins.get_build_console_output(project_name_full, last_build_number)
# Check if CI build was scheduled - commit hash on GH must match hash in last Jenkins build console output
# Retrieve hash from Jenkins output
match_string = '(?:Obtained .ci/[a-zA-Z/]+Jenkinsfile from ([a-z0-9]{40}))'
retrieved_sha = re.search(match_string, console_output).group(1)
if retrieved_sha == pr.get_commits().reversed[0].sha:
return last_build_number
else:
return -1
except (NotFoundException, AttributeError, requests.exceptions.HTTPError):
message = ('PR #{}: Jenkins build corresponding to commit {} not found!'
.format(pr_number, pr.get_commits().reversed[0].sha))
self._queue_message(message, message_severity='error', pr=pr)
return -1
def _build_in_queue(self, pr, build_number):
"""Check if Jenkins build waits in queue.
This method verifies if CI build is waiting in queue based on console output.
:param pr: Single PR being currently checked
:param build_number: Jenkins build number to retrieve console output from
:type pr: github.PullRequest.PullRequest
:type build_number: int
:return: Returns True if CI build is waiting in queue
:rtype: Bool
"""
pr_number = str(pr.number)
project_name_full = self._ci_job_name + '/PR-' + pr_number
# Retrieve console output
try:
console_output = self._jenkins.get_build_console_output(project_name_full, build_number)
except NotFoundException:
return False
# Check if build is waiting in queue (and not already running on an executor)
if 'Waiting for next available executor on' in console_output \
and 'Running on' not in console_output:
log.info('CI for PR %s: WAITING IN QUEUE', pr_number)
return True
else:
return False
def _interpret_status(self, status, pr):
"""
Verify GitHub status passed to the method.
This method verifies last commit status for given PR, calling appropriate methods
to further validate the status.
:param status: GitHub commit status
:param pr: Single PR being currently checked
:type status: github.CommitStatus.CommitStatus
:type pr: github.PullRequest.PullRequest
"""
try:
# Retrieve build number for Jenkins build related to this PR
build_number = self._retrieve_build_number(status.target_url)
# CI build finished - verify if expected output is present
finished_statuses = ['Build finished', 'This commit cannot be built', 'This commit looks good']
pending_statuses = ['This commit is being built', 'Testing in progress',
'This commit is scheduled to be built']
if any(phrase in status.description for phrase in finished_statuses):
self._check_finished(pr, build_number)
# CI build in progress - verify timeouts for build queue and duration
elif any(phrase in status.description for phrase in pending_statuses):
self._check_in_progress(pr, build_number)
else:
message = 'ONNX CI job for PR# {}: unrecognized status: {}'.format(pr.number, status.description)
self._queue_message(message, message_severity='error', pr=pr)
except Exception:
# Log Watchdog internal error in case any status can't be properly verified
message = 'Failed to verify status "{}" for PR# {}'.format(status.description, pr.number)
log.exception(message)
self._queue_message(message, message_severity='internal', pr=pr)
def _retrieve_build_number(self, url):
"""Retrieve Jenkins CI job build number from URL address coming from GitHub commit status.
:param url: URL address from GitHub commit status
:type url: String
:return: Returns build number
:rtype: int
"""
# Retrieve the build number from url string
match_obj = re.search('(?:/PR-[0-9]+/)([0-9]+)', url)
try:
number = int(match_obj.group(1))
return number
except Exception:
log.exception('Failed to retrieve build number from url link: %s', url)
raise
def _queue_message(self, message, message_severity='info', pr=None):
"""Add a message to message queue in communicator object.
The queued message is constructed based on message string passed as
a method argument and message header. Message header is mapped to message severity
also passed as an argument.
:param message: Message content
:param message_severity: Message severity level
:type message: String
:type message_severity: int
"""
log.info(message)
internal = False
if 'internal' in message_severity:
message_header = INTERNAL_ERROR_MESSAGE_HEADER
internal = True
elif 'error' in message_severity:
message_header = ERROR_MESSAGE_HEADER
elif 'warning' in message_severity:
message_header = WARNING_MESSAGE_HEADER
else:
message_header = INFO_MESSAGE_HEADER
# If message is related to PR attatch url
if pr:
message = message + '\n' + pr.html_url
send = message_header + '\n' + message
if self._ms_teams_enabled:
self._msteams_hook.queue_message(send)
def _check_finished(self, pr, build_number):
"""Verify if finished build output contains expected string for either fail or success.
:param pr: Single PR being currently checked
:param build_number: Jenkins CI job build number
:type pr: github.PullRequest.PullRequest
:type build_number: int
"""
pr_number = str(pr.number)
log.info('CI for PR %s: FINISHED', pr_number)
# Check if FINISH was valid FAIL / SUCCESS
project_name_full = self._ci_job_name + '/PR-' + pr_number
build_output = self._jenkins.get_build_console_output(project_name_full, build_number)
if _CI_BUILD_FAIL_MESSAGE not in build_output \
and _CI_BUILD_SUCCESS_MESSAGE not in build_output:
message = ('ONNX CI job for PR #{}: finished but no tests success or fail '
'confirmation is present in console output!'.format(pr_number))
self._queue_message(message, message_severity='error', pr=pr)
def _send_message(self, quiet=False):
"""Send messages queued in MS Teams objects to designated channel.
Queued messages are being sent as a single communication.
:param quiet: Flag for disabling sending report through communicator
:type quiet: Boolean
"""
if any(messages for messages in self._msteams_hook.messages):
try:
watchdog_build = self._jenkins.get_job_info(self._watchdog_job_name)['lastBuild']
watchdog_build_number = watchdog_build['number']
watchdog_build_link = watchdog_build['url']
except Exception:
watchdog_build_number = 'UNKNOWN'
watchdog_build_link = self._jenkins.jenkins_server
send = self._watchdog_job_name + '- build ' + str(
watchdog_build_number) + ' - ' + watchdog_build_link
if self._ms_teams_enabled:
self._msteams_hook.send_message(send, quiet=quiet)
else:
log.info('Nothing to report.')
def _check_in_progress(self, pr, build_number):
"""Check if CI build succesfully started.
Checks if build started within designated time threshold, and job is
currently running - it didn't cross the time threshold.
:param pr: Single PR being currently checked
:param build_number: Jenkins CI job build number
:type pr: github.PullRequest.PullRequest
:type build_number: int
"""
pr_number = str(pr.number)
log.info('CI for PR %s: TESTING IN PROGRESS', pr_number)
project_name_full = self._ci_job_name + '/PR-' + pr_number
build_info = self._jenkins.get_build_info(project_name_full, build_number)
build_datetime = datetime.datetime.fromtimestamp(build_info['timestamp'] / 1000.0)
build_delta = self._now_time - build_datetime
log.info('Build %s: IN PROGRESS, started: %s minutes ago', str(build_number),
str(build_delta))
# If build still waiting in queue
if build_delta > _CI_START_THRESHOLD and self._build_in_queue(pr, build_number):
message = ('ONNX CI job build #{}, for PR #{} waiting in queue after {} '
'minutes'.format(build_number, pr_number, str(build_delta.seconds / 60)))
self._queue_message(message, message_severity='warning', pr=pr)
elif build_delta > _BUILD_DURATION_THRESHOLD:
# CI job take too long, possibly froze - communicate failure
message = ('ONNX CI job build #{}, for PR #{} started,'
'but did not finish in designated time of {} '
'minutes!'.format(build_number, pr_number,
str(_BUILD_DURATION_THRESHOLD.seconds / 60)))
self._queue_message(message, message_severity='error', pr=pr)
def _update_config(self):
"""Update Watchdog config file with PRs checked in current Watchdog run, remove old entries.
:param current_prs: List of PR numbers checked during current Watchdog run
:type current_prs: list of ints
"""
# Cleanup config of old reports
log.info('Writing to config file at: {}'.format(self._config_path))
new_config = {_PR_REPORTS_CONFIG_KEY: self._current_prs}
file = open(self._config_path, 'w+')
json.dump(new_config, file)

17
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
# See help here: https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/enabling-and-disabling-version-updates
version: 2
updates:
# Enable version updates for nGraph Python API
- package-ecosystem: pip
directory: "/ngraph/python"
schedule:
interval: weekly
day: monday
time: "13:00"
open-pull-requests-limit: 10
reviewers:
- postrational
labels:
- "category: dependencies"

6
.github/pull_request_template.md vendored Normal file
View File

@@ -0,0 +1,6 @@
### Details:
- *item1*
- *...*
### Tickets:
- *ticket-id*

44
.github/workflows/build_doc.yml vendored Normal file
View File

@@ -0,0 +1,44 @@
name: Documentation
on: [push, pull_request]
jobs:
Build_Doc:
runs-on: ubuntu-20.04
steps:
- name: Clone OpenVINO
uses: actions/checkout@v2
with:
submodules: recursive
lfs: true
- name: Install dependencies
run: |
sudo apt --assume-yes install libusb-1.0-0-dev graphviz texlive
python3 -m pip install lxml
# install doxygen
mkdir doxygen
cd doxygen
git clone https://github.com/doxygen/doxygen.git
cd doxygen
git checkout Release_1_9_1
mkdir build
cd build
cmake ..
cmake --build . -j`nproc`
sudo make install
- name: CMake doc
run: |
mkdir build
cd build
cmake -DENABLE_DOCS=ON ..
- name: Build doc
run: cmake --build . --target openvino_docs
working-directory: build
- name: 'Upload doc'
uses: actions/upload-artifact@v2
with:
name: openvino_doc
path: build/docs/html/

View File

@@ -38,30 +38,28 @@ jobs:
with:
name: ngraph_code_style_diff
path: ngraph_code_style_diff.patch
Java:
ShellCheck:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '11'
submodules: recursive
- name: Install ShellCheck
run: sudo apt --assume-yes install shellcheck
- name: Install dependencies
run: |
wget -nc https://github.com/google/google-java-format/releases/download/google-java-format-1.9/google-java-format-1.9-all-deps.jar
sudo apt --assume-yes install libusb-1.0-0-dev
python3 -m pip install -r ./inference-engine/ie_bridges/python/requirements.txt
- name: Check code style
- name: CMake
run: |
java -jar google-java-format-1.9-all-deps.jar --set-exit-if-changed -a -i $(find . -type f -name "*.java")
mkdir build
cd build
cmake ..
- name: Create code style diff
if: failure()
run: |
git diff >java_code_style_diff.patch
- uses: actions/upload-artifact@v2
if: failure()
with:
name: java_code_style_diff
path: java_code_style_diff.patch
- name: ShellCheck
run: make ie_shellcheck
working-directory: build

17
.github/workflows/files_size.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
name: Files Size
on: [push, pull_request]
jobs:
Check_Files_Size:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: git ls-tree
run: |
git ls-tree -r -t -l --full-name HEAD | sort -n -r -k 4
- name: git lfs ls-files
run: |
git lfs ls-files --size

View File

@@ -12,6 +12,9 @@ jobs:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
@@ -37,12 +40,20 @@ jobs:
# MO requirements
pip install -r requirements.txt
pip install -r requirements_dev.txt
# requrements for CMake
sudo apt --assume-yes install libusb-1.0-0-dev
working-directory: model-optimizer
- name: Pylint
run: pylint -d C,R,W mo/ mo.py extensions/
working-directory: model-optimizer
- name: CMake
run: |
mkdir build
cd build
cmake ..
- name: UT
run: |
export PYTHONPATH=$PYTHONPATH:`pwd`
@@ -51,3 +62,42 @@ jobs:
mkdir ../mo-ut-logs
python3 -m xmlrunner discover -p *_test.py --output=../mo-ut-logs
working-directory: model-optimizer
build_wheel:
name: Build Python wheel
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install wheel setuptools
python3 -m pip install tensorflow==2.3.0
- name: Build
run: |
python3 setup.py sdist bdist_wheel
working-directory: model-optimizer
- name: Test package content
run: |
echo "src = open('openvino_mo.egg-info/SOURCES.txt', 'rt').read().split()" | tee -a test_wheel.py
echo "ref = open('automation/package_BOM.txt', 'rt').read().split()" | tee -a test_wheel.py
echo "for name in ref:" | tee -a test_wheel.py
echo " if name.endswith('.py'):" | tee -a test_wheel.py
echo " assert name in src or './' + name in src, name + ' file missed'" | tee -a test_wheel.py
python3 test_wheel.py
working-directory: model-optimizer
- name: Test conversion
run: |
wget -q http://download.tensorflow.org/models/mobilenet_v1_2018_08_02/mobilenet_v1_1.0_224.tgz
tar -xf mobilenet_v1_1.0_224.tgz
python3 -m pip install model-optimizer/dist/*.whl
python3 -c "import sys, subprocess, mo_tf; subprocess.run([sys.executable, mo_tf.__file__, '--input_model', 'mobilenet_v1_1.0_224_frozen.pb', '--input_shape', '[1,224,224,3]'], check=True)"
- uses: actions/upload-artifact@v2
with:
name: mo_wheel
path: "model-optimizer/dist/*.whl"

6
.gitmodules vendored
View File

@@ -13,4 +13,8 @@
[submodule "inference-engine/samples/thirdparty/gflags"]
path = inference-engine/samples/thirdparty/gflags
url = https://github.com/gflags/gflags.git
ignore = dirty
ignore = dirty
[submodule "thirdparty/xbyak"]
path = thirdparty/xbyak
url = https://github.com/herumi/xbyak.git
ignore = dirty

View File

@@ -1,41 +1,24 @@
# Copyright (C) 2018-2020 Intel Corporation
# Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
cmake_policy(SET CMP0054 NEW)
# TODO: for make instal / package we need to use 3.13.3 version because
# it allows to install targets created outside of current projects
# See https://blog.kitware.com/cmake-3-13-0-available-for-download/
if (APPLE)
if(CMAKE_GENERATOR STREQUAL "Xcode")
# due to https://gitlab.kitware.com/cmake/cmake/issues/14254
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
else()
# due to https://cmake.org/cmake/help/v3.12/policy/CMP0068.html
cmake_minimum_required(VERSION 3.9 FATAL_ERROR)
endif()
else()
cmake_minimum_required(VERSION 3.7.2 FATAL_ERROR)
endif()
cmake_minimum_required(VERSION 3.13)
project(OpenVINO)
set(OpenVINO_MAIN_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(IE_MAIN_SOURCE_DIR ${OpenVINO_MAIN_SOURCE_DIR}/inference-engine)
list(APPEND CMAKE_MODULE_PATH "${OpenVINO_MAIN_SOURCE_DIR}/cmake")
find_package(IEDevScripts REQUIRED
PATHS "${OpenVINO_MAIN_SOURCE_DIR}/cmake/developer_package"
NO_CMAKE_FIND_ROOT_PATH
NO_DEFAULT_PATH)
include(CTest)
include(features)
include(cmake/features.cmake)
# include developer package
include(developer_package)
# These options are shared with 3rdparty plugins
# by means of developer package
include(check_features)
include(dependencies)
# These options are shared with 3rdparty plugins by means of developer package
include(cmake/dependencies.cmake)
# resolving dependencies for the project
message (STATUS "PROJECT ............................... " ${PROJECT_NAME})
@@ -47,8 +30,15 @@ message (STATUS "CMAKE_C_COMPILER_ID ................... " ${CMAKE_C_COMPILER_ID
message (STATUS "CMAKE_BUILD_TYPE ...................... " ${CMAKE_BUILD_TYPE})
# remove file with exported developer targets to force its regeneration
file(REMOVE "${CMAKE_BINARY_DIR}/targets_developer.cmake")
file(REMOVE "${CMAKE_BINARY_DIR}/targets.cmake")
file(REMOVE "${CMAKE_BINARY_DIR}/inference_engine_targets.cmake")
foreach(component IN LISTS openvino_export_components)
file(REMOVE "${CMAKE_BINARY_DIR}/${component}_dev_targets.cmake")
unset(${component} CACHE)
endforeach()
#
# Build
#
function(build_ngraph)
function(ngraph_set option value)
@@ -57,36 +47,48 @@ function(build_ngraph)
endif()
endfunction()
set(NGRAPH_BUILD_DIR ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} CACHE STRING "" FORCE)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${OpenVINO_MAIN_SOURCE_DIR}/ngraph/cmake/Modules/")
if (ENABLE_SANITIZER)
ngraph_set(NGRAPH_ADDRESS_SANITIZER TRUE)
ngraph_set(NGRAPH_ADDRESS_SANITIZER ON)
else ()
ngraph_set(NGRAPH_ADDRESS_SANITIZER FALSE)
ngraph_set(NGRAPH_ADDRESS_SANITIZER OFF)
endif ()
ngraph_set(NGRAPH_PYTHON_BUILD_ENABLE FALSE)
ngraph_set(NGRAPH_PYTHON_BUILD_ENABLE OFF)
if(ENABLE_TESTS AND NOT ANDROID)
ngraph_set(NGRAPH_UNIT_TEST_ENABLE TRUE)
ngraph_set(NGRAPH_UNIT_TEST_ENABLE ON)
else()
ngraph_set(NGRAPH_UNIT_TEST_ENABLE FALSE)
ngraph_set(NGRAPH_UNIT_TEST_ENABLE OFF)
endif()
if(NOT ANDROID)
ngraph_set(NGRAPH_ONNX_IMPORT_ENABLE TRUE)
if(NOT (ANDROID OR WINDOWS_STORE OR (MSVC AND (ARM OR AARCH64)) ))
ngraph_set(NGRAPH_ONNX_IMPORT_ENABLE ON)
else()
ngraph_set(NGRAPH_ONNX_IMPORT_ENABLE FALSE)
ngraph_set(NGRAPH_ONNX_IMPORT_ENABLE OFF)
endif()
ngraph_set(NGRAPH_INTERPRETER_ENABLE ON)
if(TREAT_WARNING_AS_ERROR)
ngraph_set(NGRAPH_WARNINGS_AS_ERRORS ON)
else()
ngraph_set(NGRAPH_WARNINGS_AS_ERRORS OFF)
endif()
if(ENABLE_SANITIZER)
ngraph_set(NGRAPH_ADDRESS_SANITIZER_ENABLE ON)
else()
ngraph_set(NGRAPH_ADDRESS_SANITIZER_ENABLE OFF)
endif()
if(ENABLE_THREAD_SANITIZER)
ngraph_set(NGRAPH_THREAD_SANITIZER_ENABLE ON)
else()
ngraph_set(NGRAPH_THREAD_SANITIZER_ENABLE OFF)
endif()
ngraph_set(NGRAPH_INTERPRETER_ENABLE TRUE)
if(CMAKE_CXX_COMPILER_ID MATCHES "^(Apple)?Clang$")
ie_add_compiler_flags(-Wno-error=uninitialized -Wno-error=literal-conversion)
elseif(UNIX)
ie_add_compiler_flags(-Wno-error=maybe-uninitialized -Wno-error=return-type -fPIC)
endif()
if(ANDROID)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=defaulted-function-deleted -Wno-error=unused-command-line-argument")
ie_add_compiler_flags(-Wno-error=maybe-uninitialized -Wno-error=return-type)
endif()
# WA for GCC 7.0
@@ -95,61 +97,80 @@ function(build_ngraph)
elseif(WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4308 /wd4146 /wd4703 /wd4244 /wd4819")
endif()
# Preserve the original flags for further use
set(CMAKE_ORIGINAL_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
set(CMAKE_ORIGINAL_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
set(CMAKE_ORIGINAL_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}")
set(CMAKE_ORIGINAL_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}")
set(CMAKE_ORIGINAL_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE}")
if(ENABLE_LTO)
ie_enable_lto()
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ON)
endif()
ie_cpack_add_component(ngraph)
set(SDL_cmake_included ON)
# set(NGRAPH_COMPONENT_PREFIX "deployment_tools/ngraph/")
set(NGRAPH_COMPONENT_PREFIX "deployment_tools/ngraph/")
add_subdirectory(ngraph)
set(NGRAPH_LIBRARIES ngraph PARENT_SCOPE)
set(NGRAPH_REF_LIBRARIES ngraph_reference PARENT_SCOPE)
endfunction()
file(REMOVE "${CMAKE_BINARY_DIR}/openvino_targets_developer.cmake")
unset(OpenVINODeveloperPackageTargets CACHE)
function(openvino_developer_export_targets)
set(OpenVINODeveloperPackageTargets "${OpenVINODeveloperPackageTargets};${ARGV}")
cmake_parse_arguments(EXPORT "" "COMPONENT" "TARGETS" ${ARGN})
if(EXPORT_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "openvino_developer_export_targets has unparsed arguments: ${EXPORT_UNPARSED_ARGUMENTS}")
endif()
set(${EXPORT_COMPONENT} "${${EXPORT_COMPONENT}};${EXPORT_TARGETS}")
# to allow exporting of aliased targets with the original names
foreach(target_name ${OpenVINODeveloperPackageTargets})
foreach(target_name IN LISTS ${EXPORT_COMPONENT})
if(TARGET "${target_name}")
get_target_property(original_name ${target_name} ALIASED_TARGET)
if(TARGET "${original_name}")
message(STATUS "The name ${target_name} is an ALIAS for ${original_name}. "
"It will be exported to the InferenceEngineDeveloperPackage with the original name.")
list(REMOVE_ITEM OpenVINODeveloperPackageTargets ${target_name})
list(APPEND OpenVINODeveloperPackageTargets ${original_name})
list(REMOVE_ITEM ${EXPORT_COMPONENT} ${target_name})
list(APPEND ${EXPORT_COMPONENT} ${original_name})
endif()
endif()
endforeach()
list(REMOVE_DUPLICATES OpenVINODeveloperPackageTargets)
set(OpenVINODeveloperPackageTargets "${OpenVINODeveloperPackageTargets}" CACHE INTERNAL
"Paths to extra Inference Engine plugins" FORCE)
list(REMOVE_DUPLICATES ${EXPORT_COMPONENT})
set(${EXPORT_COMPONENT} "${${EXPORT_COMPONENT}}" CACHE INTERNAL
"A list of OpenVINO ${EXPORT_COMPONENT} exported targets" FORCE)
list(APPEND openvino_export_components ${EXPORT_COMPONENT})
list(REMOVE_DUPLICATES openvino_export_components)
set(openvino_export_components "${openvino_export_components}" CACHE INTERNAL
"A list of OpenVINO exported components" FORCE)
endfunction()
add_subdirectory(thirdparty)
add_subdirectory(openvino)
build_ngraph()
add_subdirectory(inference-engine)
add_subdirectory(model-optimizer)
add_subdirectory(docs)
#
# Shellcheck
#
ie_shellcheck_process(DIRECTORY "${OpenVINO_MAIN_SOURCE_DIR}"
SKIP "${OpenVINO_MAIN_SOURCE_DIR}/bin"
"${OpenVINO_MAIN_SOURCE_DIR}/build"
"${OpenVINO_MAIN_SOURCE_DIR}/thirdparty"
"${IE_MAIN_SOURCE_DIR}/tests/ie_test_utils/common_test_utils/gtest"
"${IE_MAIN_SOURCE_DIR}/samples/thirdparty"
"${IE_MAIN_SOURCE_DIR}/thirdparty"
"${IE_MAIN_SOURCE_DIR}/temp"
# TODO fix and enable back:
"${OpenVINO_MAIN_SOURCE_DIR}/scripts/install_dependencies"
"${OpenVINO_MAIN_SOURCE_DIR}/scripts/demo"
"${OpenVINO_MAIN_SOURCE_DIR}/ngraph"
"${IE_MAIN_SOURCE_DIR}/scripts")
#
# cpack
#
# install setupvars

View File

@@ -1,18 +0,0 @@
# How to Contribute
We welcome community contributions to the OpenVINO™ repository.
If you have an idea how to improve the product, please share it
with us doing the following steps:
* Make sure you can build the product and run all tests and samples with your patch
* In case of a larger feature, provide relevant unit tests and one or more sample
* Submit a pull request at https://github.com/openvinotoolkit/openvino/pulls
## OpenVINO™ Coding Style Guide
We basically use the Google style (https://google.github.io/styleguide/cppguide.html) with some exceptions:
* 4 spaces instead of 2 spaces for indentations
* Limitation of 160 symbols for the line length
* Exceptions are allowed
* Using namespace are allowed in cpp and prohibited in headers
* Underscore symbol before member in classes/structures
* thisStyleForFunctions()
* theSameStyleForVariables

View File

@@ -1,58 +0,0 @@
# Contribute to Documentation
If you want to contribute to a project documentation and make it better, your help is very welcome.
This guide puts together the guidelines to help you figure out how you can offer your feedback and contribute to the documentation.
## Contribute in Multiple ways
There are multiple ways to help improve our documentation:
* [Log an issue](https://jira.devtools.intel.com/projects/CVS/issues): Enter an issue for the OpenVINO™ documentation component for minor issues such as typos.
* Make a suggestion: Send your documentation suggestion to the mailing list.
* Contribute via GitHub: Submit pull requests in the [GitHub](https://github.com/openvinotoolkit/openvino/tree/master/docs) documentation repository.
## Contribute via GitHub
Use the following steps to contribute in the OpenVINO™ Toolkit documentation
### Use Documentation Guidelines
The documentation for our project is written using Markdown. Use our [guidelines](./docs/documentation_guidelines.md) and best practices to write consistent, readable documentation:
* **[Authoring Guidelines](./docs/documentation_guidelines.md#authoring-guidelines)**
* **[Structure Guidelines](./docs/documentation_guidelines.md#structure-guidelines)**
* **[Formatting Guidelines](./docs/documentation_guidelines.md#structure-guidelines)**
* **[Graphics Guidelines](./docs/documentation_guidelines.md#graphics-guidelines)**
### Add New Document to the Documentation
> **NOTE**: Please check if that information can be added to existing documents instead of creating a new one.
1. Fork the [OpenVINO™ Toolkit](https://github.com/openvinotoolkit/openvino) repository.
2. Create a new branch.
3. Create a new markdown file in an appropriate folder.
> **REQUIRED**: The document title must contain a document label in a form: `{#openvino_docs_<name>}`. For example: `Deep Learning Network Intermediate Representation and Operation Sets in OpenVINO™ {#openvino_docs_MO_DG_IR_and_opsets}`.
4. Add your file to the documentation structure. Open the documentation structure file [docs/doxygen/ie_docs.xml](./docs/doxygen/ie_docs.xml) and add your file path to the appropriate section.
5. Commit changes to your branch.
6. Create a pull request.
7. Once the pull request is created, automatic checks are started. All checks must pass to continue.
8. Discuss, review, and update your contributions.
9. Get merged once the maintainer approves.
### Edit Existing Document
1. Fork the [OpenVINO™ Toolkit](https://github.com/openvinotoolkit/openvino) repository.
2. Create a new branch.
3. Edit the documentation markdown file and commit changes to the branch.
4. Create a pull request.
5. Once the pull request is created, automatic checks are started. All checks must pass to continue.
6. Discuss, review, and update your contributions.
7. Get merged once the maintainer approves.
### Delete Document from the Documentation
1. Fork the [OpenVINO™ Toolkit](https://github.com/openvinotoolkit/openvino) repository.
2. Create a new branch.
3. Remove the documentation file.
4. Remove your file from the documentation structure. Open the documentation structure file [docs/doxygen/ie_docs.xml](./docs/doxygen/ie_docs.xml) and remove all occurences of your file path.
5. Remove all references to that file from other documents or replace with links to alternatives topics (if any).
6. Commit changes to your branch.
7. Create a pull request.
8. Once the pull request is created, automatic checks are started. All checks must pass to continue.
9. Discuss, review, and update your contributions.
10. Get merged once the maintainer approves.

16
Jenkinsfile vendored
View File

@@ -1,10 +1,18 @@
#!groovy
properties([
parameters([
booleanParam(defaultValue: true,
booleanParam(defaultValue: false,
description: 'Cancel the rest of parallel stages if one of them fails and return status immediately',
name: 'failFast')
name: 'failFast'),
booleanParam(defaultValue: true,
description: 'Whether to propagate commit status to GitHub',
name: 'propagateStatus'),
string(defaultValue: '',
description: 'Pipeline shared library version (branch/tag/commit). Determined automatically if empty',
name: 'library_version')
])
])
dldtPipelineEntrypoint(this)
loadOpenVinoLibrary {
entrypoint(this)
}

View File

@@ -1,19 +1,21 @@
# [OpenVINO™ Toolkit](https://01.org/openvinotoolkit) - Deep Learning Deployment Toolkit repository
[![Stable release](https://img.shields.io/badge/version-2020.4-green.svg)](https://github.com/openvinotoolkit/openvino/releases/tag/2020.4.0)
# OpenVINO™ Toolkit
[![Stable release](https://img.shields.io/badge/version-2021.3-green.svg)](https://github.com/openvinotoolkit/openvino/releases/tag/2021.3)
[![Apache License Version 2.0](https://img.shields.io/badge/license-Apache_2.0-green.svg)](LICENSE)
![GitHub branch checks state](https://img.shields.io/github/checks-status/openvinotoolkit/openvino/master?label=GitHub%20checks)
![Azure DevOps builds (branch)](https://img.shields.io/azure-devops/build/openvinoci/b2bab62f-ab2f-4871-a538-86ea1be7d20f/13?label=Public%20CI)
This toolkit allows developers to deploy pre-trained deep learning models
through a high-level C++ Inference Engine API integrated with application logic.
This open source version includes two components: namely [Model Optimizer] and
[Inference Engine], as well as CPU, GPU and heterogeneous plugins to accelerate
deep learning inferencing on Intel® CPUs and Intel® Processor Graphics.
This open source version includes several components: namely [Model Optimizer], [nGraph] and
[Inference Engine], as well as CPU, GPU, MYRIAD, multi device and heterogeneous plugins to accelerate deep learning inferencing on Intel® CPUs and Intel® Processor Graphics.
It supports pre-trained models from the [Open Model Zoo], along with 100+ open
source and public models in popular formats such as Caffe\*, TensorFlow\*,
MXNet\* and ONNX\*.
## Repository components:
* [Inference Engine]
* [nGraph]
* [Model Optimizer]
## License
@@ -21,23 +23,19 @@ Deep Learning Deployment Toolkit is licensed under [Apache License Version 2.0](
By contributing to the project, you agree to the license and copyright terms therein
and release your contribution under these terms.
## Documentation
* [OpenVINO™ Release Notes](https://software.intel.com/en-us/articles/OpenVINO-RelNotes)
* [OpenVINO™ Inference Engine Build Instructions](build-instruction.md)
* [Get Started with Deep Learning Deployment Toolkit on Linux](get-started-linux.md)\*
* [Introduction to Deep Learning Deployment Toolkit](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Introduction.html)
* [Inference Engine Developer Guide](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Deep_Learning_Inference_Engine_DevGuide.html)
* [Model Optimizer Developer Guide](https://docs.openvinotoolkit.org/latest/_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html)
## How to Contribute
See [CONTRIBUTING](./CONTRIBUTING.md) for contribution to the code.
See [CONTRIBUTING_DOCS](./CONTRIBUTING_DOCS.md) for contribution to the documentation.
Thank you!
## Resources:
* Docs: https://docs.openvinotoolkit.org/
* Wiki: https://github.com/openvinotoolkit/openvino/wiki
* Issue tracking: https://github.com/openvinotoolkit/openvino/issues
* Storage: https://storage.openvinotoolkit.org/
* Additional OpenVINO™ modules: https://github.com/openvinotoolkit/openvino_contrib
* [Intel® Distribution of OpenVINO™ toolkit Product Page](https://software.intel.com/content/www/us/en/develop/tools/openvino-toolkit.html)
* [Intel® Distribution of OpenVINO™ toolkit Release Notes](https://software.intel.com/en-us/articles/OpenVINO-RelNotes)
## Support
Please report questions, issues and suggestions using:
* The `openvino` [tag on StackOverflow]\*
* The [`openvino`](https://stackoverflow.com/questions/tagged/openvino) tag on StackOverflow\*
* [GitHub* Issues](https://github.com/openvinotoolkit/openvino/issues)
* [Forum](https://software.intel.com/en-us/forums/computer-vision)
@@ -48,3 +46,4 @@ Please report questions, issues and suggestions using:
[Inference Engine]:https://software.intel.com/en-us/articles/OpenVINO-InferEngine
[Model Optimizer]:https://software.intel.com/en-us/articles/OpenVINO-ModelOptimizer
[tag on StackOverflow]:https://stackoverflow.com/search?q=%23openvino
[nGraph]:https://docs.openvinotoolkit.org/latest/openvino_docs_nGraph_DG_DevGuide.html

12
SECURITY.md Normal file
View File

@@ -0,0 +1,12 @@
# Security Policy
## Report a Vulnerability
Please report security issues or vulnerabilities to the [Intel® Security Center].
For more information on how Intel® works to resolve security issues, see
[Vulnerability Handling Guidelines].
[Intel® Security Center]:https://www.intel.com/security
[Vulnerability Handling Guidelines]:https://www.intel.com/content/www/us/en/security-center/vulnerability-handling-guidelines.html

View File

@@ -1,351 +0,0 @@
jobs:
- job: Lin
# About 150% of total time
timeoutInMinutes: 85
pool:
name: LIN_VMSS_VENV_F8S_WU2
variables:
system.debug: true
WORKERS_NUMBER: 8
BUILD_TYPE: Release
REPO_DIR: $(Build.Repository.LocalPath)
WORK_DIR: $(Pipeline.Workspace)/_w
BUILD_DIR: $(WORK_DIR)/build
BIN_DIR: $(REPO_DIR)/bin/intel64/$(BUILD_TYPE)
steps:
- checkout: self
clean: true
fetchDepth: 1
lfs: false
submodules: recursive
path: openvino
- script: |
curl -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=2019-06-01"
whoami
uname -a
which python3
python3 --version
gcc --version
lsb_release
env
cat /proc/cpuinfo
cat /proc/meminfo
vmstat -s
df
displayName: 'System properties'
- script: |
rm -rf $(WORK_DIR) ; mkdir $(WORK_DIR)
rm -rf $(BUILD_DIR) ; mkdir $(BUILD_DIR)
displayName: 'Make dir'
- script: |
sudo apt --assume-yes install libusb-1.0-0-dev
python3 -m pip install -r ./inference-engine/ie_bridges/python/requirements.txt
# For running Python API tests
python3 -m pip install -r ./inference-engine/ie_bridges/python/src/requirements-dev.txt
displayName: 'Install dependencies'
- script: |
wget https://github.com/ninja-build/ninja/releases/download/v1.10.0/ninja-linux.zip
unzip ninja-linux.zip
sudo cp -v ninja /usr/local/bin/
workingDirectory: $(WORK_DIR)
displayName: 'Install Ninja'
- task: CMake@1
inputs:
# CMake must get Python 3.x version by default
cmakeArgs: -GNinja -DVERBOSE_BUILD=ON -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_PYTHON=ON -DPYTHON_EXECUTABLE=/usr/bin/python3.6 -DENABLE_TESTS=ON $(REPO_DIR)
workingDirectory: $(BUILD_DIR)
- script: ninja
workingDirectory: $(BUILD_DIR)
displayName: 'Build Lin'
- script: ls -alR $(REPO_DIR)/bin/
displayName: 'List files'
- script: $(BIN_DIR)/unit-test --gtest_print_time=1 --gtest_filter=-backend_api.config_unsupported:*IE_GPU*
displayName: 'nGraph UT'
continueOnError: false
- script: $(BIN_DIR)/InferenceEngineUnitTests --gtest_print_time=1
displayName: 'IE UT old'
continueOnError: false
- script: $(BIN_DIR)/ieUnitTests
displayName: 'IE UT'
continueOnError: false
- script: $(BIN_DIR)/cpuUnitTests
displayName: 'CPU UT'
continueOnError: false
- script: $(BIN_DIR)/gnaUnitTests
displayName: 'GNA UT'
continueOnError: false
- script: $(BIN_DIR)/vpuUnitTests
displayName: 'VPU UT'
continueOnError: false
- script: $(BIN_DIR)/ieFuncTests
displayName: 'IE FuncTests'
continueOnError: false
- script: $(BIN_DIR)/cpuFuncTests --gtest_print_time=1
displayName: 'CPU FuncTests'
continueOnError: false
- script: $(BIN_DIR)/MklDnnBehaviorTests
displayName: 'MklDnnBehaviorTests'
continueOnError: false
- script: |
git clone https://github.com/openvinotoolkit/testdata.git
git clone https://github.com/google/gtest-parallel.git
workingDirectory: $(WORK_DIR)
displayName: 'Clone testdata & gtest-parallel'
- script: |
export DATA_PATH=$(WORK_DIR)/testdata
export MODELS_PATH=$(WORK_DIR)/testdata
python3 $(WORK_DIR)/gtest-parallel/gtest-parallel $(BIN_DIR)/MklDnnFunctionalTests --workers=$(WORKERS_NUMBER) --print_test_times --dump_json_test_results=MklDnnFunctionalTests.json -- --gtest_print_time=1
workingDirectory: $(WORK_DIR)
displayName: 'MklDnnFunctionalTests'
continueOnError: false
- script: |
export DATA_PATH=$(WORK_DIR)/testdata
export MODELS_PATH=$(WORK_DIR)/testdata
$(BIN_DIR)/InferenceEngineCAPITests
displayName: 'IE CAPITests'
continueOnError: false
- script: |
export DATA_PATH=$(WORK_DIR)/testdata
export MODELS_PATH=$(WORK_DIR)/testdata
export LD_LIBRARY_PATH=$(BIN_DIR)/lib
export PYTHONPATH=$(BIN_DIR)/lib/python_api/python3.6
env
cd $(REPO_DIR)/inference-engine/ie_bridges/python/tests
pytest
displayName: 'Python API Tests'
continueOnError: false
enabled: false
- job: Mac
# About 200% of total time (perfomace of Mac hosts is unstable)
timeoutInMinutes: 180
pool:
vmImage: 'macOS-10.15'
variables:
system.debug: true
WORKERS_NUMBER: 3
BUILD_TYPE: Release
REPO_DIR: $(Build.Repository.LocalPath)
WORK_DIR: $(Pipeline.Workspace)/_w
BUILD_DIR: $(WORK_DIR)/build
BIN_DIR: $(REPO_DIR)/bin/intel64/$(BUILD_TYPE)
steps:
- checkout: self
clean: true
fetchDepth: 1
lfs: false
submodules: recursive
path: openvino
- script: |
whoami
uname -a
which python3
python3 --version
gcc --version
xcrun --sdk macosx --show-sdk-version
env
sysctl -a
displayName: 'System properties'
- script: |
rm -rf $(WORK_DIR) ; mkdir $(WORK_DIR)
rm -rf $(BUILD_DIR) ; mkdir $(BUILD_DIR)
displayName: 'Make dir'
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
- script: |
brew install cython
brew install automake
displayName: 'Install dependencies'
- script: brew install ninja
displayName: 'Install Ninja'
- script: |
export PATH="/usr/local/opt/cython/bin:$PATH"
export CC=gcc
export CXX=g++
# Disable errors with Ninja
export CXXFLAGS="-Wno-error=unused-command-line-argument"
export CFLAGS="-Wno-error=unused-command-line-argument"
cmake -GNinja -DVERBOSE_BUILD=ON -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_PYTHON=ON -DENABLE_TESTS=ON $(REPO_DIR)
workingDirectory: $(BUILD_DIR)
displayName: 'CMake'
- script: ninja
workingDirectory: $(BUILD_DIR)
displayName: 'Build Mac'
- script: ls -alR $(REPO_DIR)/bin/
displayName: 'List files'
- script: $(BIN_DIR)/unit-test --gtest_print_time=1 --gtest_filter=-backend_api.config_unsupported:*IE_GPU*:IE_CPU.onnx_model_sigmoid
displayName: 'nGraph UT'
continueOnError: false
- script: $(BIN_DIR)/InferenceEngineUnitTests --gtest_print_time=1
displayName: 'IE UT old'
continueOnError: false
- script: $(BIN_DIR)/ieUnitTests
displayName: 'IE UT'
continueOnError: false
- script: $(BIN_DIR)/cpuUnitTests
displayName: 'CPU UT'
continueOnError: false
- script: $(BIN_DIR)/vpuUnitTests
displayName: 'VPU UT'
continueOnError: false
- script: $(BIN_DIR)/ieFuncTests
displayName: 'IE FuncTests'
continueOnError: false
- script: $(BIN_DIR)/cpuFuncTests --gtest_print_time=1
displayName: 'CPU FuncTests'
continueOnError: false
- script: $(BIN_DIR)/MklDnnBehaviorTests
displayName: 'MklDnnBehaviorTests'
continueOnError: false
- script: |
git clone https://github.com/openvinotoolkit/testdata.git
git clone https://github.com/google/gtest-parallel.git
workingDirectory: $(WORK_DIR)
displayName: 'Clone testdata & gtest-parallel'
- script: |
export DATA_PATH=$(WORK_DIR)/testdata
export MODELS_PATH=$(WORK_DIR)/testdata
python3 $(WORK_DIR)/gtest-parallel/gtest-parallel $(BIN_DIR)/MklDnnFunctionalTests --workers=$(WORKERS_NUMBER) --print_test_times --dump_json_test_results=MklDnnFunctionalTests.json --gtest_filter=-smoke_MobileNet/ModelTransformationsTest.LPT/mobilenet_v2_tf_depthwise_batch1_inPluginDisabled_inTestDisabled_asymmetric* -- --gtest_print_time=1
workingDirectory: $(WORK_DIR)
displayName: 'MklDnnFunctionalTests'
continueOnError: false
- script: |
export DATA_PATH=$(WORK_DIR)/testdata
export MODELS_PATH=$(WORK_DIR)/testdata
$(BIN_DIR)/InferenceEngineCAPITests
displayName: 'IE CAPITests'
continueOnError: false
- job: Win
# About 150% of total time
timeoutInMinutes: 120
pool:
name: WIN_VMSS_VENV_F8S_WU2
variables:
system.debug: true
WORKERS_NUMBER: 8
BUILD_TYPE: Release
REPO_DIR: $(Build.Repository.LocalPath)
WORK_DIR: $(Pipeline.Workspace)\_w
BUILD_DIR: D:\build
BIN_DIR: $(REPO_DIR)\bin\intel64
MSVS_VARS_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
MSVC_COMPILER_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.24.28314\bin\Hostx64\x64\cl.exe
steps:
- checkout: self
clean: true
fetchDepth: 1
lfs: false
submodules: recursive
path: openvino
- script: |
powershell -command "Invoke-RestMethod -Headers @{\"Metadata\"=\"true\"} -Method GET -Uri http://169.254.169.254/metadata/instance/compute?api-version=2019-06-01 | format-custom"
where python3
where python
python --version
wmic computersystem get TotalPhysicalMemory
wmic cpu list
wmic logicaldisk get description,name
wmic VOLUME list
set
displayName: 'System properties'
- script: |
rd /Q /S $(WORK_DIR) & mkdir $(WORK_DIR)
rd /Q /S $(BUILD_DIR) & mkdir $(BUILD_DIR)
displayName: 'Make dir'
- script: |
certutil -urlcache -split -f https://github.com/ninja-build/ninja/releases/download/v1.10.0/ninja-win.zip ninja-win.zip
powershell -command "Expand-Archive -Force ninja-win.zip"
workingDirectory: $(WORK_DIR)
displayName: Install Ninja
- script: |
certutil -urlcache -split -f https://incredibuilddiag1wu2.blob.core.windows.net/incredibuild/IBSetupConsole_9_5_0.exe IBSetupConsole_9_5_0.exe
call IBSetupConsole_9_5_0.exe /Install /Components=Agent,oneuse /Coordinator=11.1.0.4 /AGENT:OPENFIREWALL=ON /AGENT:AUTOSELECTPORTS=ON /ADDTOPATH=ON /AGENT:INSTALLADDINS=OFF
workingDirectory: $(WORK_DIR)
displayName: Install IncrediBuild
- script: |
echo Stop IncrediBuild_Agent && net stop IncrediBuild_Agent
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Xoreax\IncrediBuild\Builder /f /v LastEnabled /d 0 && echo Start IncrediBuild_Agent && net start IncrediBuild_Agent
displayName: Start IncrediBuild
- script: |
set PATH=$(WORK_DIR)\ninja-win;%PATH%
call "$(MSVS_VARS_PATH)" && cmake -GNinja -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) -DENABLE_TESTS=ON -DCMAKE_C_COMPILER:PATH="$(MSVC_COMPILER_PATH)" -DCMAKE_CXX_COMPILER:PATH="$(MSVC_COMPILER_PATH)" $(REPO_DIR)
workingDirectory: $(BUILD_DIR)
displayName: 'CMake'
- script: |
set PATH=$(WORK_DIR)\ninja-win;%PATH%
call "$(MSVS_VARS_PATH)" && "C:\Program Files (x86)\IncrediBuild\BuildConsole.exe" /COMMAND="ninja" /MaxCPUS=40
workingDirectory: $(BUILD_DIR)
displayName: 'Build Win'
- script: echo Stop IncrediBuild_Agent && net stop IncrediBuild_Agent
displayName: Stop IncrediBuild
continueOnError: true
- script: dir $(REPO_DIR)\bin\ /s /b
displayName: 'List files'
- script: |
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;%PATH%
$(BIN_DIR)\unit-test --gtest_print_time=1 --gtest_filter=-backend_api.config_unsupported:*IE_GPU*
displayName: 'nGraph UT'
continueOnError: false
- script: |
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;%PATH%
$(BIN_DIR)\InferenceEngineUnitTests --gtest_print_time=1
displayName: 'IE UT old'
continueOnError: false
- script: |
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;%PATH%
$(BIN_DIR)\ieUnitTests
displayName: 'IE UT'
continueOnError: false
- script: |
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;%PATH%
$(BIN_DIR)\cpuUnitTests
displayName: 'CPU UT'
continueOnError: false
- script: |
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;%PATH%
$(BIN_DIR)\gnaUnitTests
displayName: 'GNA UT'
continueOnError: false
- script: |
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;%PATH%
$(BIN_DIR)\vpuUnitTests
displayName: 'VPU UT'
continueOnError: false
- script: |
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;%PATH%
$(BIN_DIR)\ieFuncTests
displayName: 'IE FuncTests'
continueOnError: false
- script: |
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;%PATH%
$(BIN_DIR)\cpuFuncTests --gtest_print_time=1
displayName: 'CPU FuncTests'
continueOnError: false
- script: |
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;%PATH%
$(BIN_DIR)\MklDnnBehaviorTests
displayName: 'MklDnnBehaviorTests'
continueOnError: false
- script: |
git clone https://github.com/openvinotoolkit/testdata.git
git clone https://github.com/google/gtest-parallel.git
workingDirectory: $(BUILD_DIR)
displayName: 'Clone testdata & gtest-parallel'
# Add for gtest-parallel, it hangs now (CVS-33386)
#python $(BUILD_DIR)\gtest-parallel\gtest-parallel $(BIN_DIR)\MklDnnFunctionalTests --workers=$(WORKERS_NUMBER) --print_test_times --dump_json_test_results=MklDnnFunctionalTests.json -- --gtest_print_time=1
- script: |
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;$(REPO_DIR)\inference-engine\temp\opencv_4.3.0\opencv\bin;%PATH%
set DATA_PATH=$(BUILD_DIR)\testdata
set MODELS_PATH=$(BUILD_DIR)\testdata
$(BIN_DIR)\MklDnnFunctionalTests --gtest_print_time=1
displayName: 'MklDnnFunctionalTests'
continueOnError: false
- script: |
set PATH=$(REPO_DIR)\inference-engine\temp\tbb\bin;$(REPO_DIR)\inference-engine\temp\opencv_4.3.0\opencv\bin;%PATH%
set DATA_PATH=$(BUILD_DIR)\testdata
set MODELS_PATH=$(BUILD_DIR)\testdata
$(BIN_DIR)\InferenceEngineCAPITests
displayName: 'IE CAPITests'
continueOnError: false

View File

@@ -1,702 +0,0 @@
# Build OpenVINO™ Inference Engine
## Contents
- [Introduction](#introduction)
- [Build on Linux\* Systems](#build-on-linux-systems)
- [Software Requirements](#software-requirements)
- [Build Steps](#build-steps)
- [Additional Build Options](#additional-build-options)
- [Build for Raspbian* Stretch OS](#build-for-raspbian-stretch-os)
- [Hardware Requirements](#hardware-requirements)
- [Native Compilation](#native-compilation)
- [Cross Compilation Using Docker\*](#cross-compilation-using-docker)
- [Additional Build Options](#additional-build-options-1)
- [Build on Windows* Systems](#build-on-windows-systems)
- [Software Requirements](#software-requirements-1)
- [Build Steps](#build-steps-1)
- [Additional Build Options](#additional-build-options-2)
- [Building Inference Engine with Ninja* Build System](#building-inference-engine-with-ninja-build-system)
- [Build on macOS\* Systems](#build-on-macos-systems)
- [Software Requirements](#software-requirements-2)
- [Build Steps](#build-steps-2)
- [Additional Build Options](#additional-build-options-3)
- [Build on Android\* Systems](#build-on-android-systems)
- [Software Requirements](#software-requirements-3)
- [Build Steps](#build-steps-3)
- [Use Custom OpenCV Builds for Inference Engine](#use-custom-opencv-builds-for-inference-engine)
- [Add Inference Engine to Your Project](#add-inference-engine-to-your-project)
- [(Optional) Additional Installation Steps for the Intel® Movidius™ Neural Compute Stick and Neural Compute Stick 2](#optional-additional-installation-steps-for-the-intel-movidius-neural-compute-stick-and-neural-compute-stick-2)
- [For Linux, Raspbian Stretch* OS](#for-linux-raspbian-stretch-os)
- [Next Steps](#next-steps)
- [Additional Resources](#additional-resources)
## Introduction
The Inference Engine can infer models in different formats with various input
and output formats.
The open source version of Inference Engine includes the following plugins:
| PLUGIN | DEVICE TYPES |
| ---------------------| -------------|
| CPU plugin | Intel® Xeon® with Intel® AVX2 and AVX512, Intel® Core™ Processors with Intel® AVX2, Intel® Atom® Processors with Intel® SSE |
| GPU plugin | Intel® Processor Graphics, including Intel® HD Graphics and Intel® Iris® Graphics |
| GNA plugin | Intel® Speech Enabling Developer Kit, Amazon Alexa\* Premium Far-Field Developer Kit, Intel® Pentium® Silver processor J5005, Intel® Celeron® processor J4005, Intel® Core™ i3-8121U processor |
| MYRIAD plugin | Intel® Movidius™ Neural Compute Stick powered by the Intel® Movidius™ Myriad™ 2, Intel® Neural Compute Stick 2 powered by the Intel® Movidius™ Myriad™ X |
| Heterogeneous plugin | Heterogeneous plugin enables computing for inference on one network on several Intel® devices. |
Inference Engine plugin for Intel® FPGA is distributed only in a binary form,
as a part of [Intel® Distribution of OpenVINO™].
## Build on Linux\* Systems
The software was validated on:
- Ubuntu\* 18.04 (64-bit) with default GCC\* 7.5.0
- Ubuntu\* 16.04 (64-bit) with default GCC\* 5.4.0
- CentOS\* 7.4 (64-bit) with default GCC\* 4.8.5
### Software Requirements
- [CMake]\* 3.11 or higher
- GCC\* 4.8 or higher to build the Inference Engine
- Python 3.5 or higher for Inference Engine Python API wrapper
- (Optional) [Install Intel® Graphics Compute Runtime for OpenCL™ Driver package 19.41.14441].
### Build Steps
1. Clone submodules:
```sh
cd openvino
git submodule update --init --recursive
```
2. Install build dependencies using the `install_dependencies.sh` script in the
project root folder.
```sh
chmod +x install_dependencies.sh
```
```sh
./install_dependencies.sh
```
3. By default, the build enables the Inference Engine GPU plugin to infer models
on your Intel® Processor Graphics. This requires you to
[Install Intel® Graphics Compute Runtime for OpenCL™ Driver package 19.41.14441]
before running the build. If you don't want to use the GPU plugin, use the
`-DENABLE_CLDNN=OFF` CMake build option and skip the installation of the
Intel® Graphics Compute Runtime for OpenCL™ Driver.
4. Create a build folder:
```sh
mkdir build && cd build
```
5. Inference Engine uses a CMake-based build system. In the created `build`
directory, run `cmake` to fetch project dependencies and create Unix
makefiles, then run `make` to build the project:
```sh
cmake -DCMAKE_BUILD_TYPE=Release ..
make --jobs=$(nproc --all)
```
### Additional Build Options
You can use the following additional build options:
- The default build uses an internal JIT GEMM implementation.
- To switch to an OpenBLAS\* implementation, use the `GEMM=OPENBLAS` option with
`BLAS_INCLUDE_DIRS` and `BLAS_LIBRARIES` CMake options to specify a path to the
OpenBLAS headers and library. For example, the following options on CentOS\*:
`-DGEMM=OPENBLAS -DBLAS_INCLUDE_DIRS=/usr/include/openblas -DBLAS_LIBRARIES=/usr/lib64/libopenblas.so.0`.
- To switch to the optimized MKL-ML\* GEMM implementation, use `-DGEMM=MKL`
and `-DMKLROOT=<path_to_MKL>` CMake options to specify a path to unpacked
MKL-ML with the `include` and `lib` folders. MKL-ML\* package can be downloaded
from the Intel® [MKL-DNN repository].
- Threading Building Blocks (TBB) is used by default. To build the Inference
Engine with OpenMP\* threading, set the `-DTHREADING=OMP` option.
- Required versions of TBB and OpenCV packages are downloaded automatically by
the CMake-based script. If you want to use the automatically downloaded
packages but you already have installed TBB or OpenCV packages configured in
your environment, you may need to clean the `TBBROOT` and `OpenCV_DIR`
environment variables before running the `cmake` command, otherwise they
will not be downloaded and the build may fail if incompatible versions were
installed.
- If the CMake-based build script can not find and download the OpenCV package
that is supported on your platform, or if you want to use a custom build of
the OpenCV library, refer to the
[Use Custom OpenCV Builds](#use-custom-opencv-builds-for-inference-engine)
section for details.
- To build the Python API wrapper:
1. Install all additional packages listed in the
`/inference-engine/ie_bridges/python/requirements.txt` file:
```sh
pip install -r requirements.txt
```
2. Use the `-DENABLE_PYTHON=ON` option. To specify an exact Python version, use the following
options:
```
-DPYTHON_EXECUTABLE=`which python3.7` \
-DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.7m.so \
-DPYTHON_INCLUDE_DIR=/usr/include/python3.7
```
- To switch the CPU and GPU plugins off/on, use the `cmake` options
`-DENABLE_MKL_DNN=ON/OFF` and `-DENABLE_CLDNN=ON/OFF` respectively.
- nGraph-specific compilation options:
`-DNGRAPH_ONNX_IMPORT_ENABLE=ON` enables the building of the nGraph ONNX importer.
`-DNGRAPH_DEBUG_ENABLE=ON` enables additional debug prints.
## Build for Raspbian Stretch* OS
> **NOTE**: Only the MYRIAD plugin is supported.
### Hardware Requirements
* Raspberry Pi\* 2 or 3 with Raspbian\* Stretch OS (32-bit). Check that it's CPU supports ARMv7 instruction set (`uname -m` command returns `armv7l`).
> **NOTE**: Despite the Raspberry Pi\* CPU is ARMv8, 32-bit OS detects ARMv7 CPU instruction set. The default `gcc` compiler applies ARMv6 architecture flag for compatibility with lower versions of boards. For more information, run the `gcc -Q --help=target` command and refer to the description of the `-march=` option.
You can compile the Inference Engine for Raspberry Pi\* in one of the two ways:
* [Native Compilation](#native-compilation), which is the simplest way, but time-consuming
* [Cross Compilation Using Docker*](#cross-compilation-using-docker), which is the recommended way
### Native Compilation
Native compilation of the Inference Engine is the most straightforward solution. However, it might take at least one hour to complete on Raspberry Pi\* 3.
1. Install dependencies:
```bash
sudo apt-get update
sudo apt-get install -y git cmake libusb-1.0-0-dev
```
2. Go to the cloned `openvino` repository:
```bash
cd openvino
```
3. Initialize submodules:
```bash
git submodule update --init --recursive
```
4. Create a build folder:
```bash
mkdir build && cd build
```
5. Build the Inference Engine:
```bash
cmake -DCMAKE_BUILD_TYPE=Release \
-DENABLE_SSE42=OFF \
-DTHREADING=SEQ \
-DENABLE_GNA=OFF .. && make
```
### Cross Compilation Using Docker*
This compilation was tested on the following configuration:
* Host: Ubuntu\* 18.04 (64-bit, Intel® Core™ i7-6700K CPU @ 4.00GHz × 8)
* Target: Raspbian\* Stretch (32-bit, ARMv7, Raspberry Pi\* 3)
1. Install Docker\*:
```bash
sudo apt-get install -y docker.io
```
2. Add a current user to `docker` group:
```bash
sudo usermod -a -G docker $USER
```
Log out and log in for this to take effect.
3. Create a directory named `ie_cross_armhf` and add a text file named `Dockerfile`
with the following content:
```docker
FROM debian:stretch
USER root
RUN dpkg --add-architecture armhf && \
apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
crossbuild-essential-armhf \
git \
wget \
libusb-1.0-0-dev:armhf \
libgtk-3-dev:armhf \
libavcodec-dev:armhf \
libavformat-dev:armhf \
libswscale-dev:armhf \
libgstreamer1.0-dev:armhf \
libgstreamer-plugins-base1.0-dev:armhf \
libpython3-dev:armhf \
python3-pip \
python-minimal \
python-argparse
RUN wget https://www.cmake.org/files/v3.14/cmake-3.14.3.tar.gz && \
tar xf cmake-3.14.3.tar.gz && \
(cd cmake-3.14.3 && ./bootstrap --parallel=$(nproc --all) && make --jobs=$(nproc --all) && make install) && \
rm -rf cmake-3.14.3 cmake-3.14.3.tar.gz
```
It uses the Debian\* Stretch (Debian 9) OS for compilation because it is a base of the Raspbian\* Stretch.
4. Build a Docker\* image:
```bash
docker image build -t ie_cross_armhf ie_cross_armhf
```
5. Run Docker\* container with mounted source code folder from host:
```bash
docker run -it -v /absolute/path/to/openvino:/openvino ie_cross_armhf /bin/bash
```
6. While in the container:
1. Go to the cloned `openvino` repository:
```bash
cd openvino
```
2. Create a build folder:
```bash
mkdir build && cd build
```
3. Build the Inference Engine:
```bash
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE="../cmake/arm.toolchain.cmake" \
-DTHREADS_PTHREAD_ARG="-pthread" \
-DENABLE_SSE42=OFF \
-DTHREADING=SEQ \
-DENABLE_GNA=OFF .. && make --jobs=$(nproc --all)
```
7. Press **Ctrl+D** to exit from Docker. You can find the resulting binaries
in the `openvino/bin/armv7l/` directory and the OpenCV*
installation in the `openvino/inference-engine/temp`.
>**NOTE**: Native applications that link to cross-compiled Inference Engine
library require an extra compilation flag `-march=armv7-a`.
### Additional Build Options
You can use the following additional build options:
- Required versions of OpenCV packages are downloaded automatically by the
CMake-based script. If you want to use the automatically downloaded packages
but you already have installed OpenCV packages configured in your environment,
you may need to clean the `OpenCV_DIR` environment variable before running
the `cmake` command; otherwise they won't be downloaded and the build may
fail if incompatible versions were installed.
- If the CMake-based build script cannot find and download the OpenCV package
that is supported on your platform, or if you want to use a custom build of
the OpenCV library, see: [Use Custom OpenCV Builds](#use-custom-opencv-builds-for-inference-engine)
for details.
- To build Python API wrapper, install `libpython3-dev:armhf` and `python3-pip`
packages using `apt-get`; then install `numpy` and `cython` python modules
via `pip3`, adding the following options:
```sh
-DENABLE_PYTHON=ON \
-DPYTHON_EXECUTABLE=/usr/bin/python3.5 \
-DPYTHON_LIBRARY=/usr/lib/arm-linux-gnueabihf/libpython3.5m.so \
-DPYTHON_INCLUDE_DIR=/usr/include/python3.5
```
- nGraph-specific compilation options:
`-DNGRAPH_ONNX_IMPORT_ENABLE=ON` enables the building of the nGraph ONNX importer.
`-DNGRAPH_DEBUG_ENABLE=ON` enables additional debug prints.
## Build on Windows* Systems
The software was validated on:
- Microsoft\* Windows\* 10 (64-bit) with Visual Studio 2017 and Intel® C++
Compiler 2018 Update 3
### Software Requirements
- [CMake]\*3.11 or higher
- Microsoft\* Visual Studio 2017, 2019 or [Intel® C++ Compiler] 18.0
- (Optional) Intel® Graphics Driver for Windows* (26.20) [driver package].
- Python 3.5 or higher for Inference Engine Python API wrapper
### Build Steps
1. Clone submodules:
```sh
git submodule update --init --recursive
```
2. By default, the build enables the Inference Engine GPU plugin to infer models
on your Intel® Processor Graphics. This requires you to [download and install
the Intel® Graphics Driver for Windows (26.20) [driver package] before
running the build. If you don't want to use the GPU plugin, use the
`-DENABLE_CLDNN=OFF` CMake build option and skip the installation of the
Intel® Graphics Driver.
3. Create build directory:
```sh
mkdir build
```
4. In the `build` directory, run `cmake` to fetch project dependencies and
generate a Visual Studio solution.
For Microsoft\* Visual Studio 2017:
```sh
cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_BUILD_TYPE=Release ..
```
For Microsoft\* Visual Studio 2019:
```sh
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_BUILD_TYPE=Release ..
```
For Intel® C++ Compiler 18:
```sh
cmake -G "Visual Studio 15 2017 Win64" -T "Intel C++ Compiler 18.0" ^
-DCMAKE_BUILD_TYPE=Release ^
-DICCLIB="C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018\windows\compiler\lib" ..
```
5. Build generated solution in Visual Studio or run
`cmake --build . --config Release` to build from the command line.
6. Before running the samples, add paths to the TBB and OpenCV binaries used for
the build to the `%PATH%` environment variable. By default, TBB binaries are
downloaded by the CMake-based script to the `<openvino_repo>/inference-engine/temp/tbb/bin`
folder, OpenCV binaries to the `<openvino_repo>/inference-engine/temp/opencv_4.3.0/opencv/bin`
folder.
### Additional Build Options
- Internal JIT GEMM implementation is used by default.
- To switch to OpenBLAS GEMM implementation, use the `-DGEMM=OPENBLAS` CMake
option and specify path to OpenBLAS using the `-DBLAS_INCLUDE_DIRS=<OPENBLAS_DIR>\include`
and `-DBLAS_LIBRARIES=<OPENBLAS_DIR>\lib\libopenblas.dll.a` options. Download
a prebuilt OpenBLAS\* package via the [OpenBLAS] link. mingw64* runtime
dependencies can be downloaded via the [mingw64\* runtime dependencies] link.
- To switch to the optimized MKL-ML\* GEMM implementation, use the
`-DGEMM=MKL` and `-DMKLROOT=<path_to_MKL>` CMake options to specify a path to
unpacked MKL-ML with the `include` and `lib` folders. MKL-ML\* package can be
downloaded from the Intel&reg; [MKL-DNN repository for Windows].
- Threading Building Blocks (TBB) is used by default. To build the Inference
Engine with OpenMP* threading, set the `-DTHREADING=OMP` option.
- Required versions of TBB and OpenCV packages are downloaded automatically by
the CMake-based script. If you want to use the automatically-downloaded
packages but you already have installed TBB or OpenCV packages configured in
your environment, you may need to clean the `TBBROOT` and `OpenCV_DIR`
environment variables before running the `cmake` command; otherwise they won't
be downloaded and the build may fail if incompatible versions were installed.
- If the CMake-based build script can not find and download the OpenCV package
that is supported on your platform, or if you want to use a custom build of
the OpenCV library, refer to the [Use Custom OpenCV Builds](#use-custom-opencv-builds-for-inference-engine)
section for details.
- To switch off/on the CPU and GPU plugins, use the `cmake` options
`-DENABLE_MKL_DNN=ON/OFF` and `-DENABLE_CLDNN=ON/OFF` respectively.
- To build the Python API wrapper, use the `-DENABLE_PYTHON=ON` option. To
specify an exact Python version, use the following options:
```sh
-DPYTHON_EXECUTABLE="C:\Program Files\Python37\python.exe" ^
-DPYTHON_LIBRARY="C:\Program Files\Python37\libs\python37.lib" ^
-DPYTHON_INCLUDE_DIR="C:\Program Files\Python37\include"
```
- nGraph-specific compilation options:
`-DNGRAPH_ONNX_IMPORT_ENABLE=ON` enables the building of the nGraph ONNX importer.
`-DNGRAPH_DEBUG_ENABLE=ON` enables additional debug prints.
### Building Inference Engine with Ninja* Build System
```sh
call "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2018\windows\bin\ipsxe-comp-vars.bat" intel64 vs2017
set CXX=icl
set CC=icl
:: clean TBBROOT value set by ipsxe-comp-vars.bat, required TBB package will be downloaded by openvino cmake script
set TBBROOT=
cmake -G Ninja -Wno-dev -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release
```
## Build on macOS* Systems
> **NOTE**: The current version of the OpenVINO™ toolkit for macOS* supports
inference on Intel CPUs only.
The software was validated on:
- macOS\* 10.14, 64-bit
### Software Requirements
- [CMake]\* 3.11 or higher
- Clang\* compiler from Xcode\* 10.1 or higher
- Python\* 3.5 or higher for the Inference Engine Python API wrapper
### Build Steps
1. Clone submodules:
```sh
cd openvino
git submodule update --init --recursive
```
2. Install build dependencies using the `install_dependencies.sh` script in the
project root folder:
```sh
chmod +x install_dependencies.sh
```
```sh
./install_dependencies.sh
```
3. Create a build folder:
```sh
mkdir build
```
4. Inference Engine uses a CMake-based build system. In the created `build`
directory, run `cmake` to fetch project dependencies and create Unix makefiles,
then run `make` to build the project:
```sh
cmake -DCMAKE_BUILD_TYPE=Release ..
make --jobs=$(nproc --all)
```
### Additional Build Options
You can use the following additional build options:
- Internal JIT GEMM implementation is used by default.
- To switch to the optimized MKL-ML\* GEMM implementation, use `-DGEMM=MKL` and
`-DMKLROOT=<path_to_MKL>` cmake options to specify a path to unpacked MKL-ML
with the `include` and `lib` folders. MKL-ML\* [package for Mac] can be downloaded
[here](https://github.com/intel/mkl-dnn/releases/download/v0.19/mklml_mac_2019.0.5.20190502.tgz)
- Threading Building Blocks (TBB) is used by default. To build the Inference
Engine with OpenMP* threading, set the `-DTHREADING=OMP` option.
- Required versions of TBB and OpenCV packages are downloaded automatically by
the CMake-based script. If you want to use the automatically downloaded
packages but you already have installed TBB or OpenCV packages configured in
your environment, you may need to clean the `TBBROOT` and `OpenCV_DIR`
environment variables before running the `cmake` command, otherwise they won't
be downloaded and the build may fail if incompatible versions were installed.
- If the CMake-based build script can not find and download the OpenCV package
that is supported on your platform, or if you want to use a custom build of
the OpenCV library, refer to the
[Use Custom OpenCV Builds](#use-custom-opencv-builds-for-inference-engine)
section for details.
- To build the Python API wrapper, use the `-DENABLE_PYTHON=ON` option. To
specify an exact Python version, use the following options:
```sh
-DPYTHON_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 \
-DPYTHON_LIBRARY=/Library/Frameworks/Python.framework/Versions/3.7/lib/libpython3.7m.dylib \
-DPYTHON_INCLUDE_DIR=/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m
```
- nGraph-specific compilation options:
`-DNGRAPH_ONNX_IMPORT_ENABLE=ON` enables the building of the nGraph ONNX importer.
`-DNGRAPH_DEBUG_ENABLE=ON` enables additional debug prints.
## Build on Android* Systems
This section describes how to build Inference Engine for Android x86 (64-bit) operating systems.
### Software Requirements
- [CMake]\* 3.11 or higher
- Android NDK (this guide has been validated with r20 release)
### Build Steps
1. Download and unpack Android NDK: https://developer.android.com/ndk/downloads. Let's assume that `~/Downloads` is used as a working folder.
```sh
cd ~/Downloads
wget https://dl.google.com/android/repository/android-ndk-r20-linux-x86_64.zip
unzip android-ndk-r20-linux-x86_64.zip
mv android-ndk-r20 android-ndk
```
2. Clone submodules
```sh
cd openvino
git submodule update --init --recursive
```
3. Create a build folder:
```sh
mkdir build
```
4. Change working directory to `build` and run `cmake` to create makefiles. Then run `make`.
```sh
cd build
cmake .. \
-DCMAKE_TOOLCHAIN_FILE=~/Downloads/android-ndk/build/cmake/android.toolchain.cmake \
-DANDROID_ABI=x86_64 \
-DANDROID_PLATFORM=21 \
-DANDROID_STL=c++_shared \
-DENABLE_OPENCV=OFF
make --jobs=$(nproc --all)
```
* `ANDROID_ABI` specifies target architecture (`x86_64`)
* `ANDROID_PLATFORM` - Android API version
* `ANDROID_STL` specifies that shared C++ runtime is used. Copy `~/Downloads/android-ndk/sources/cxx-stl/llvm-libc++/libs/x86_64/libc++_shared.so` from Android NDK along with built binaries
## Use Custom OpenCV Builds for Inference Engine
> **NOTE**: The recommended and tested version of OpenCV is 4.4.0.
Required versions of OpenCV packages are downloaded automatically during the
building Inference Engine library. If the build script can not find and download
the OpenCV package that is supported on your platform, you can use one of the
following options:
* Download the most suitable version from the list of available pre-build
packages from [https://download.01.org/opencv/2020/openvinotoolkit] from the
`<release_version>/inference_engine` directory.
* Use a system-provided OpenCV package (e.g with running the
`apt install libopencv-dev` command). The following modules must be enabled:
`imgcodecs`, `videoio`, `highgui`.
* Get the OpenCV package using a package manager: pip, conda, conan etc. The
package must have the development components included (header files and CMake
scripts).
* Build OpenCV from source using the [build instructions](https://docs.opencv.org/master/df/d65/tutorial_table_of_content_introduction.html) on the OpenCV site.
After you got the built OpenCV library, perform the following preparation steps
before running the Inference Engine build:
1. Set the `OpenCV_DIR` environment variable to the directory where the
`OpenCVConfig.cmake` file of you custom OpenCV build is located.
2. Disable the package automatic downloading with using the `-DENABLE_OPENCV=OFF`
option for CMake-based build script for Inference Engine.
## Add Inference Engine to Your Project
For CMake projects, set the `InferenceEngine_DIR` environment variable:
```sh
export InferenceEngine_DIR=/path/to/openvino/build/
```
Then you can find Inference Engine by `find_package`:
```cmake
find_package(InferenceEngine)
include_directories(${InferenceEngine_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME} ${InferenceEngine_LIBRARIES} dl)
```
## (Optional) Additional Installation Steps for the Intel® Movidius™ Neural Compute Stick and Neural Compute Stick 2
> **NOTE**: These steps are only required if you want to perform inference on
Intel® Movidius™ Neural Compute Stick or the Intel® Neural Compute Stick 2 using
the Inference Engine MYRIAD Plugin. See also [Intel® Neural Compute Stick 2 Get Started].
### For Linux, Raspbian\* Stretch OS
1. Add the current Linux user to the `users` group; you will need to log out and
log in for it to take effect:
```sh
sudo usermod -a -G users "$(whoami)"
```
2. To perform inference on Intel® Movidius™ Neural Compute Stick and Intel®
Neural Compute Stick 2, install the USB rules as follows:
```sh
cat <<EOF > 97-myriad-usbboot.rules
SUBSYSTEM=="usb", ATTRS{idProduct}=="2150", ATTRS{idVendor}=="03e7", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1"
SUBSYSTEM=="usb", ATTRS{idProduct}=="2485", ATTRS{idVendor}=="03e7", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1"
SUBSYSTEM=="usb", ATTRS{idProduct}=="f63b", ATTRS{idVendor}=="03e7", GROUP="users", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1"
EOF
```
```sh
sudo cp 97-myriad-usbboot.rules /etc/udev/rules.d/
```
```sh
sudo udevadm control --reload-rules
```
```sh
sudo udevadm trigger
```
```sh
sudo ldconfig
```
```sh
rm 97-myriad-usbboot.rules
```
## Next Steps
Congratulations, you have built the Inference Engine. To get started with the
OpenVINO™, proceed to the Get Started guides:
* [Get Started with Deep Learning Deployment Toolkit on Linux*](get-started-linux.md)
## Notice
To enable some additional nGraph features and use your custom nGraph library with the OpenVINO™ binary package,
make sure the following:
- nGraph library was built with the same version which is used in the Inference Engine.
- nGraph library and the Inference Engine were built with the same compilers. Otherwise you might face application binary interface (ABI) problems.
To prepare your custom nGraph library for distribution, which includes collecting all headers, copy
binaries, and so on, use the `install` CMake target.
This target collects all dependencies, prepares the nGraph package and copies it to a separate directory.
## Additional Resources
* [OpenVINO™ Release Notes](https://software.intel.com/en-us/articles/OpenVINO-RelNotes)
* [Introduction to Intel® Deep Learning Deployment Toolkit](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Introduction.html)
* [Inference Engine Samples Overview](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Samples_Overview.html)
* [Inference Engine Developer Guide](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Deep_Learning_Inference_Engine_DevGuide.html)
* [Model Optimizer Developer Guide](https://docs.openvinotoolkit.org/latest/_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html)
---
\* Other names and brands may be claimed as the property of others.
[Intel® Distribution of OpenVINO™]:https://software.intel.com/en-us/openvino-toolkit
[CMake]:https://cmake.org/download/
[Install Intel® Graphics Compute Runtime for OpenCL™ Driver package 19.41.14441]:https://github.com/intel/compute-runtime/releases/tag/19.41.14441
[MKL-DNN repository]:https://github.com/intel/mkl-dnn/releases/download/v0.19/mklml_lnx_2019.0.5.20190502.tgz
[MKL-DNN repository for Windows]:(https://github.com/intel/mkl-dnn/releases/download/v0.19/mklml_win_2019.0.5.20190502.zip)
[OpenBLAS]:https://sourceforge.net/projects/openblas/files/v0.2.14/OpenBLAS-v0.2.14-Win64-int64.zip/download
[mingw64\* runtime dependencies]:https://sourceforge.net/projects/openblas/files/v0.2.14/mingw64_dll.zip/download
[https://download.01.org/opencv/2020/openvinotoolkit]:https://download.01.org/opencv/2020/openvinotoolkit
[build instructions]:https://docs.opencv.org/master/df/d65/tutorial_table_of_content_introduction.html
[driver package]:https://downloadcenter.intel.com/download/29335/Intel-Graphics-Windows-10-DCH-Drivers
[Intel® Neural Compute Stick 2 Get Started]:https://software.intel.com/en-us/neural-compute-stick/get-started
[Intel® C++ Compiler]:https://software.intel.com/en-us/intel-parallel-studio-xe
[OpenBLAS]:https://sourceforge.net/projects/openblas/files/v0.2.14/OpenBLAS-v0.2.14-Win64-int64.zip/download

View File

@@ -1,39 +0,0 @@
# Copyright (C) 2018-2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
if (VERBOSE_BUILD)
set(CMAKE_VERBOSE_MAKEFILE ON CACHE BOOL "" FORCE)
endif()
#64 bits platform
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
message(STATUS "Detected 64 bit architecture")
SET(ARCH_64 ON)
else()
message(STATUS "Detected 32 bit architecture")
SET(ARCH_64 OFF)
endif()
if (NOT ENABLE_MKL_DNN)
set(ENABLE_MKL OFF)
endif()
if(ENABLE_AVX512F)
if ((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") AND (MSVC_VERSION VERSION_LESS 1920))
# 1920 version of MSVC 2019. In MSVC 2017 AVX512F not work
set(ENABLE_AVX512F OFF CACHE BOOL "" FORCE)
endif()
if ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6))
set(ENABLE_AVX512F OFF CACHE BOOL "" FORCE)
endif()
if ((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10))
# TBD: clarify which AppleClang version supports avx512
set(ENABLE_AVX512F OFF CACHE BOOL "" FORCE)
endif()
if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9))
set(ENABLE_AVX512F OFF CACHE BOOL "" FORCE)
endif()
endif()
print_enabled_features()

View File

@@ -1,211 +0,0 @@
# Copyright (C) 2018-2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
if(NOT TARGET ie_coverage_clean)
add_custom_target(ie_coverage_clean)
set_target_properties(ie_coverage_clean PROPERTIES FOLDER coverage)
endif()
if(NOT TARGET ie_coverage_init)
add_custom_target(ie_coverage_init)
set_target_properties(ie_coverage_init PROPERTIES FOLDER coverage)
endif()
if(NOT TARGET ie_coverage)
add_custom_target(ie_coverage)
set_target_properties(ie_coverage PROPERTIES FOLDER coverage)
endif()
set(IE_COVERAGE_REPORTS "${CMAKE_BINARY_DIR}/coverage")
set(IE_COVERAGE_SCRIPT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake/coverage")
include(CMakeParseArguments)
#
# ie_coverage_clean(REPOSITORY <repo> DIRECTORY <dir>)
#
function(ie_coverage_clean)
cmake_parse_arguments(IE_COVERAGE "" "REPOSITORY;DIRECTORY" "" ${ARGN})
add_custom_target(ie_coverage_zerocounters_${IE_COVERAGE_REPOSITORY}
COMMAND lcov --zerocounters --quiet
--directory "${IE_COVERAGE_DIRECTORY}"
COMMENT "Add zero counters for coverage for ${IE_COVERAGE_REPOSITORY}"
VERBATIM)
add_custom_target(ie_coverage_clean_${IE_COVERAGE_REPOSITORY}
COMMAND ${CMAKE_COMMAND}
-D "IE_COVERAGE_REPORTS=${IE_COVERAGE_REPORTS}"
-D "IE_COVERAGE_DIRECTORY=${IE_COVERAGE_DIRECTORY}"
-D "CMAKE_BINARY_DIRECTORY=${CMAKE_BINARY_DIR}"
-D "CMAKE_SOURCE_DIRECTORY=${CMAKE_SOURCE_DIR}"
-P "${IE_COVERAGE_SCRIPT_DIR}/coverage_clean.cmake"
COMMENT "Clean previously created HTML report files for ${IE_COVERAGE_REPOSITORY}"
DEPENDS "${IE_COVERAGE_SCRIPT_DIR}/coverage_clean.cmake"
VERBATIM)
set_target_properties(ie_coverage_zerocounters_${IE_COVERAGE_REPOSITORY}
ie_coverage_clean_${IE_COVERAGE_REPOSITORY}
PROPERTIES FOLDER coverage)
add_dependencies(ie_coverage_clean ie_coverage_zerocounters_${IE_COVERAGE_REPOSITORY}
ie_coverage_clean_${IE_COVERAGE_REPOSITORY})
endfunction()
#
# ie_coverage_capture(INFO_FILE <info_file>
# BASE_DIRECTORY <base dir>
# DIRECTORY <gcda dir>)
#
function(ie_coverage_capture)
cmake_parse_arguments(IE_COVERAGE "" "INFO_FILE;BASE_DIRECTORY;DIRECTORY" "" ${ARGN})
set(output_file "${IE_COVERAGE_REPORTS}/${IE_COVERAGE_INFO_FILE}.info")
set(output_base_file "${IE_COVERAGE_REPORTS}/${IE_COVERAGE_INFO_FILE}_base.info")
set(output_tests_file "${IE_COVERAGE_REPORTS}/${IE_COVERAGE_INFO_FILE}_tests.info")
add_custom_command(OUTPUT ${output_base_file}
COMMAND ${CMAKE_COMMAND} -E make_directory "${IE_COVERAGE_REPORTS}"
COMMAND lcov --no-external --capture --initial --quiet
--directory "${IE_COVERAGE_DIRECTORY}"
--base-directory "${IE_COVERAGE_BASE_DIRECTORY}"
--output-file ${output_base_file}
COMMENT "Capture initial coverage data ${IE_COVERAGE_INFO_FILE}"
VERBATIM)
add_custom_command(OUTPUT ${output_tests_file}
COMMAND ${CMAKE_COMMAND} -E make_directory "${IE_COVERAGE_REPORTS}"
COMMAND lcov --no-external --capture --quiet
--directory "${IE_COVERAGE_DIRECTORY}"
--base-directory "${IE_COVERAGE_BASE_DIRECTORY}"
--output-file ${output_tests_file}
COMMENT "Capture test coverage data ${IE_COVERAGE_INFO_FILE}"
VERBATIM)
add_custom_command(OUTPUT ${output_file}
COMMAND ${CMAKE_COMMAND}
-D "IE_COVERAGE_OUTPUT_FILE=${output_file}"
-D "IE_COVERAGE_INPUT_FILES=${output_base_file};${output_tests_file}"
-P "${IE_COVERAGE_SCRIPT_DIR}/coverage_merge.cmake"
COMMENT "Generate total coverage data ${IE_COVERAGE_INFO_FILE}"
DEPENDS ${output_base_file} ${output_tests_file}
VERBATIM)
add_custom_target(ie_coverage_${IE_COVERAGE_INFO_FILE}_info
DEPENDS ${output_file})
set_target_properties(ie_coverage_${IE_COVERAGE_INFO_FILE}_info
PROPERTIES FOLDER coverage)
endfunction()
#
# ie_coverage_extract(INPUT <info_file> OUTPUT <output_file> PATTERNS <patterns ...>)
#
function(ie_coverage_extract)
cmake_parse_arguments(IE_COVERAGE "" "INPUT;OUTPUT" "PATTERNS" ${ARGN})
set(input_file "${IE_COVERAGE_REPORTS}/${IE_COVERAGE_INPUT}.info")
set(output_file "${IE_COVERAGE_REPORTS}/${IE_COVERAGE_OUTPUT}.info")
set(commands lcov --quiet)
foreach(pattern IN LISTS IE_COVERAGE_PATTERNS)
list(APPEND commands --extract ${input_file} ${pattern})
endforeach()
list(APPEND commands --output-file ${output_file})
add_custom_command(OUTPUT ${output_file}
COMMAND ${commands}
COMMENT "Generate coverage data ${IE_COVERAGE_OUTPUT}"
DEPENDS ${input_file}
VERBATIM)
add_custom_target(ie_coverage_${IE_COVERAGE_OUTPUT}_info
DEPENDS ${output_file})
set_target_properties(ie_coverage_${IE_COVERAGE_OUTPUT}_info
PROPERTIES FOLDER coverage)
add_dependencies(ie_coverage_${IE_COVERAGE_OUTPUT}_info ie_coverage_${IE_COVERAGE_INPUT}_info)
endfunction()
#
# ie_coverage_remove(INPUT <info_file> OUTPUT <output_file> PATTERNS <patterns ...>)
#
function(ie_coverage_remove)
cmake_parse_arguments(IE_COVERAGE "" "INPUT;OUTPUT" "PATTERNS" ${ARGN})
set(input_file "${IE_COVERAGE_REPORTS}/${IE_COVERAGE_INPUT}.info")
set(output_file "${IE_COVERAGE_REPORTS}/${IE_COVERAGE_OUTPUT}.info")
set(commands lcov --quiet)
foreach(pattern IN LISTS IE_COVERAGE_PATTERNS)
list(APPEND commands --remove ${input_file} ${pattern})
endforeach()
list(APPEND commands --output-file ${output_file})
add_custom_command(OUTPUT ${output_file}
COMMAND ${commands}
COMMENT "Generate coverage data ${IE_COVERAGE_OUTPUT}"
DEPENDS ${input_file}
VERBATIM)
add_custom_target(ie_coverage_${IE_COVERAGE_OUTPUT}_info
DEPENDS ${output_file})
set_target_properties(ie_coverage_${IE_COVERAGE_OUTPUT}_info
PROPERTIES FOLDER coverage)
add_dependencies(ie_coverage_${IE_COVERAGE_OUTPUT}_info ie_coverage_${IE_COVERAGE_INPUT}_info)
endfunction()
#
# ie_coverage_merge(OUTPUT <output file> INPUTS <input files ...>)
#
function(ie_coverage_merge)
cmake_parse_arguments(IE_COVERAGE "" "OUTPUT" "INPUTS" ${ARGN})
set(output_file "${IE_COVERAGE_REPORTS}/${IE_COVERAGE_OUTPUT}.info")
foreach(input_info_file IN LISTS IE_COVERAGE_INPUTS)
set(input_file ${IE_COVERAGE_REPORTS}/${input_info_file}.info)
list(APPEND dependencies ie_coverage_${input_info_file}_info)
list(APPEND input_files ${input_file})
endforeach()
add_custom_command(OUTPUT ${output_file}
COMMAND ${CMAKE_COMMAND}
-D "IE_COVERAGE_OUTPUT_FILE=${output_file}"
-D "IE_COVERAGE_INPUT_FILES=${input_files}"
-P "${IE_COVERAGE_SCRIPT_DIR}/coverage_merge.cmake"
COMMENT "Generate coverage data ${IE_COVERAGE_OUTPUT}"
DEPENDS ${input_files}
VERBATIM)
add_custom_target(ie_coverage_${IE_COVERAGE_OUTPUT}_info
DEPENDS ${output_file})
set_target_properties(ie_coverage_${IE_COVERAGE_OUTPUT}_info
PROPERTIES FOLDER coverage)
add_dependencies(ie_coverage_${IE_COVERAGE_OUTPUT}_info ${dependencies})
endfunction()
#
# ie_coverage_genhtml(INFO_FILE <info_file> PREFIX <prefix>)
#
function(ie_coverage_genhtml)
cmake_parse_arguments(IE_COVERAGE "" "INFO_FILE;PREFIX" "" ${ARGN})
set(input_file "${IE_COVERAGE_REPORTS}/${IE_COVERAGE_INFO_FILE}.info")
set(output_directory "${IE_COVERAGE_REPORTS}/${IE_COVERAGE_INFO_FILE}")
add_custom_command(OUTPUT "${output_directory}/index.html"
COMMAND genhtml ${input_file} --title "${IE_COVERAGE_INFO_FILE}" --legend
--no-branch-coverage --demangle-cpp
--output-directory "${output_directory}"
--num-spaces 4 --quiet
--prefix "${IE_COVERAGE_PREFIX}"
DEPENDS ${input_file}
COMMENT "Generate HTML report for ${IE_COVERAGE_INFO_FILE}"
VERBATIM)
add_custom_target(ie_coverage_${IE_COVERAGE_INFO_FILE}_genhtml
DEPENDS "${output_directory}/index.html")
set_target_properties(ie_coverage_${IE_COVERAGE_INFO_FILE}_genhtml
PROPERTIES FOLDER coverage)
add_dependencies(ie_coverage_${IE_COVERAGE_INFO_FILE}_genhtml ie_coverage_${IE_COVERAGE_INFO_FILE}_info)
add_dependencies(ie_coverage ie_coverage_${IE_COVERAGE_INFO_FILE}_genhtml)
endfunction()

View File

@@ -1,30 +0,0 @@
# Copyright (C) 2018-2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
if(NOT DEFINED IE_COVERAGE_REPORTS)
message(FATAL_ERROR "IE_COVERAGE_REPORTS variable is not defined")
return()
endif()
file(REMOVE_RECURSE "${IE_COVERAGE_REPORTS}")
if(NOT DEFINED IE_COVERAGE_DIRECTORY)
message(FATAL_ERROR "IE_COVERAGE_DIRECTORY variable is not defined")
return()
endif()
# remove .gcno files which are kept from the previous build
file(GLOB_RECURSE gcno_files "${IE_COVERAGE_DIRECTORY}/*.gcno")
foreach(file IN LISTS gcno_files)
string(REPLACE ".gcno" "" temp_file "${file}")
string(REGEX REPLACE "CMakeFiles/.+dir/" "" temp_file "${temp_file}")
string(REPLACE "${CMAKE_BINARY_DIRECTORY}" "${CMAKE_SOURCE_DIRECTORY}" source_file "${temp_file}")
if(NOT EXISTS "${source_file}")
file(REMOVE "${file}")
string(REPLACE "${CMAKE_BINARY_DIRECTORY}/" "" file "${file}")
message("Removing ${file}")
endif()
endforeach()

View File

@@ -4,26 +4,18 @@
set_temp_directory(TEMP "${IE_MAIN_SOURCE_DIR}")
include(dependency_solver)
if(CMAKE_CROSSCOMPILING AND CMAKE_HOST_SYSTEM_NAME MATCHES Linux AND CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*")
set(protoc_version "3.7.1")
if(CMAKE_CROSSCOMPILING)
if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*")
set(HOST_X86_64 ON)
endif()
set(protoc_version "3.7.1")
if(CMAKE_HOST_SYSTEM_NAME MATCHES Linux)
RESOLVE_DEPENDENCY(SYSTEM_PROTOC_ROOT
ARCHIVE_LIN "protoc-${protoc_version}-linux-x86_64.tar.gz"
TARGET_PATH "${TEMP}/protoc-${protoc_version}-linux-x86_64")
debug_message(STATUS "host protoc-${protoc_version} root path = " ${SYSTEM_PROTOC_ROOT})
else()
message(FATAL_ERROR "Unsupported host system (${CMAKE_HOST_SYSTEM_NAME}) and arch (${CMAKE_HOST_SYSTEM_PROCESSOR}) for cross-compilation")
endif()
RESOLVE_DEPENDENCY(SYSTEM_PROTOC_ROOT
ARCHIVE_LIN "protoc-${protoc_version}-linux-x86_64.tar.gz"
TARGET_PATH "${TEMP}/protoc-${protoc_version}-linux-x86_64"
SHA256 "a1bedd5c05ca51e49f8f254faa3d7331e05b3a806c151fb111d582f154d0fee8"
)
debug_message(STATUS "host protoc-${protoc_version} root path = " ${SYSTEM_PROTOC_ROOT})
reset_deps_cache(SYSTEM_PROTOC)
message("${SYSTEM_PROTOC_ROOT}/bin")
find_program(
SYSTEM_PROTOC
NAMES protoc

View File

@@ -1,226 +0,0 @@
# Copyright (C) 2018 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
list(APPEND CMAKE_MODULE_PATH
"${OpenVINO_MAIN_SOURCE_DIR}/cmake/download"
"${OpenVINO_MAIN_SOURCE_DIR}/cmake/cross_compile"
)
include(CPackComponent)
unset(IE_CPACK_COMPONENTS_ALL CACHE)
set(IE_CPACK_IE_DIR deployment_tools/inference_engine)
# Search packages for the host system instead of packages for the target system
# in case of cross compilation these macros should be defined by the toolchain file
if(NOT COMMAND find_host_package)
macro(find_host_package)
find_package(${ARGN})
endmacro()
endif()
if(NOT COMMAND find_host_program)
macro(find_host_program)
find_program(${ARGN})
endmacro()
endif()
#
# ie_cpack_set_library_dir()
#
# Set library directory for cpack
#
function(ie_cpack_set_library_dir)
string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} ARCH)
if(ARCH STREQUAL "x86_64" OR ARCH STREQUAL "amd64") # Windows detects Intel's 64-bit CPU as AMD64
set(ARCH intel64)
elseif(ARCH STREQUAL "i386")
set(ARCH ia32)
endif()
if(WIN32)
set(IE_CPACK_LIBRARY_PATH ${IE_CPACK_IE_DIR}/lib/${ARCH}/${CMAKE_BUILD_TYPE} PARENT_SCOPE)
set(IE_CPACK_RUNTIME_PATH ${IE_CPACK_IE_DIR}/bin/${ARCH}/${CMAKE_BUILD_TYPE} PARENT_SCOPE)
set(IE_CPACK_ARCHIVE_PATH ${IE_CPACK_IE_DIR}/lib/${ARCH}/${CMAKE_BUILD_TYPE} PARENT_SCOPE)
else()
set(IE_CPACK_LIBRARY_PATH ${IE_CPACK_IE_DIR}/lib/${ARCH} PARENT_SCOPE)
set(IE_CPACK_RUNTIME_PATH ${IE_CPACK_IE_DIR}/lib/${ARCH} PARENT_SCOPE)
set(IE_CPACK_ARCHIVE_PATH ${IE_CPACK_IE_DIR}/lib/${ARCH} PARENT_SCOPE)
endif()
endfunction()
ie_cpack_set_library_dir()
#
# ie_cpack_add_component(NAME ...)
#
# Wraps original `cpack_add_component` and adds component to internal IE list
#
macro(ie_cpack_add_component NAME)
list(APPEND IE_CPACK_COMPONENTS_ALL ${NAME})
set(IE_CPACK_COMPONENTS_ALL "${IE_CPACK_COMPONENTS_ALL}" CACHE STRING "" FORCE)
cpack_add_component(${NAME} ${ARGN})
endmacro()
macro(ie_cpack)
set(CPACK_GENERATOR "TGZ")
string(REPLACE "/" "_" CPACK_PACKAGE_VERSION "${CI_BUILD_NUMBER}")
if(WIN32)
set(CPACK_PACKAGE_NAME inference-engine_${CMAKE_BUILD_TYPE})
else()
set(CPACK_PACKAGE_NAME inference-engine)
endif()
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF)
set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
set(CPACK_PACKAGE_VENDOR "Intel")
set(CPACK_COMPONENTS_ALL ${ARGN})
set(CPACK_STRIP_FILES ON)
if(OS_FOLDER)
set(CPACK_SYSTEM_NAME "${OS_FOLDER}")
endif()
include(CPack)
endmacro()
# prepare temporary folder
function(set_temp_directory temp_variable source_tree_dir)
if (DEFINED ENV{DL_SDK_TEMP} AND NOT $ENV{DL_SDK_TEMP} STREQUAL "")
message(STATUS "DL_SDK_TEMP environment is set : $ENV{DL_SDK_TEMP}")
if (WIN32)
string(REPLACE "\\" "\\\\" temp $ENV{DL_SDK_TEMP})
else()
set(temp $ENV{DL_SDK_TEMP})
endif()
if (ENABLE_ALTERNATIVE_TEMP)
set(ALTERNATIVE_PATH ${source_tree_dir}/temp)
endif()
else ()
set(temp ${source_tree_dir}/temp)
endif()
set("${temp_variable}" "${temp}" CACHE PATH "Path to temp directory")
if(ALTERNATIVE_PATH)
set(ALTERNATIVE_PATH "${ALTERNATIVE_PATH}" PARENT_SCOPE)
endif()
endfunction()
include(coverage/coverage)
# External dependencies
find_package(Threads)
# Detect target
include(target_flags)
# printing debug messages
include(debug)
# linking libraries without discarding symbols
include(whole_archive)
string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} ARCH_FOLDER)
if(X86_64)
set(ARCH_FOLDER intel64)
elseif(X86)
set(ARCH_FOLDER ia32)
endif()
if(OS_FOLDER)
message ("**** OS FOLDER IS: [${OS_FOLDER}]")
if("${OS_FOLDER}" STREQUAL "ON")
message ("**** USING OS FOLDER: [${CMAKE_SYSTEM_NAME}]")
set(BIN_FOLDER "bin/${CMAKE_SYSTEM_NAME}/${ARCH_FOLDER}")
else()
set(BIN_FOLDER "bin/${OS_FOLDER}/${ARCH_FOLDER}")
endif()
else()
set(BIN_FOLDER "bin/${ARCH_FOLDER}")
endif()
if("${CMAKE_BUILD_TYPE}" STREQUAL "")
debug_message(STATUS "CMAKE_BUILD_TYPE not defined, 'Release' will be used")
set(CMAKE_BUILD_TYPE "Release")
endif()
# allow to override default OUTPUT_ROOT root
if(NOT DEFINED OUTPUT_ROOT)
set(OUTPUT_ROOT ${OpenVINO_MAIN_SOURCE_DIR})
endif()
# Enable postfixes for Debug/Release builds
set(IE_DEBUG_POSTFIX_WIN "d")
set(IE_RELEASE_POSTFIX_WIN "")
set(IE_DEBUG_POSTFIX_LIN "")
set(IE_RELEASE_POSTFIX_LIN "")
set(IE_DEBUG_POSTFIX_MAC "d")
set(IE_RELEASE_POSTFIX_MAC "")
if(WIN32)
set(IE_DEBUG_POSTFIX ${IE_DEBUG_POSTFIX_WIN})
set(IE_RELEASE_POSTFIX ${IE_RELEASE_POSTFIX_WIN})
elseif(APPLE)
set(IE_DEBUG_POSTFIX ${IE_DEBUG_POSTFIX_MAC})
set(IE_RELEASE_POSTFIX ${IE_RELEASE_POSTFIX_MAC})
else()
set(IE_DEBUG_POSTFIX ${IE_DEBUG_POSTFIX_LIN})
set(IE_RELEASE_POSTFIX ${IE_RELEASE_POSTFIX_LIN})
endif()
set(CMAKE_DEBUG_POSTFIX ${IE_DEBUG_POSTFIX})
set(CMAKE_RELEASE_POSTFIX ${IE_RELEASE_POSTFIX})
if (WIN32 OR CMAKE_GENERATOR STREQUAL "Xcode")
# Support CMake multiconfiguration for Visual Studio or Xcode build
set(IE_BUILD_POSTFIX $<$<CONFIG:Debug>:${IE_DEBUG_POSTFIX}>$<$<CONFIG:Release>:${IE_RELEASE_POSTFIX}>)
else ()
if (${CMAKE_BUILD_TYPE} STREQUAL "Debug" )
set(IE_BUILD_POSTFIX ${IE_DEBUG_POSTFIX})
else()
set(IE_BUILD_POSTFIX ${IE_RELEASE_POSTFIX})
endif()
endif()
message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
add_definitions(-DIE_BUILD_POSTFIX=\"${IE_BUILD_POSTFIX}\")
if(NOT UNIX)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER})
set(CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER})
set(CMAKE_PDB_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER})
else()
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER}/${CMAKE_BUILD_TYPE}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER}/${CMAKE_BUILD_TYPE}/lib)
set(CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER}/${CMAKE_BUILD_TYPE})
set(CMAKE_PDB_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER}/${CMAKE_BUILD_TYPE})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER}/${CMAKE_BUILD_TYPE})
endif()
if(APPLE)
# WA for Xcode generator + object libraries issue:
# https://gitlab.kitware.com/cmake/cmake/issues/20260
# http://cmake.3232098.n2.nabble.com/XCODE-DEPEND-HELPER-make-Deletes-Targets-Before-and-While-They-re-Built-td7598277.html
set(CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY ON)
set(CMAKE_MACOSX_RPATH ON)
endif()
# Use solution folders
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(CMAKE_POLICY_DEFAULT_CMP0054 NEW)
include(sdl)
include(os_flags)
include(sanitizer)
include(cross_compiled_func)
function(set_ci_build_number)
set(OpenVINO_MAIN_SOURCE_DIR "${CMAKE_SOURCE_DIR}")
include(version)
set(CI_BUILD_NUMBER "${CI_BUILD_NUMBER}" PARENT_SCOPE)
endfunction()
set_ci_build_number()

View File

@@ -25,8 +25,9 @@ endif()
find_package(TBB
CONFIG
NO_DEFAULT_PATH
PATHS ${TBBROOT}/cmake
${CMAKE_CURRENT_LIST_DIR}/${IE_OWN_TBB_CONFIG}
${IEDevScripts_DIR}/${IE_OWN_TBB_CONFIG}
NO_DEFAULT_PATH
)
find_package_handle_standard_args(TBB CONFIG_MODE)

View File

@@ -0,0 +1,246 @@
# Copyright (C) 2018 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
cmake_minimum_required(VERSION 3.13)
if(NOT DEFINED IEDevScripts_DIR)
message(FATAL_ERROR "IEDevScripts_DIR is not defined")
endif()
set(OLD_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH})
set(CMAKE_MODULE_PATH "${IEDevScripts_DIR}")
function(set_ci_build_number)
set(repo_root "${CMAKE_SOURCE_DIR}")
include(version)
set(CI_BUILD_NUMBER "${CI_BUILD_NUMBER}" PARENT_SCOPE)
endfunction()
set_ci_build_number()
include(features)
include(message)
#
# Detect target
#
include(target_flags)
string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} ARCH_FOLDER)
if(X86_64)
set(ARCH_FOLDER intel64)
elseif(X86)
set(ARCH_FOLDER ia32)
elseif(MSVC AND ARM)
set(ARCH_FOLDER arm)
elseif(MSVC AND AARCH64)
set(ARCH_FOLDER arm64)
endif()
#
# Prepare temporary folder
#
function(set_temp_directory temp_variable source_tree_dir)
if (DEFINED ENV{DL_SDK_TEMP} AND NOT $ENV{DL_SDK_TEMP} STREQUAL "")
message(STATUS "DL_SDK_TEMP environment is set : $ENV{DL_SDK_TEMP}")
file(TO_CMAKE_PATH $ENV{DL_SDK_TEMP} temp)
if (ENABLE_ALTERNATIVE_TEMP)
set(ALTERNATIVE_PATH ${source_tree_dir}/temp)
endif()
else ()
set(temp ${source_tree_dir}/temp)
endif()
set("${temp_variable}" "${temp}" CACHE PATH "Path to temp directory")
if(ALTERNATIVE_PATH)
set(ALTERNATIVE_PATH "${ALTERNATIVE_PATH}" PARENT_SCOPE)
endif()
endfunction()
#
# For cross-compilation
#
# Search packages for the host system instead of packages for the target system
# in case of cross compilation these macros should be defined by the toolchain file
if(NOT COMMAND find_host_package)
macro(find_host_package)
find_package(${ARGN})
endmacro()
endif()
if(NOT COMMAND find_host_program)
macro(find_host_program)
find_program(${ARGN})
endmacro()
endif()
#
# Common scripts
#
include(packaging)
include(coverage/coverage)
include(shellcheck/shellcheck)
# printing debug messages
include(debug)
if(OS_FOLDER)
message ("**** OS FOLDER IS: [${OS_FOLDER}]")
if(OS_FOLDER STREQUAL "ON")
message ("**** USING OS FOLDER: [${CMAKE_SYSTEM_NAME}]")
set(BIN_FOLDER "bin/${CMAKE_SYSTEM_NAME}/${ARCH_FOLDER}")
else()
set(BIN_FOLDER "bin/${OS_FOLDER}/${ARCH_FOLDER}")
endif()
else()
set(BIN_FOLDER "bin/${ARCH_FOLDER}")
endif()
if(NOT DEFINED CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "")
message(STATUS "CMAKE_BUILD_TYPE not defined, 'Release' will be used")
set(CMAKE_BUILD_TYPE "Release")
else()
set(RELEASE_TYPES "Debug" "Release" "RelWithDebInfo" "MinSizeRel")
list(FIND RELEASE_TYPES ${CMAKE_BUILD_TYPE} INDEX_FOUND)
if (INDEX_FOUND EQUAL -1)
message(FATAL_ERROR "CMAKE_BUILD_TYPE must be one of Debug, Release, RelWithDebInfo, or MinSizeRel")
endif()
endif()
message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
if(USE_BUILD_TYPE_SUBFOLDER)
set(BIN_FOLDER "${BIN_FOLDER}/${CMAKE_BUILD_TYPE}")
endif()
# allow to override default OUTPUT_ROOT root
if(NOT DEFINED OUTPUT_ROOT)
if(NOT DEFINED OpenVINO_MAIN_SOURCE_DIR)
message(FATAL_ERROR "OpenVINO_MAIN_SOURCE_DIR is not defined")
endif()
set(OUTPUT_ROOT ${OpenVINO_MAIN_SOURCE_DIR})
endif()
# Enable postfixes for Debug/Release builds
set(IE_DEBUG_POSTFIX_WIN "d")
set(IE_RELEASE_POSTFIX_WIN "")
set(IE_DEBUG_POSTFIX_LIN "")
set(IE_RELEASE_POSTFIX_LIN "")
set(IE_DEBUG_POSTFIX_MAC "d")
set(IE_RELEASE_POSTFIX_MAC "")
if(WIN32)
set(IE_DEBUG_POSTFIX ${IE_DEBUG_POSTFIX_WIN})
set(IE_RELEASE_POSTFIX ${IE_RELEASE_POSTFIX_WIN})
elseif(APPLE)
set(IE_DEBUG_POSTFIX ${IE_DEBUG_POSTFIX_MAC})
set(IE_RELEASE_POSTFIX ${IE_RELEASE_POSTFIX_MAC})
else()
set(IE_DEBUG_POSTFIX ${IE_DEBUG_POSTFIX_LIN})
set(IE_RELEASE_POSTFIX ${IE_RELEASE_POSTFIX_LIN})
endif()
set(CMAKE_DEBUG_POSTFIX ${IE_DEBUG_POSTFIX})
set(CMAKE_RELEASE_POSTFIX ${IE_RELEASE_POSTFIX})
if (MSVC OR CMAKE_GENERATOR STREQUAL "Xcode")
# Support CMake multiconfiguration for Visual Studio or Xcode build
set(IE_BUILD_POSTFIX $<$<CONFIG:Debug>:${IE_DEBUG_POSTFIX}>$<$<CONFIG:Release>:${IE_RELEASE_POSTFIX}>)
else ()
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(IE_BUILD_POSTFIX ${IE_DEBUG_POSTFIX})
else()
set(IE_BUILD_POSTFIX ${IE_RELEASE_POSTFIX})
endif()
endif()
add_definitions(-DIE_BUILD_POSTFIX=\"${IE_BUILD_POSTFIX}\")
if(NOT UNIX)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER})
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER})
else()
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER}/lib)
endif()
set(CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER})
set(CMAKE_PDB_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${OUTPUT_ROOT}/${BIN_FOLDER})
if(APPLE)
set(CMAKE_MACOSX_RPATH ON)
# WA for Xcode generator + object libraries issue:
# https://gitlab.kitware.com/cmake/cmake/issues/20260
# http://cmake.3232098.n2.nabble.com/XCODE-DEPEND-HELPER-make-Deletes-Targets-Before-and-While-They-re-Built-td7598277.html
set(CMAKE_XCODE_GENERATE_TOP_LEVEL_PROJECT_ONLY ON)
endif()
# Use solution folders
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# Enable CMAKE_<LANG>_COMPILER_ID AppleClang
set(CMAKE_POLICY_DEFAULT_CMP0025 NEW)
# LTO
if(ENABLE_LTO)
set(CMAKE_POLICY_DEFAULT_CMP0069 NEW)
include(CheckIPOSupported)
check_ipo_supported(RESULT IPO_SUPPORTED
OUTPUT OUTPUT_MESSAGE
LANGUAGES C CXX)
if(NOT IPO_SUPPORTED)
set(ENABLE_LTO "OFF" CACHE STRING "Enable Link Time Optmization" FORCE)
message(WARNING "IPO / LTO is not supported: ${OUTPUT_MESSAGE}")
endif()
endif()
# General flags
include(compile_flags/sdl)
include(compile_flags/os_flags)
include(compile_flags/sanitizer)
include(compile_flags/fuzzing)
include(download/dependency_solver)
include(cross_compile/cross_compiled_func)
include(faster_build)
include(whole_archive)
include(linux_name)
include(models)
include(api_validator/api_validator)
include(vs_version/vs_version)
include(plugins/plugins)
include(add_ie_target)
if(ENABLE_FUZZING)
enable_fuzzing()
endif()
# macro to mark target as conditionally compiled
function(ie_mark_target_as_cc TARGET_NAME)
if(NOT (SELECTIVE_BUILD STREQUAL "ON"))
return()
endif()
if(NOT TARGET ${TARGET_NAME})
message(FATAL_ERROR "${TARGET_NAME} does not represent target")
endif()
get_target_property(sources ${TARGET_NAME} SOURCES)
set_source_files_properties(${sources} PROPERTIES OBJECT_DEPENDS ${GENERATED_HEADER})
endfunction()
# Code style utils
include(cpplint/cpplint)
include(clang_format/clang_format)
# Restore state
set(CMAKE_MODULE_PATH ${OLD_CMAKE_MODULE_PATH})

View File

@@ -8,12 +8,12 @@ Example:
addIeTarget(
NAME core_lib
ADD_CPPLINT
DEVELOPER_PACKAGE
TYPE SHARED
DEVELOPER_PACKAGE <component>
TYPE <SHARED / STATIC / EXECUTABLE>
ROOT ${CMAKE_CURRENT_SOURCE_DIR}
ADDITIONAL_SOURCE_DIRS
/some/additional/sources
EXCLUDED_SOURCE_DIRS
EXCLUDED_SOURCE_PATHS
${CMAKE_CURRENT_SOURCE_DIR}/unnecessary_sources/
INCLUDES
${SDL_INCLUDES}
@@ -31,7 +31,6 @@ addIeTarget(
function(addIeTarget)
set(options
ADD_CPPLINT # Enables code style checks for the target
DEVELOPER_PACKAGE # Enables exporting of the target through the developer package
)
set(oneValueRequiredArgs
TYPE # type of target, SHARED|STATIC|EXECUTABLE. SHARED and STATIC correspond to add_library, EXECUTABLE to add_executable
@@ -39,6 +38,7 @@ function(addIeTarget)
ROOT # root directory to be used for recursive search of source files
)
set(oneValueOptionalArgs
DEVELOPER_PACKAGE # Enables exporting of the target through the developer package
)
set(multiValueArgs
INCLUDES # Extra include directories
@@ -47,7 +47,7 @@ function(addIeTarget)
DEFINES # extra preprocessor definitions
ADDITIONAL_SOURCE_DIRS # list of directories which will be used to recursive search of source files in addition to ROOT
OBJECT_FILES # list of object files to be additionally built into the target
EXCLUDED_SOURCE_DIRS # list of directories excluded from the global recursive search of source files
EXCLUDED_SOURCE_PATHS # list of paths excluded from the global recursive search of source files
LINK_LIBRARIES_WHOLE_ARCHIVE # list of static libraries to link, each object file should be used and not discarded
LINK_FLAGS # list of extra commands to linker
EXPORT_DEPENDENCIES # list of the dependencies to be exported with the target through the developer package
@@ -76,10 +76,10 @@ function(addIeTarget)
file(GLOB_RECURSE sources ${sourceSearch})
# remove unnecessary directories
if (ARG_EXCLUDED_SOURCE_DIRS)
list(FILTER includes EXCLUDE REGEX "${ARG_EXCLUDED_SOURCE_DIRS}/*")
list(FILTER sources EXCLUDE REGEX "${ARG_EXCLUDED_SOURCE_DIRS}/*")
endif()
foreach(excludedDir ${ARG_EXCLUDED_SOURCE_PATHS})
list(FILTER includes EXCLUDE REGEX "${excludedDir}*")
list(FILTER sources EXCLUDE REGEX "${excludedDir}*")
endforeach()
source_group("include" FILES ${includes})
source_group("src" FILES ${sources})
@@ -91,7 +91,7 @@ function(addIeTarget)
if (ARG_TYPE STREQUAL EXECUTABLE)
add_executable(${ARG_NAME} ${all_sources})
elseif(ARG_TYPE STREQUAL STATIC OR ARG_TYPE STREQUAL SHARED)
add_library(${ARG_NAME} ${type} ${all_sources})
add_library(${ARG_NAME} ${ARG_TYPE} ${all_sources})
else()
message(SEND_ERROR "Invalid target type ${ARG_TYPE} specified for target name ${ARG_NAME}")
endif()
@@ -121,11 +121,14 @@ function(addIeTarget)
endif()
if (ARG_DEVELOPER_PACKAGE)
# developer package
ie_developer_export_targets(${ARG_NAME})
if (ARG_EXPORT_DEPENDENCIES)
ie_developer_export_targets(${ARG_NAME} ${ARG_EXPORT_DEPENDENCIES})
endif()
openvino_developer_export_targets(COMPONENT ${ARG_DEVELOPER_PACKAGE}
TARGETS ${ARG_NAME} ${ARG_EXPORT_DEPENDENCIES})
endif()
if(WIN32)
# Provide default compile pdb name equal to target name
set_target_properties(${ARG_NAME} PROPERTIES COMPILE_PDB_NAME ${ARG_NAME})
endif()
endfunction()
#[[

View File

@@ -0,0 +1,128 @@
# Copyright (C) 2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
if(WIN32)
set(PROGRAMFILES_ENV "ProgramFiles(X86)")
file(TO_CMAKE_PATH $ENV{${PROGRAMFILES_ENV}} PROGRAMFILES)
set(UWP_SDK_PATH "${PROGRAMFILES}/Windows Kits/10/bin/${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}/x64")
message(STATUS "Trying to find apivalidator in: ${UWP_SDK_PATH}")
find_host_program(UWP_API_VALIDATOR
NAMES apivalidator
PATHS "${UWP_SDK_PATH}"
DOC "ApiValidator for UWP compliance")
if(UWP_API_VALIDATOR)
message(STATUS "Found apivalidator: ${UWP_API_VALIDATOR}")
endif()
endif()
function(_ie_add_api_validator_post_build_step_recursive)
cmake_parse_arguments(API_VALIDATOR "" "TARGET" "" ${ARGN})
list(APPEND API_VALIDATOR_TARGETS ${API_VALIDATOR_TARGET})
set(API_VALIDATOR_TARGETS ${API_VALIDATOR_TARGETS} PARENT_SCOPE)
get_target_property(IS_IMPORTED ${API_VALIDATOR_TARGET} IMPORTED)
if(IS_IMPORTED)
return()
endif()
get_target_property(LIBRARY_TYPE ${API_VALIDATOR_TARGET} TYPE)
if(LIBRARY_TYPE STREQUAL "EXECUTABLE" OR LIBRARY_TYPE STREQUAL "SHARED_LIBRARY")
get_target_property(LINKED_LIBRARIES ${API_VALIDATOR_TARGET} LINK_LIBRARIES)
if(LINKED_LIBRARIES)
foreach(ITEM IN LISTS LINKED_LIBRARIES)
if(NOT TARGET ${ITEM})
continue()
endif()
get_target_property(LIBRARY_TYPE_DEPENDENCY ${ITEM} TYPE)
if(LIBRARY_TYPE_DEPENDENCY STREQUAL "SHARED_LIBRARY")
_ie_add_api_validator_post_build_step_recursive(TARGET ${ITEM})
endif()
endforeach()
endif()
endif()
set(API_VALIDATOR_TARGETS ${API_VALIDATOR_TARGETS} PARENT_SCOPE)
endfunction()
set(VALIDATED_LIBRARIES "" CACHE INTERNAL "")
function(_ie_add_api_validator_post_build_step)
set(UWP_API_VALIDATOR_APIS "${PROGRAMFILES}/Windows Kits/10/build/universalDDIs/x64/UniversalDDIs.xml")
set(UWP_API_VALIDATOR_EXCLUSION "${UWP_SDK_PATH}/BinaryExclusionlist.xml")
if((NOT UWP_API_VALIDATOR) OR (WINDOWS_STORE OR WINDOWS_PHONE))
return()
endif()
cmake_parse_arguments(API_VALIDATOR "" "TARGET" "" ${ARGN})
if(NOT API_VALIDATOR_TARGET)
message(FATAL_ERROR "RunApiValidator requires TARGET to validate!")
endif()
if(NOT TARGET ${API_VALIDATOR_TARGET})
message(FATAL_ERROR "${API_VALIDATOR_TARGET} is not a TARGET in the project tree.")
endif()
# collect targets
_ie_add_api_validator_post_build_step_recursive(TARGET ${API_VALIDATOR_TARGET})
# remove targets which were tested before
foreach(item IN LISTS VALIDATED_LIBRARIES)
list(REMOVE_ITEM API_VALIDATOR_TARGETS ${item})
endforeach()
list(REMOVE_DUPLICATES API_VALIDATOR_TARGETS)
if(NOT API_VALIDATOR_TARGETS)
return()
endif()
# apply check
macro(api_validator_get_target_name)
get_target_property(IS_IMPORTED ${target} IMPORTED)
if(IS_IMPORTED)
get_target_property(target_location ${target} LOCATION)
get_filename_component(target_name "${target_location}" NAME_WE)
else()
set(target_name ${target})
endif()
endmacro()
foreach(target IN LISTS API_VALIDATOR_TARGETS)
api_validator_get_target_name()
set(output_file "${CMAKE_BINARY_DIR}/api_validator/${target_name}.txt")
add_custom_command(TARGET ${API_VALIDATOR_TARGET} POST_BUILD
COMMAND ${CMAKE_COMMAND}
-D UWP_API_VALIDATOR=${UWP_API_VALIDATOR}
-D UWP_API_VALIDATOR_TARGET=$<TARGET_FILE:${target}>
-D UWP_API_VALIDATOR_APIS=${UWP_API_VALIDATOR_APIS}
-D UWP_API_VALIDATOR_EXCLUSION=${UWP_API_VALIDATOR_EXCLUSION}
-D UWP_API_VALIDATOR_OUTPUT=${output_file}
-D CMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}
-P "${IEDevScripts_DIR}/api_validator/api_validator_run.cmake"
BYPRODUCTS ${output_file}
COMMENT "[apiValidator] Check ${target_name} for OneCore compliance"
VERBATIM)
endforeach()
# update list of validated libraries
list(APPEND VALIDATED_LIBRARIES ${API_VALIDATOR_TARGETS})
set(VALIDATED_LIBRARIES "${VALIDATED_LIBRARIES}" CACHE INTERNAL "" FORCE)
endfunction()
#
# ie_add_api_validator_post_build_step(TARGET <name>)
#
macro(ie_add_api_validator_post_build_step)
_ie_add_api_validator_post_build_step(${ARGV})
endmacro()

View File

@@ -0,0 +1,73 @@
# Copyright (C) 2018-2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
cmake_policy(SET CMP0012 NEW)
foreach(var UWP_API_VALIDATOR UWP_API_VALIDATOR_TARGET
UWP_API_VALIDATOR_APIS UWP_API_VALIDATOR_EXCLUSION
UWP_API_VALIDATOR_OUTPUT CMAKE_TOOLCHAIN_FILE)
if(NOT DEFINED ${var})
message(FATAL_ERROR "Variable ${var} is not defined")
endif()
endforeach()
# create command
if(NOT EXISTS "${UWP_API_VALIDATOR_APIS}")
message(FATAL_ERROR "${UWP_API_VALIDATOR_APIS} does not exist")
endif()
set(command "${UWP_API_VALIDATOR}"
-SupportedApiXmlFiles:${UWP_API_VALIDATOR_APIS}
-DriverPackagePath:${UWP_API_VALIDATOR_TARGET})
if(EXISTS "${UWP_API_VALIDATOR_EXCLUSION}")
list(APPEND command
-BinaryExclusionListXmlFile:${UWP_API_VALIDATOR_EXCLUSION}
-StrictCompliance:TRUE)
set(UWP_HAS_BINARY_EXCLUSION ON)
endif()
# execute
execute_process(COMMAND ${command}
OUTPUT_VARIABLE output_message
ERROR_VARIABLE error_message
RESULT_VARIABLE exit_code
OUTPUT_STRIP_TRAILING_WHITESPACE)
file(WRITE "${UWP_API_VALIDATOR_OUTPUT}" "${output_message}\n\n\n${error_message}")
# post-process output
get_filename_component(name "${UWP_API_VALIDATOR_TARGET}" NAME)
if(NOT UWP_HAS_BINARY_EXCLUSION)
if(CMAKE_TOOLCHAIN_FILE MATCHES "onecoreuap.toolchain.cmake$")
# empty since we compile with static MSVC runtime
else()
set(exclusion_dlls "msvcp140.dll" "vcruntime140.dll")
endif()
# remove exclusions from error_message
foreach(dll IN LISTS exclusion_dlls)
string(REGEX REPLACE
"ApiValidation: Error: ${name} has unsupported API call to \"${dll}![^\"]+\"\n"
"" error_message "${error_message}")
endforeach()
# throw error if error_message still contains any errors
if(error_message)
message(FATAL_ERROR "${error_message}")
endif()
endif()
# write output
if(UWP_HAS_BINARY_EXCLUSION AND NOT exit_code EQUAL 0)
message(FATAL_ERROR "${error_message}")
endif()
message("ApiValidator: ${name} has passed the OneCore compliance")

View File

@@ -76,10 +76,10 @@ function(add_clang_format_target TARGET_NAME)
-D "CLANG_FORMAT=${CLANG_FORMAT}"
-D "INPUT_FILE=${source_file}"
-D "OUTPUT_FILE=${output_file}"
-P "${IE_MAIN_SOURCE_DIR}/cmake/clang_format_check.cmake"
-P "${IEDevScripts_DIR}/clang_format/clang_format_check.cmake"
DEPENDS
"${source_file}"
"${IE_MAIN_SOURCE_DIR}/cmake/clang_format_check.cmake"
"${IEDevScripts_DIR}/clang_format/clang_format_check.cmake"
COMMENT
"[clang-format] ${source_file}"
VERBATIM)
@@ -102,10 +102,10 @@ function(add_clang_format_target TARGET_NAME)
-D "CLANG_FORMAT=${CLANG_FORMAT}"
-D "INPUT_FILES=${CLANG_FORMAT_FOR_SOURCES}"
-D "EXCLUDE_PATTERNS=${CLANG_FORMAT_EXCLUDE_PATTERNS}"
-P "${IE_MAIN_SOURCE_DIR}/cmake/clang_format_fix.cmake"
-P "${IEDevScripts_DIR}/clang_format/clang_format_fix.cmake"
DEPENDS
"${CLANG_FORMAT_FOR_SOURCES}"
"${IE_MAIN_SOURCE_DIR}/cmake/clang_format_fix.cmake"
"${IEDevScripts_DIR}/clang_format/clang_format_fix.cmake"
COMMENT
"[clang-format] ${TARGET_NAME}_fix"
VERBATIM)

View File

@@ -0,0 +1,25 @@
# Copyright (C) 2018-2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
macro(enable_fuzzing)
# Enable (libFuzzer)[https://llvm.org/docs/LibFuzzer.html] if supported.
set(FUZZING_COMPILER_FLAGS "-fsanitize=fuzzer-no-link -fprofile-instr-generate -fcoverage-mapping")
set(FUZZING_LINKER_FLAGS "-fsanitize-coverage=trace-pc-guard -fprofile-instr-generate")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${FUZZING_COMPILER_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FUZZING_COMPILER_FLAGS}")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${FUZZING_LINKER_FLAGS}")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${FUZZING_LINKER_FLAGS}")
unset(FUZZING_COMPILER_FLAGS)
unset(FUZZING_LINKER_FLAGS)
endmacro()
function(add_fuzzer FUZZER_EXE_NAME FUZZER_SOURCES)
add_executable(${FUZZER_EXE_NAME} ${FUZZER_SOURCES})
target_link_libraries(${FUZZER_EXE_NAME} PRIVATE fuzz-testhelper)
if(ENABLE_FUZZING)
set_target_properties(${FUZZER_EXE_NAME} PROPERTIES LINK_FLAGS "-fsanitize=fuzzer")
endif()
endfunction(add_fuzzer)

View File

@@ -126,44 +126,35 @@ function(ie_avx512_optimization_flags flags)
endif()
endfunction()
function(ie_arm_neon_optimization_flags flags)
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
message(WARNING "Unsupported CXX compiler ${CMAKE_CXX_COMPILER_ID}")
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
# nothing
elseif(ANDROID)
if(ANDROID_ABI STREQUAL "arm64-v8a")
set(${flags} "-mfpu=neon" PARENT_SCOPE)
elseif(ANDROID_ABI STREQUAL "armeabi-v7a-hard with NEON")
set(${flags} "-march=armv7-a -mfloat-abi=hard -mhard-float -D_NDK_MATH_NO_SOFTFP=1 -mfpu=neon" PARENT_SCOPE)
elseif((ANDROID_ABI STREQUAL "armeabi-v7a with NEON") OR
(ANDROID_ABI STREQUAL "armeabi-v7a" AND
DEFINED CMAKE_ANDROID_ARM_NEON AND CMAKE_ANDROID_ARM_NEON))
set(${flags} "-march=armv7-a -mfloat-abi=softfp -mfpu=neon" PARENT_SCOPE)
endif()
else()
if(AARCH64)
set(${flags} "-O2 -ftree-vectorize" PARENT_SCOPE)
elseif(ARM)
set(${flags} "-mfpu=neon" PARENT_SCOPE)
endif()
endif()
endfunction()
#
# Enables Link Time Optimization compilation
#
macro(ie_enable_lto)
if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel" AND OFF)
ProcessorCount(N)
if(UNIX)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ipo")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -ipo")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} -ipo-jobs${N}")
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} -ipo-jobs${N}")
set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} -ipo-jobs${N}")
else()
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Qipo")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Qipo")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /Qipo-jobs:${N}")
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /Qipo-jobs:${N}")
set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} /Qipo-jobs:${N}")
endif()
elseif(UNIX)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -flto")
# LTO causes issues with gcc 4.8.5 during cmake pthread check
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9)
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -flto")
endif()
# modify linker and ar
if(LINUX)
set(CMAKE_AR "gcc-ar")
set(CMAKE_RANLIB "gcc-ranlib")
endif()
elseif(MSVC AND OFF)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /GL")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /GL")
set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG:STATUS")
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /LTCG:STATUS")
set(CMAKE_MODULE_LINKER_FLAGS_RELEASE "${CMAKE_MODULE_LINKER_FLAGS_RELEASE} /LTCG:STATUS")
endif()
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ON)
endmacro()
#
@@ -176,6 +167,17 @@ macro(ie_add_compiler_flags)
endforeach()
endmacro()
#
# Forced includes certain header file to all target source files
#
function(ov_force_include target scope header_file)
if(MSVC)
target_compile_options(${target} ${scope} /FI"${header_file}")
else()
target_compile_options(${target} ${scope} -include "${header_file}")
endif()
endfunction()
#
# Compilation and linker flags
#
@@ -195,15 +197,15 @@ if(NOT DEFINED CMAKE_CXX_STANDARD)
endif()
if(ENABLE_COVERAGE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage")
ie_add_compiler_flags(--coverage)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} --coverage")
endif()
if(NOT MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsigned-char")
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
ie_add_compiler_flags(-fsigned-char)
endif()
# Honor visibility properties for all target types
set(CMAKE_POLICY_DEFAULT_CMP0063 NEW)
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_C_VISIBILITY_PRESET hidden)
@@ -227,6 +229,7 @@ if(WIN32)
# Compiler specific flags
ie_add_compiler_flags(/bigobj)
ie_add_compiler_flags(/MP)
# Disable noisy warnings
@@ -251,10 +254,14 @@ if(WIN32)
ie_add_compiler_flags(/Qdiag-disable:161,177,556,1744,1879,2586,2651,3180,11075,15335)
endif()
# Debug information flags
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /Z7")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Z7")
# Debug information flags, by default CMake adds /Zi option
# but provides no way to specify CMAKE_COMPILE_PDB_NAME on root level
# In order to avoid issues with ninja we are replacing default flag instead of having two of them
# and observing warning D9025 about flag override
string(REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
string(REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
else()
# TODO: enable for C sources as well
# ie_add_compiler_flags(-Werror)
@@ -266,6 +273,7 @@ else()
ie_add_compiler_flags(-fdiagnostics-show-option)
ie_add_compiler_flags(-Wundef)
ie_add_compiler_flags(-Wreturn-type)
ie_add_compiler_flags(-Wunused-variable)
# Disable noisy warnings

View File

@@ -4,6 +4,14 @@
include(CheckCXXCompilerFlag)
if (ENABLE_SANITIZER OR ENABLE_THREAD_SANITIZER)
# This is workaround for https://gitlab.kitware.com/cmake/cmake/-/issues/16609.
# It ensures pthread is searched without ASAN linking.
# Line bellow must be before adding -fsanitize=address or -fsanitize=thread to
# build options for the trick to work.
find_package(Threads REQUIRED)
endif()
if (ENABLE_SANITIZER)
set(SANITIZER_COMPILER_FLAGS "-g -fsanitize=address -fno-omit-frame-pointer")
CHECK_CXX_COMPILER_FLAG("-fsanitize-recover=address" SANITIZE_RECOVER_SUPPORTED)

View File

@@ -0,0 +1,211 @@
# Copyright (C) 2018-2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
if(NOT TARGET ie_coverage_clean)
add_custom_target(ie_coverage_clean)
set_target_properties(ie_coverage_clean PROPERTIES FOLDER coverage)
endif()
if(NOT TARGET ie_coverage_init)
add_custom_target(ie_coverage_init)
set_target_properties(ie_coverage_init PROPERTIES FOLDER coverage)
endif()
if(NOT TARGET ie_coverage)
add_custom_target(ie_coverage)
set_target_properties(ie_coverage PROPERTIES FOLDER coverage)
endif()
set(IE_COVERAGE_REPORTS "${CMAKE_BINARY_DIR}/coverage")
set(IE_COVERAGE_SCRIPT_DIR "${IEDevScripts_DIR}/coverage")
include(CMakeParseArguments)
#
# ie_coverage_clean(REPOSITORY <repo> DIRECTORY <dir>)
#
function(ie_coverage_clean)
cmake_parse_arguments(IE_COVERAGE "" "REPOSITORY;DIRECTORY" "" ${ARGN})
add_custom_target(ie_coverage_zerocounters_${IE_COVERAGE_REPOSITORY}
COMMAND lcov --zerocounters --quiet
--directory "${IE_COVERAGE_DIRECTORY}"
COMMENT "Add zero counters for coverage for ${IE_COVERAGE_REPOSITORY}"
VERBATIM)
add_custom_target(ie_coverage_clean_${IE_COVERAGE_REPOSITORY}
COMMAND ${CMAKE_COMMAND}
-D "IE_COVERAGE_REPORTS=${IE_COVERAGE_REPORTS}"
-D "IE_COVERAGE_DIRECTORY=${IE_COVERAGE_DIRECTORY}"
-D "CMAKE_BINARY_DIRECTORY=${CMAKE_BINARY_DIR}"
-D "CMAKE_SOURCE_DIRECTORY=${CMAKE_SOURCE_DIR}"
-P "${IE_COVERAGE_SCRIPT_DIR}/coverage_clean.cmake"
COMMENT "Clean previously created HTML report files for ${IE_COVERAGE_REPOSITORY}"
DEPENDS "${IE_COVERAGE_SCRIPT_DIR}/coverage_clean.cmake"
VERBATIM)
set_target_properties(ie_coverage_zerocounters_${IE_COVERAGE_REPOSITORY}
ie_coverage_clean_${IE_COVERAGE_REPOSITORY}
PROPERTIES FOLDER coverage)
add_dependencies(ie_coverage_clean ie_coverage_zerocounters_${IE_COVERAGE_REPOSITORY}
ie_coverage_clean_${IE_COVERAGE_REPOSITORY})
endfunction()
#
# ie_coverage_capture(INFO_FILE <info_file>
# BASE_DIRECTORY <base dir>
# DIRECTORY <gcda dir>)
#
function(ie_coverage_capture)
cmake_parse_arguments(IE_COVERAGE "" "INFO_FILE;BASE_DIRECTORY;DIRECTORY" "" ${ARGN})
set(output_file "${IE_COVERAGE_REPORTS}/${IE_COVERAGE_INFO_FILE}.info")
set(output_base_file "${IE_COVERAGE_REPORTS}/${IE_COVERAGE_INFO_FILE}_base.info")
set(output_tests_file "${IE_COVERAGE_REPORTS}/${IE_COVERAGE_INFO_FILE}_tests.info")
add_custom_command(OUTPUT ${output_base_file}
COMMAND ${CMAKE_COMMAND} -E make_directory "${IE_COVERAGE_REPORTS}"
COMMAND lcov --no-external --capture --initial --quiet
--directory "${IE_COVERAGE_DIRECTORY}"
--base-directory "${IE_COVERAGE_BASE_DIRECTORY}"
--output-file ${output_base_file}
COMMENT "Capture initial coverage data ${IE_COVERAGE_INFO_FILE}"
VERBATIM)
add_custom_command(OUTPUT ${output_tests_file}
COMMAND ${CMAKE_COMMAND} -E make_directory "${IE_COVERAGE_REPORTS}"
COMMAND lcov --no-external --capture --quiet
--directory "${IE_COVERAGE_DIRECTORY}"
--base-directory "${IE_COVERAGE_BASE_DIRECTORY}"
--output-file ${output_tests_file}
COMMENT "Capture test coverage data ${IE_COVERAGE_INFO_FILE}"
VERBATIM)
add_custom_command(OUTPUT ${output_file}
COMMAND ${CMAKE_COMMAND}
-D "IE_COVERAGE_OUTPUT_FILE=${output_file}"
-D "IE_COVERAGE_INPUT_FILES=${output_base_file};${output_tests_file}"
-P "${IE_COVERAGE_SCRIPT_DIR}/coverage_merge.cmake"
COMMENT "Generate total coverage data ${IE_COVERAGE_INFO_FILE}"
DEPENDS ${output_base_file} ${output_tests_file}
VERBATIM)
add_custom_target(ie_coverage_${IE_COVERAGE_INFO_FILE}_info
DEPENDS ${output_file})
set_target_properties(ie_coverage_${IE_COVERAGE_INFO_FILE}_info
PROPERTIES FOLDER coverage)
endfunction()
#
# ie_coverage_extract(INPUT <info_file> OUTPUT <output_file> PATTERNS <patterns ...>)
#
function(ie_coverage_extract)
cmake_parse_arguments(IE_COVERAGE "" "INPUT;OUTPUT" "PATTERNS" ${ARGN})
set(input_file "${IE_COVERAGE_REPORTS}/${IE_COVERAGE_INPUT}.info")
set(output_file "${IE_COVERAGE_REPORTS}/${IE_COVERAGE_OUTPUT}.info")
set(commands lcov --quiet)
foreach(pattern IN LISTS IE_COVERAGE_PATTERNS)
list(APPEND commands --extract ${input_file} ${pattern})
endforeach()
list(APPEND commands --output-file ${output_file})
add_custom_command(OUTPUT ${output_file}
COMMAND ${commands}
COMMENT "Generate coverage data ${IE_COVERAGE_OUTPUT}"
DEPENDS ${input_file}
VERBATIM)
add_custom_target(ie_coverage_${IE_COVERAGE_OUTPUT}_info
DEPENDS ${output_file})
set_target_properties(ie_coverage_${IE_COVERAGE_OUTPUT}_info
PROPERTIES FOLDER coverage)
add_dependencies(ie_coverage_${IE_COVERAGE_OUTPUT}_info ie_coverage_${IE_COVERAGE_INPUT}_info)
endfunction()
#
# ie_coverage_remove(INPUT <info_file> OUTPUT <output_file> PATTERNS <patterns ...>)
#
function(ie_coverage_remove)
cmake_parse_arguments(IE_COVERAGE "" "INPUT;OUTPUT" "PATTERNS" ${ARGN})
set(input_file "${IE_COVERAGE_REPORTS}/${IE_COVERAGE_INPUT}.info")
set(output_file "${IE_COVERAGE_REPORTS}/${IE_COVERAGE_OUTPUT}.info")
set(commands lcov --quiet)
foreach(pattern IN LISTS IE_COVERAGE_PATTERNS)
list(APPEND commands --remove ${input_file} ${pattern})
endforeach()
list(APPEND commands --output-file ${output_file})
add_custom_command(OUTPUT ${output_file}
COMMAND ${commands}
COMMENT "Generate coverage data ${IE_COVERAGE_OUTPUT}"
DEPENDS ${input_file}
VERBATIM)
add_custom_target(ie_coverage_${IE_COVERAGE_OUTPUT}_info
DEPENDS ${output_file})
set_target_properties(ie_coverage_${IE_COVERAGE_OUTPUT}_info
PROPERTIES FOLDER coverage)
add_dependencies(ie_coverage_${IE_COVERAGE_OUTPUT}_info ie_coverage_${IE_COVERAGE_INPUT}_info)
endfunction()
#
# ie_coverage_merge(OUTPUT <output file> INPUTS <input files ...>)
#
function(ie_coverage_merge)
cmake_parse_arguments(IE_COVERAGE "" "OUTPUT" "INPUTS" ${ARGN})
set(output_file "${IE_COVERAGE_REPORTS}/${IE_COVERAGE_OUTPUT}.info")
foreach(input_info_file IN LISTS IE_COVERAGE_INPUTS)
set(input_file ${IE_COVERAGE_REPORTS}/${input_info_file}.info)
list(APPEND dependencies ie_coverage_${input_info_file}_info)
list(APPEND input_files ${input_file})
endforeach()
add_custom_command(OUTPUT ${output_file}
COMMAND ${CMAKE_COMMAND}
-D "IE_COVERAGE_OUTPUT_FILE=${output_file}"
-D "IE_COVERAGE_INPUT_FILES=${input_files}"
-P "${IE_COVERAGE_SCRIPT_DIR}/coverage_merge.cmake"
COMMENT "Generate coverage data ${IE_COVERAGE_OUTPUT}"
DEPENDS ${input_files}
VERBATIM)
add_custom_target(ie_coverage_${IE_COVERAGE_OUTPUT}_info
DEPENDS ${output_file})
set_target_properties(ie_coverage_${IE_COVERAGE_OUTPUT}_info
PROPERTIES FOLDER coverage)
add_dependencies(ie_coverage_${IE_COVERAGE_OUTPUT}_info ${dependencies})
endfunction()
#
# ie_coverage_genhtml(INFO_FILE <info_file> PREFIX <prefix>)
#
function(ie_coverage_genhtml)
cmake_parse_arguments(IE_COVERAGE "" "INFO_FILE;PREFIX" "" ${ARGN})
set(input_file "${IE_COVERAGE_REPORTS}/${IE_COVERAGE_INFO_FILE}.info")
set(output_directory "${IE_COVERAGE_REPORTS}/${IE_COVERAGE_INFO_FILE}")
add_custom_command(OUTPUT "${output_directory}/index.html"
COMMAND genhtml ${input_file} --title "${IE_COVERAGE_INFO_FILE}" --legend
--no-branch-coverage --demangle-cpp
--output-directory "${output_directory}"
--num-spaces 4 --quiet
--prefix "${IE_COVERAGE_PREFIX}"
DEPENDS ${input_file}
COMMENT "Generate HTML report for ${IE_COVERAGE_INFO_FILE}"
VERBATIM)
add_custom_target(ie_coverage_${IE_COVERAGE_INFO_FILE}_genhtml
DEPENDS "${output_directory}/index.html")
set_target_properties(ie_coverage_${IE_COVERAGE_INFO_FILE}_genhtml
PROPERTIES FOLDER coverage)
add_dependencies(ie_coverage_${IE_COVERAGE_INFO_FILE}_genhtml ie_coverage_${IE_COVERAGE_INFO_FILE}_info)
add_dependencies(ie_coverage ie_coverage_${IE_COVERAGE_INFO_FILE}_genhtml)
endfunction()

View File

@@ -0,0 +1,30 @@
# Copyright (C) 2018-2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
if(NOT DEFINED IE_COVERAGE_REPORTS)
message(FATAL_ERROR "IE_COVERAGE_REPORTS variable is not defined")
return()
endif()
file(REMOVE_RECURSE "${IE_COVERAGE_REPORTS}")
if(NOT DEFINED IE_COVERAGE_DIRECTORY)
message(FATAL_ERROR "IE_COVERAGE_DIRECTORY variable is not defined")
return()
endif()
# remove .gcno files which are kept from the previous build
file(GLOB_RECURSE gcno_files "${IE_COVERAGE_DIRECTORY}/*.gcno")
foreach(file IN LISTS gcno_files)
string(REPLACE ".gcno" "" temp_file "${file}")
string(REGEX REPLACE "CMakeFiles/.+dir/" "" temp_file "${temp_file}")
string(REPLACE "${CMAKE_BINARY_DIRECTORY}" "${CMAKE_SOURCE_DIRECTORY}" source_file "${temp_file}")
if(NOT EXISTS "${source_file}")
file(REMOVE "${file}")
string(REPLACE "${CMAKE_BINARY_DIRECTORY}/" "" file "${file}")
message("Removing ${file}")
endif()
endforeach()

View File

@@ -0,0 +1,106 @@
# Copyright (C) 2018-2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
if(ENABLE_CPPLINT)
find_package(Python3 COMPONENTS Interpreter)
if(NOT Python3_Interpreter_FOUND)
message(WARNING "Python3 interpreter was not found (required for cpplint check)")
set(ENABLE_CPPLINT OFF)
endif()
endif()
if(ENABLE_CPPLINT)
add_custom_target(cpplint_all ALL)
set_target_properties(cpplint_all PROPERTIES FOLDER cpplint)
set(CPPLINT_ALL_OUTPUT_FILES "" CACHE INTERNAL "All cpplint output files")
endif()
function(add_cpplint_target TARGET_NAME)
if(NOT ENABLE_CPPLINT)
return()
endif()
set(options "")
set(oneValueArgs "")
set(multiValueArgs FOR_TARGETS FOR_SOURCES EXCLUDE_PATTERNS CUSTOM_FILTERS)
cmake_parse_arguments(CPPLINT "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
foreach(target IN LISTS CPPLINT_FOR_TARGETS)
get_target_property(target_sources "${target}" SOURCES)
list(APPEND CPPLINT_FOR_SOURCES ${target_sources})
endforeach()
list(REMOVE_DUPLICATES CPPLINT_FOR_SOURCES)
set(custom_filter "")
foreach(filter IN LISTS CPPLINT_CUSTOM_FILTERS)
string(CONCAT custom_filter "${custom_filter}" "," "${filter}")
endforeach()
set(all_output_files "")
foreach(source_file IN LISTS CPPLINT_FOR_SOURCES)
set(exclude FALSE)
foreach(pattern IN LISTS CPPLINT_EXCLUDE_PATTERNS)
if(source_file MATCHES "${pattern}")
set(exclude ON)
break()
endif()
endforeach()
if(exclude)
continue()
endif()
# ignore object libraries
if(NOT EXISTS "${source_file}")
continue()
endif()
file(RELATIVE_PATH source_file_relative "${CMAKE_CURRENT_SOURCE_DIR}" "${source_file}")
set(output_file "${CMAKE_CURRENT_BINARY_DIR}/cpplint/${source_file_relative}.cpplint")
string(REPLACE ".." "__" output_file "${output_file}")
get_filename_component(output_dir "${output_file}" DIRECTORY)
file(MAKE_DIRECTORY "${output_dir}")
add_custom_command(
OUTPUT
"${output_file}"
COMMAND
"${CMAKE_COMMAND}"
-D "CPPLINT_SCRIPT=${IEDevScripts_DIR}/cpplint/cpplint.py"
-D "INPUT_FILE=${source_file}"
-D "OUTPUT_FILE=${output_file}"
-D "WORKING_DIRECTORY=${CMAKE_CURRENT_SOURCE_DIR}"
-D "SKIP_RETURN_CODE=${ENABLE_CPPLINT_REPORT}"
-D "CUSTOM_FILTER=${custom_filter}"
-P "${IEDevScripts_DIR}/cpplint/cpplint_run.cmake"
DEPENDS
"${source_file}"
"${IEDevScripts_DIR}/cpplint/cpplint.py"
"${IEDevScripts_DIR}/cpplint/cpplint_run.cmake"
COMMENT
"[cpplint] ${source_file}"
VERBATIM)
list(APPEND all_output_files "${output_file}")
endforeach()
set(CPPLINT_ALL_OUTPUT_FILES
${CPPLINT_ALL_OUTPUT_FILES} ${all_output_files}
CACHE INTERNAL
"All cpplint output files")
add_custom_target(${TARGET_NAME} ALL
DEPENDS ${all_output_files}
COMMENT "[cpplint] ${TARGET_NAME}")
set_target_properties(${TARGET_NAME} PROPERTIES FOLDER cpplint)
if(CPPLINT_FOR_TARGETS)
foreach(target IN LISTS CPPLINT_FOR_TARGETS)
add_dependencies(${target} ${TARGET_NAME})
endforeach()
endif()
add_dependencies(cpplint_all ${TARGET_NAME})
endfunction()

View File

@@ -2,10 +2,9 @@
# SPDX-License-Identifier: Apache-2.0
#
include ("download")
function (resolve_archive_dependency VAR COMPONENT ARCHIVE ARCHIVE_UNIFIED ARCHIVE_WIN ARCHIVE_LIN ARCHIVE_MAC ARCHIVE_ANDROID TARGET_PATH FOLDER ENVIRONMENT)
include (download/download)
function (resolve_archive_dependency VAR COMPONENT ARCHIVE ARCHIVE_UNIFIED ARCHIVE_WIN ARCHIVE_LIN ARCHIVE_MAC ARCHIVE_ANDROID TARGET_PATH FOLDER ENVIRONMENT SHA256)
if (ENVIRONMENT AND (DEFINED ${ENVIRONMENT} OR DEFINED ENV{${ENVIRONMENT}}))
set(HAS_ENV "TRUE")
endif()
@@ -13,9 +12,9 @@ function (resolve_archive_dependency VAR COMPONENT ARCHIVE ARCHIVE_UNIFIED ARCHI
if (NOT DEFINED HAS_ENV)
if (ARCHIVE)
#TODO: check whether this is platform specific binary with same name per or it is in common folder
DownloadAndExtract(${COMPONENT} ${ARCHIVE} ${TARGET_PATH} result_path ${FOLDER})
DownloadAndExtract(${COMPONENT} ${ARCHIVE} ${TARGET_PATH} result_path ${FOLDER} ${SHA256})
else()
DownloadAndExtractPlatformSpecific(${COMPONENT} ${ARCHIVE_UNIFIED} ${ARCHIVE_WIN} ${ARCHIVE_LIN} ${ARCHIVE_MAC} ${ARCHIVE_ANDROID} ${TARGET_PATH} result_path ${FOLDER})
DownloadAndExtractPlatformSpecific(${COMPONENT} ${ARCHIVE_UNIFIED} ${ARCHIVE_WIN} ${ARCHIVE_LIN} ${ARCHIVE_MAC} ${ARCHIVE_ANDROID} ${TARGET_PATH} result_path ${FOLDER} ${SHA256})
endif()
set (${VAR} ${result_path} PARENT_SCOPE)
@@ -54,7 +53,7 @@ endfunction(read_version)
function (RESOLVE_DEPENDENCY NAME_OF_CMAKE_VAR)
list(REMOVE_AT ARGV 0)
set(SUPPORTED_ARGS FOLDER ARCHIVE ARCHIVE_UNIFIED ARCHIVE_WIN ARCHIVE_LIN ARCHIVE_MAC ARCHIVE_ANDROID TARGET_PATH ENVIRONMENT GITHUB_PULL_REQUEST VERSION_REGEX)
set(SUPPORTED_ARGS FOLDER ARCHIVE ARCHIVE_UNIFIED ARCHIVE_WIN ARCHIVE_LIN ARCHIVE_MAC ARCHIVE_ANDROID TARGET_PATH ENVIRONMENT GITHUB_PULL_REQUEST VERSION_REGEX SHA256)
#unnecessary vars
@@ -113,6 +112,9 @@ function (RESOLVE_DEPENDENCY NAME_OF_CMAKE_VAR)
set (FOLDER FALSE)
endif()
if (NOT DEFINED SHA256)
message(FATAL_ERROR "SHA is not specified for: " ${NAME_OF_CMAKE_VAR})
endif()
#for each dependency type have to do separate things
@@ -121,7 +123,7 @@ function (RESOLVE_DEPENDENCY NAME_OF_CMAKE_VAR)
message(FATAL_ERROR "TARGET_PATH should be defined for every dependency")
endif()
resolve_archive_dependency(RESULT ${NAME_OF_CMAKE_VAR} ${ARCHIVE} ${ARCHIVE_UNIFIED} ${ARCHIVE_WIN} ${ARCHIVE_LIN} ${ARCHIVE_MAC} ${ARCHIVE_ANDROID} ${TARGET_PATH} ${FOLDER} ${ENVIRONMENT})
resolve_archive_dependency(RESULT ${NAME_OF_CMAKE_VAR} ${ARCHIVE} ${ARCHIVE_UNIFIED} ${ARCHIVE_WIN} ${ARCHIVE_LIN} ${ARCHIVE_MAC} ${ARCHIVE_ANDROID} ${TARGET_PATH} ${FOLDER} ${ENVIRONMENT} ${SHA256})
set(${NAME_OF_CMAKE_VAR} ${RESULT} PARENT_SCOPE)
if (VERSION_REGEX)
GetNameAndUrlToDownload(archive RELATIVE_URL ${ARCHIVE_UNIFIED} ${ARCHIVE_WIN} ${ARCHIVE_LIN} ${ARCHIVE_MAC} ${ARCHIVE_ANDROID})

View File

@@ -0,0 +1,25 @@
# Copyright (C) 2018-2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
function (Download from to fatal result output sha256)
if((NOT EXISTS "${to}"))
message(STATUS "Downloading from ${from} to ${to} ...")
file(DOWNLOAD ${from} ${to}
TIMEOUT 3600
LOG log
STATUS status
SHOW_PROGRESS
EXPECTED_HASH SHA256=${sha256})
set (${output} ${status} PARENT_SCOPE)
else()
set (${output} 0 PARENT_SCOPE)
endif()
set(${result} "ON" PARENT_SCOPE)
endfunction(Download)
include(download/download_and_apply)
include(download/download_and_extract)

View File

@@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0
#
function (DownloadAndApply URL apply_to)
function (DownloadAndApply URL apply_to sha256)
if (EXISTS ${apply_to})
file(READ ${apply_to} patchFile4Bytes LIMIT 4)
@@ -16,7 +16,7 @@ function (DownloadAndApply URL apply_to)
file(REMOVE ${apply_to})
endif()
DownloadAndCheck(${URL} ${apply_to} TRUE result)
DownloadAndCheck(${URL} ${apply_to} TRUE result ${sha256})
else ()
set (MIGHT_BE_APPLIED 1)
endif()

View File

@@ -0,0 +1,72 @@
# Copyright (C) 2018-2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
find_package(Wget QUIET)
function (DownloadAndCheck from to fatal result sha256)
set(status_res "ON")
set(output 1)
get_filename_component(download_dir ${to} DIRECTORY)
if (NOT EXISTS ${download_dir})
file(MAKE_DIRECTORY ${download_dir})
endif()
if(NOT EXISTS "${to}")
if (${from} MATCHES "(http:)|(https:)|(ftp:)")
message(STATUS "Downloading from ${from} to ${to} ...")
find_program(aria2c "aria2c")
if (${aria2c} STREQUAL "aria2c-NOTFOUND")
if (NOT WGET_FOUND)
Download(${from} ${to} ${fatal} ${result} output ${sha256})
list(GET output 0 status_code)
else()
foreach(index RANGE 5)
message(STATUS "${WGET_EXECUTABLE} --no-cache --no-check-certificate
--retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 --tries=5 ${from}")
execute_process(COMMAND ${WGET_EXECUTABLE} "--no-cache" "--no-check-certificate"
"--retry-connrefused" "--waitretry=1" "--read-timeout=20" "--timeout=15" "--tries=5"
"${from}" "-O" "${to}"
TIMEOUT 2000
RESULT_VARIABLE status_code)
file(SHA256 ${to} CHECKSUM)
if (${CHECKSUM} STREQUAL ${sha256})
break()
endif()
endforeach()
if (NOT ${CHECKSUM} STREQUAL ${sha256})
message(FATAL_ERROR "Hash mismatch:\n"
"expected: ${sha256}\n"
"got: ${CHECKSUM}")
endif()
endif()
else()
message(STATUS "${aria2c} ,*.*.*.* -d ${download_dir} ${from}")
execute_process(COMMAND "${aria2c}" "-s10" "-x10" "--dir=${download_dir}" "${from}"
TIMEOUT 2000
RESULT_VARIABLE status_code)
endif()
if(NOT status_code EQUAL 0)
if (fatal)
message(FATAL_ERROR "fatal error: downloading '${from}' failed
status_code: ${status_code}
status_string: ${status_string}
log: ${log}")
else()
set(status_res "ARCHIVE_DOWNLOAD_FAIL")
message("error: downloading '${from}' failed
status_code: ${status_code}")
endif()
endif()
else()
message(STATUS "Copying from local folder ${from} to ${to} ... ")
file(COPY ${from} DESTINATION ${download_dir})
endif()
endif()
file(REMOVE ${to}.md5)
set(${result} "${status_res}" PARENT_SCOPE)
endfunction(DownloadAndCheck)

View File

@@ -2,8 +2,8 @@
# SPDX-License-Identifier: Apache-2.0
#
include ("extract")
include ("download_and_check")
include(download/extract)
include(download/download_and_check)
function (GetNameAndUrlToDownload name url archive_name_unified archive_name_win archive_name_lin archive_name_mac archive_name_android)
if (archive_name_unified)
@@ -41,22 +41,23 @@ function (DownloadAndExtractPlatformSpecific
archive_name_android
unpacked_path
result_path
folder)
folder
sha256)
GetNameAndUrlToDownload(archive_name RELATIVE_URL ${archive_name_unified} ${archive_name_win} ${archive_name_lin} ${archive_name_mac} ${archive_name_android} )
if (NOT archive_name OR NOT RELATIVE_URL)
return()
endif()
CheckOrDownloadAndExtract(${component} ${RELATIVE_URL} ${archive_name} ${unpacked_path} result_path2 ${folder} TRUE FALSE TRUE)
CheckOrDownloadAndExtract(${component} ${RELATIVE_URL} ${archive_name} ${unpacked_path} result_path2 ${folder} TRUE FALSE TRUE ${sha256})
set (${result_path} ${result_path2} PARENT_SCOPE)
endfunction(DownloadAndExtractPlatformSpecific)
#download from common folder
function (DownloadAndExtract component archive_name unpacked_path result_path folder)
function (DownloadAndExtract component archive_name unpacked_path result_path folder sha256)
set (RELATIVE_URL "${archive_name}")
set(fattal TRUE)
CheckOrDownloadAndExtract(${component} ${RELATIVE_URL} ${archive_name} ${unpacked_path} result_path2 ${folder} ${fattal} result TRUE)
CheckOrDownloadAndExtract(${component} ${RELATIVE_URL} ${archive_name} ${unpacked_path} result_path2 ${folder} ${fattal} result TRUE ${sha256})
if (NOT ${result})
DownloadAndExtractPlatformSpecific(${component} ${archive_name} ${archive_name} ${archive_name} ${unpacked_path} ${result_path2} ${folder})
@@ -67,9 +68,9 @@ function (DownloadAndExtract component archive_name unpacked_path result_path fo
endfunction(DownloadAndExtract)
function (DownloadAndExtractInternal URL archive_path unpacked_path folder fattal resultExt)
function (DownloadAndExtractInternal URL archive_path unpacked_path folder fattal resultExt sha256)
set (status "ON")
DownloadAndCheck(${URL} ${archive_path} ${fattal} result1)
DownloadAndCheck(${URL} ${archive_path} ${fattal} result1 ${sha256})
if ("${result1}" STREQUAL "ARCHIVE_DOWNLOAD_FAIL")
#check alternative url as well
set (status "OFF")
@@ -105,11 +106,11 @@ function (ExtractWithVersion URL archive_path unpacked_path folder result)
set (${result} ${status} PARENT_SCOPE)
endfunction (ExtractWithVersion)
function (DownloadOrExtractInternal URL archive_path unpacked_path folder fattal resultExt)
function (DownloadOrExtractInternal URL archive_path unpacked_path folder fattal resultExt sha256)
debug_message("checking wether archive downloaded : ${archive_path}")
set (downloadStatus "NOTOK")
if (NOT EXISTS ${archive_path})
DownloadAndExtractInternal(${URL} ${archive_path} ${unpacked_path} ${folder} ${fattal} result)
DownloadAndExtractInternal(${URL} ${archive_path} ${unpacked_path} ${folder} ${fattal} result ${sha256})
if (${result})
set (downloadStatus "OK")
endif()
@@ -118,7 +119,7 @@ function (DownloadOrExtractInternal URL archive_path unpacked_path folder fattal
if (ENABLE_UNSAFE_LOCATIONS)
ExtractWithVersion(${URL} ${archive_path} ${unpacked_path} ${folder} result)
if(NOT ${result})
DownloadAndExtractInternal(${URL} ${archive_path} ${unpacked_path} ${folder} ${fattal} result)
DownloadAndExtractInternal(${URL} ${archive_path} ${unpacked_path} ${folder} ${fattal} result ${sha256})
if (${result})
set (downloadStatus "OK")
endif()
@@ -126,7 +127,7 @@ function (DownloadOrExtractInternal URL archive_path unpacked_path folder fattal
else()
debug_message("archive found on FS : ${archive_path}, however we cannot check it's checksum and think that it is invalid")
file(REMOVE_RECURSE "${archive_path}")
DownloadAndExtractInternal(${URL} ${archive_path} ${unpacked_path} ${folder} ${fattal} result)
DownloadAndExtractInternal(${URL} ${archive_path} ${unpacked_path} ${folder} ${fattal} result ${sha256})
if (${result})
set (downloadStatus "OK")
endif()
@@ -146,10 +147,9 @@ endfunction(DownloadOrExtractInternal)
file(REMOVE ${CMAKE_BINARY_DIR}/dependencies_64.txt)
function (CheckOrDownloadAndExtract component RELATIVE_URL archive_name unpacked_path result_path folder fattal resultExt use_alternatives)
function (CheckOrDownloadAndExtract component RELATIVE_URL archive_name unpacked_path result_path folder fattal resultExt use_alternatives sha256)
set (archive_path ${TEMP}/download/${archive_name})
set (status "ON")
set (on_master FALSE)
if(DEFINED IE_PATH_TO_DEPS)
set(URL "${IE_PATH_TO_DEPS}/${RELATIVE_URL}")
@@ -169,18 +169,11 @@ function (CheckOrDownloadAndExtract component RELATIVE_URL archive_name unpacked
debug_message ("checking that unpacked directory exist: ${unpacked_path}")
if (NOT EXISTS ${unpacked_path})
DownloadOrExtractInternal(${URL} ${archive_path} ${unpacked_path} ${folder} ${fattal} status)
DownloadOrExtractInternal(${URL} ${archive_path} ${unpacked_path} ${folder} ${fattal} status ${sha256})
else(NOT EXISTS ${unpacked_path})
#path exists, so we would like to check what was unpacked version
set (version_file ${unpacked_path}/ie_dependency.info)
if (DEFINED TEAMCITY_GIT_BRANCH)
if(${TEAMCITY_GIT_BRANCH} STREQUAL "master")
set(on_master TRUE)
debug_message ("On master branch, update data in DL_SDK_TEMP if necessary")
endif()
endif()
if (NOT EXISTS ${version_file} AND NOT ${ENABLE_ALTERNATIVE_TEMP})
clean_message(FATAL_ERROR "error: Dependency doesn't contain version file. Please select actions: \n"
"if you are not sure about your FS dependency - remove it : \n"
@@ -201,24 +194,24 @@ function (CheckOrDownloadAndExtract component RELATIVE_URL archive_name unpacked
endif()
if (NOT EXISTS ${version_file} OR NOT ${dependency_url} STREQUAL ${URL})
if (${use_alternatives} AND ALTERNATIVE_PATH AND NOT ${on_master})
if (${use_alternatives} AND ALTERNATIVE_PATH)
#creating alternative_path
string(REPLACE ${TEMP} ${ALTERNATIVE_PATH} unpacked_path ${unpacked_path})
string(REPLACE ${TEMP} ${ALTERNATIVE_PATH} archive_path ${archive_path})
debug_message("dependency different: use local path for fetching updated version: ${alternative_path}")
CheckOrDownloadAndExtract(${component} ${RELATIVE_URL} ${archive_name} ${unpacked_path} ${result_path} ${folder} ${fattal} ${resultExt} FALSE)
CheckOrDownloadAndExtract(${component} ${RELATIVE_URL} ${archive_name} ${unpacked_path} ${result_path} ${folder} ${fattal} ${resultExt} FALSE ${sha256})
else()
debug_message("dependency updated: download it again")
file(REMOVE_RECURSE "${unpacked_path}")
DownloadOrExtractInternal(${URL} ${archive_path} ${unpacked_path} ${folder} ${fattal} status)
DownloadOrExtractInternal(${URL} ${archive_path} ${unpacked_path} ${folder} ${fattal} status ${sha256})
endif()
endif ()
endif()
endif()
if (${use_alternatives} OR ${on_master})
if (${use_alternatives})
set (${resultExt} "${status}" PARENT_SCOPE)
set (${result_path} ${unpacked_path} PARENT_SCOPE)
endif()

View File

@@ -0,0 +1,26 @@
# Copyright (C) 2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
include(CMakeParseArguments)
function(ie_faster_build TARGET_NAME)
if(NOT ENABLE_FASTER_BUILD)
return()
endif()
cmake_parse_arguments(IE_FASTER_BUILD "UNITY" "" "PCH" ${ARGN})
if(IE_FASTER_BUILD_UNITY)
set_target_properties(${TARGET_NAME}
PROPERTIES
UNITY_BUILD ON
)
endif()
if(IE_FASTER_BUILD_PCH)
target_precompile_headers(${TARGET_NAME}
${IE_FASTER_BUILD_PCH}
)
endif()
endfunction()

View File

@@ -0,0 +1,86 @@
# Copyright (C) 2018-2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
include(options)
include(target_flags)
# FIXME: there are compiler failures with LTO and Cross-Compile toolchains. Disabling for now, but
# this must be addressed in a proper way
ie_dependent_option (ENABLE_LTO "Enable Link Time Optimization" OFF "LINUX;NOT CMAKE_CROSSCOMPILING; CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9" OFF)
ie_option (OS_FOLDER "create OS dedicated folder in output" OFF)
if(UNIX)
ie_option(USE_BUILD_TYPE_SUBFOLDER "Create dedicated sub-folder per build type for output binaries" ON)
else()
ie_option(USE_BUILD_TYPE_SUBFOLDER "Create dedicated sub-folder per build type for output binaries" OFF)
endif()
# FIXME: ARM cross-compiler generates several "false positive" warnings regarding __builtin_memcpy buffer overflow
ie_dependent_option (TREAT_WARNING_AS_ERROR "Treat build warnings as errors" ON "X86 OR X86_64" OFF)
ie_option (ENABLE_INTEGRITYCHECK "build DLLs with /INTEGRITYCHECK flag" OFF)
ie_option (ENABLE_SANITIZER "enable checking memory errors via AddressSanitizer" OFF)
ie_option (ENABLE_THREAD_SANITIZER "enable checking data races via ThreadSanitizer" OFF)
ie_dependent_option (ENABLE_COVERAGE "enable code coverage" OFF "CMAKE_CXX_COMPILER_ID STREQUAL GNU" OFF)
# Defines CPU capabilities
ie_dependent_option (ENABLE_SSE42 "Enable SSE4.2 optimizations" ON "X86_64 OR X86" OFF)
ie_dependent_option (ENABLE_AVX2 "Enable AVX2 optimizations" ON "X86_64 OR X86" OFF)
ie_dependent_option (ENABLE_AVX512F "Enable AVX512 optimizations" ON "X86_64 OR X86" OFF)
# Type of build, we add this as an explicit option to default it to ON
# FIXME: Ah this moment setting this to OFF will only build ngraph a static library
ie_option (BUILD_SHARED_LIBS "Build as a shared library" ON)
ie_dependent_option (ENABLE_FASTER_BUILD "Enable build features (PCH, UNITY) to speed up build time" OFF "CMAKE_VERSION VERSION_GREATER_EQUAL 3.16" OFF)
if(NOT DEFINED ENABLE_CPPLINT)
ie_dependent_option (ENABLE_CPPLINT "Enable cpplint checks during the build" ON "UNIX;NOT ANDROID" OFF)
endif()
if(NOT DEFINED ENABLE_CPPLINT_REPORT)
ie_dependent_option (ENABLE_CPPLINT_REPORT "Build cpplint report instead of failing the build" OFF "ENABLE_CPPLINT" OFF)
endif()
ie_option (ENABLE_CLANG_FORMAT "Enable clang-format checks during the build" ON)
ie_option (VERBOSE_BUILD "shows extra information about build" OFF)
ie_option (ENABLE_UNSAFE_LOCATIONS "skip check for MD5 for dependency" OFF)
ie_option (ENABLE_ALTERNATIVE_TEMP "in case of dependency conflict, to avoid modification in master, use local copy of dependency" ON)
ie_dependent_option (ENABLE_FUZZING "instrument build for fuzzing" OFF "CMAKE_CXX_COMPILER_ID MATCHES ^(Apple)?Clang$; NOT WIN32" OFF)
#
# Check features
#
if(ENABLE_AVX512F)
if ((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") AND (MSVC_VERSION VERSION_LESS 1920))
# 1920 version of MSVC 2019. In MSVC 2017 AVX512F not work
set(ENABLE_AVX512F OFF CACHE BOOL "" FORCE)
endif()
if ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6))
set(ENABLE_AVX512F OFF CACHE BOOL "" FORCE)
endif()
if ((CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10))
# TBD: clarify which AppleClang version supports avx512
set(ENABLE_AVX512F OFF CACHE BOOL "" FORCE)
endif()
if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9))
set(ENABLE_AVX512F OFF CACHE BOOL "" FORCE)
endif()
endif()
if (VERBOSE_BUILD)
set(CMAKE_VERBOSE_MAKEFILE ON CACHE BOOL "" FORCE)
endif()

View File

@@ -2,15 +2,18 @@
# SPDX-License-Identifier: Apache-2.0
#
include(target_flags)
if (LINUX)
function(get_linux_name res_var)
if (NOT EXISTS "/etc/lsb-release")
execute_process(COMMAND find -L /etc/ -maxdepth 1 -type f -name *-release -exec cat {} \;
OUTPUT_VARIABLE release_data RESULT_VARIABLE result)
string(REPLACE "Red Hat" "CentOS" release_data "${release_data}")
set(name_regex "NAME=\"([^ \"\n]*).*\"\n")
set(version_regex "VERSION=\"([0-9]+(\\.[0-9]+)?)[^\n]*\"")
else ()
#linux version detection using cat /etc/lsb-release
# linux version detection using cat /etc/lsb-release
file(READ "/etc/lsb-release" release_data)
set(name_regex "DISTRIB_ID=([^ \n]*)\n")
set(version_regex "DISTRIB_RELEASE=([0-9]+(\\.[0-9]+)?)")
@@ -27,6 +30,5 @@ if (LINUX)
else ()
set(${res_var} NOTFOUND PARENT_SCOPE)
endif ()
endfunction()
endif ()

View File

@@ -0,0 +1,27 @@
# Copyright (C) 2018-2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
if(UNIX AND ENABLE_ERROR_HIGHLIGHT)
function(message)
string(ASCII 27 ESC)
set(RESET "${ESC}[m")
set(RED "${ESC}[31;1m")
set(YELLOW "${ESC}[33;1m")
list(GET ARGV 0 MessageType)
list(REMOVE_AT ARGV 0)
foreach(arg IN LISTS ARGV)
set(_msg "${_msg}${arg}")
endforeach()
if(MessageType STREQUAL FATAL_ERROR OR MessageType STREQUAL SEND_ERROR)
_message(${MessageType} "${RED}${_msg}${RESET}")
elseif(MessageType STREQUAL WARNING)
_message(${MessageType} "${YELLOW}${_msg}${RESET}")
else()
_message(${MessageType} "${_msg}")
endif()
endfunction()
endif()

View File

@@ -2,14 +2,6 @@
# SPDX-License-Identifier: Apache-2.0
#
if(ENABLE_DOCKER)
cmake_minimum_required(VERSION 3.3 FATAL_ERROR)
else()
cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
endif()
cmake_policy(SET CMP0054 NEW)
find_package(Git REQUIRED)
set(MODELS_LST "")

View File

@@ -0,0 +1,45 @@
# Copyright (C) 2018-2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
# Usage: ie_option(<option_variable> "description" <initial value or boolean expression> [IF <condition>])
include (CMakeDependentOption)
macro (ie_option variable description value)
option(${variable} "${description}" ${value})
list(APPEND IE_OPTIONS ${variable})
endmacro()
macro (ie_dependent_option variable description def_value condition fallback_value)
cmake_dependent_option(${variable} "${description}" ${def_value} "${condition}" ${fallback_value})
list(APPEND IE_OPTIONS ${variable})
endmacro()
macro (ie_option_enum variable description value)
set(OPTIONS)
set(ONE_VALUE_ARGS)
set(MULTI_VALUE_ARGS ALLOWED_VALUES)
cmake_parse_arguments(IE_OPTION_ENUM "${OPTIONS}" "${ONE_VALUE_ARGS}" "${MULTI_VALUE_ARGS}" ${ARGN})
if(NOT ${value} IN_LIST IE_OPTION_ENUM_ALLOWED_VALUES)
message(FATAL_ERROR "variable must be one of ${IE_OPTION_ENUM_ALLOWED_VALUES}")
endif()
list(APPEND IE_OPTIONS ${variable})
set(${variable} ${value} CACHE STRING "${description}")
endmacro()
function (print_enabled_features)
if(NOT COMMAND set_ci_build_number)
message(FATAL_ERROR "CI_BUILD_NUMBER is not set yet")
endif()
message(STATUS "Inference Engine enabled features: ")
message(STATUS "")
message(STATUS " CI_BUILD_NUMBER: ${CI_BUILD_NUMBER}")
foreach(_var ${IE_OPTIONS})
message(STATUS " ${_var} = ${${_var}}")
endforeach()
message(STATUS "")
endfunction()

View File

@@ -0,0 +1,58 @@
# Copyright (C) 2018-2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
include(CPackComponent)
unset(IE_CPACK_COMPONENTS_ALL CACHE)
set(IE_CPACK_IE_DIR deployment_tools/inference_engine)
#
# ie_cpack_set_library_dir()
#
# Set library directory for cpack
#
function(ie_cpack_set_library_dir)
if(WIN32)
set(IE_CPACK_LIBRARY_PATH ${IE_CPACK_IE_DIR}/lib/${ARCH_FOLDER}/${CMAKE_BUILD_TYPE} PARENT_SCOPE)
set(IE_CPACK_RUNTIME_PATH ${IE_CPACK_IE_DIR}/bin/${ARCH_FOLDER}/${CMAKE_BUILD_TYPE} PARENT_SCOPE)
set(IE_CPACK_ARCHIVE_PATH ${IE_CPACK_IE_DIR}/lib/${ARCH_FOLDER}/${CMAKE_BUILD_TYPE} PARENT_SCOPE)
else()
set(IE_CPACK_LIBRARY_PATH ${IE_CPACK_IE_DIR}/lib/${ARCH_FOLDER} PARENT_SCOPE)
set(IE_CPACK_RUNTIME_PATH ${IE_CPACK_IE_DIR}/lib/${ARCH_FOLDER} PARENT_SCOPE)
set(IE_CPACK_ARCHIVE_PATH ${IE_CPACK_IE_DIR}/lib/${ARCH_FOLDER} PARENT_SCOPE)
endif()
endfunction()
ie_cpack_set_library_dir()
#
# ie_cpack_add_component(NAME ...)
#
# Wraps original `cpack_add_component` and adds component to internal IE list
#
macro(ie_cpack_add_component NAME)
list(APPEND IE_CPACK_COMPONENTS_ALL ${NAME})
set(IE_CPACK_COMPONENTS_ALL "${IE_CPACK_COMPONENTS_ALL}" CACHE STRING "" FORCE)
cpack_add_component(${NAME} ${ARGN})
endmacro()
macro(ie_cpack)
set(CPACK_GENERATOR "TGZ")
string(REPLACE "/" "_" CPACK_PACKAGE_VERSION "${CI_BUILD_NUMBER}")
if(WIN32)
set(CPACK_PACKAGE_NAME inference-engine_${CMAKE_BUILD_TYPE})
else()
set(CPACK_PACKAGE_NAME inference-engine)
endif()
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF)
set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
set(CPACK_PACKAGE_VENDOR "Intel")
set(CPACK_COMPONENTS_ALL ${ARGN})
set(CPACK_STRIP_FILES ON)
if(OS_FOLDER)
set(CPACK_SYSTEM_NAME "${OS_FOLDER}")
endif()
include(CPack)
endmacro()

View File

@@ -6,9 +6,9 @@ include(CMakeParseArguments)
set(PLUGIN_FILES "" CACHE INTERNAL "")
function(get_shared_library_name target_name library_name)
set(LIB_PREFIX "${CMAKE_SHARED_LIBRARY_PREFIX}")
set(LIB_SUFFIX "${IE_BUILD_POSTFIX}${CMAKE_SHARED_LIBRARY_SUFFIX}")
function(ie_plugin_get_file_name target_name library_name)
set(LIB_PREFIX "${CMAKE_SHARED_MODULE_PREFIX}")
set(LIB_SUFFIX "${IE_BUILD_POSTFIX}${CMAKE_SHARED_MODULE_SUFFIX}")
set("${library_name}" "${LIB_PREFIX}${target_name}${LIB_SUFFIX}" PARENT_SCOPE)
endfunction()
@@ -52,9 +52,12 @@ function(ie_add_plugin)
add_cpplint_target(${obj_lib}_cpplint FOR_TARGETS ${obj_lib})
endforeach()
add_library(${IE_PLUGIN_NAME} SHARED ${input_files})
add_library(${IE_PLUGIN_NAME} MODULE ${input_files})
target_compile_definitions(${IE_PLUGIN_NAME} PRIVATE IMPLEMENT_INFERENCE_ENGINE_PLUGIN)
ie_add_vs_version_file(NAME ${TARGET_NAME}
FILEDESCRIPTION "Inference Engine ${IE_PLUGIN_DEVICE_NAME} device plugin library")
if(TARGET IE::inference_engine_plugin_api)
target_link_libraries(${IE_PLUGIN_NAME} PRIVATE IE::inference_engine_plugin_api)
else()
@@ -103,8 +106,7 @@ function(ie_add_plugin)
install(TARGETS ${IE_PLUGIN_NAME}
RUNTIME DESTINATION ${IE_CPACK_RUNTIME_PATH} COMPONENT ${install_component}
ARCHIVE DESTINATION ${IE_CPACK_ARCHIVE_PATH} COMPONENT ${install_component}
LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH} COMPONENT ${install_component})
LIBRARY DESTINATION ${IE_CPACK_RUNTIME_PATH} COMPONENT ${install_component})
endif()
endfunction()
@@ -133,7 +135,7 @@ macro(ie_register_plugins)
-D "IE_CONFIG_OUTPUT_FILE=${config_output_file}"
-D "IE_PLUGIN_NAME=${plugin}"
-D "IE_CONFIGS_DIR=${CMAKE_BINARY_DIR}/plugins"
-P "${IE_MAIN_SOURCE_DIR}/cmake/plugins/unregister_plugin_cmake.cmake"
-P "${IEDevScripts_DIR}/plugins/unregister_plugin_cmake.cmake"
COMMENT
"Remove ${plugin} from the plugins.xml file"
VERBATIM)
@@ -150,7 +152,7 @@ macro(ie_register_plugins)
# create plugin file
set(config_file_name "${CMAKE_BINARY_DIR}/plugins/${name}.xml")
get_shared_library_name(${name} library_name)
ie_plugin_get_file_name(${name} library_name)
add_custom_command(TARGET ${IE_REGISTER_MAIN_TARGET} POST_BUILD
COMMAND
@@ -158,7 +160,7 @@ macro(ie_register_plugins)
-D "IE_CONFIG_OUTPUT_FILE=${config_file_name}"
-D "IE_DEVICE_NAME=${device_name}"
-D "IE_PLUGIN_LIBRARY_NAME=${library_name}"
-P "${IE_MAIN_SOURCE_DIR}/cmake/plugins/create_plugin_file.cmake"
-P "${IEDevScripts_DIR}/plugins/create_plugin_file.cmake"
COMMENT "Register ${name} plugin"
VERBATIM)
@@ -168,10 +170,10 @@ macro(ie_register_plugins)
add_custom_command(TARGET ${IE_REGISTER_MAIN_TARGET} POST_BUILD
COMMAND
"${CMAKE_COMMAND}"
-D "CMAKE_SHARED_LIBRARY_PREFIX=${CMAKE_SHARED_LIBRARY_PREFIX}"
-D "CMAKE_SHARED_MODULE_PREFIX=${CMAKE_SHARED_MODULE_PREFIX}"
-D "IE_CONFIG_OUTPUT_FILE=${config_output_file}"
-D "IE_CONFIGS_DIR=${CMAKE_BINARY_DIR}/plugins"
-P "${IE_MAIN_SOURCE_DIR}/cmake/plugins/register_plugin_cmake.cmake"
-P "${IEDevScripts_DIR}/plugins/register_plugin_cmake.cmake"
COMMENT
"Registering plugins to plugins.xml config file"
VERBATIM)

View File

@@ -0,0 +1,65 @@
# Copyright (C) 2018-2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
set(file_content
"<ie>
<plugins>
</plugins>
</ie>")
if(NOT EXISTS "${IE_CONFIG_OUTPUT_FILE}")
file(WRITE "${IE_CONFIG_OUTPUT_FILE}" "${file_content}")
endif()
# get list of plugin files
file(GLOB plugin_files "${IE_CONFIGS_DIR}/*.xml")
function(check_plugin_exists plugin_name outvar)
set(${outvar} OFF PARENT_SCOPE)
# check if config file already has this plugin
file(STRINGS "${IE_CONFIG_OUTPUT_FILE}" content REGEX "plugin .*=\"")
foreach(line IN LISTS content)
string(REGEX MATCH "location=\"([^\"]*)\"" location "${line}")
get_filename_component(location "${CMAKE_MATCH_1}" NAME_WE)
if("${CMAKE_SHARED_MODULE_PREFIX}${plugin_name}" MATCHES "${location}")
# plugin has already registered
set(${outvar} ON PARENT_SCOPE)
endif()
endforeach()
endfunction()
set(plugin_files_to_add)
foreach(plugin_file IN LISTS plugin_files)
get_filename_component(plugin_name "${plugin_file}" NAME_WE)
check_plugin_exists("${plugin_name}" exists)
if(NOT exists)
list(APPEND plugin_files_to_add "${plugin_file}")
endif()
endforeach()
# add plugin
set(newContent "")
file(STRINGS "${IE_CONFIG_OUTPUT_FILE}" content)
foreach(line IN LISTS content)
if("${line}" MATCHES "</plugins>")
foreach(plugin_file IN LISTS plugin_files_to_add)
file(READ "${plugin_file}" content)
set(newContent "${newContent}
${content}")
endforeach()
endif()
if(newContent)
set(newContent "${newContent}\n${line}")
else()
set(newContent "${line}")
endif()
endforeach()
file(WRITE "${IE_CONFIG_OUTPUT_FILE}" "${newContent}")

View File

@@ -0,0 +1,35 @@
# Copyright (C) 2018-2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
if(NOT EXISTS "${IE_CONFIG_OUTPUT_FILE}")
return()
endif()
# remove plugin file
file(REMOVE "${IE_CONFIGS_DIR}/${IE_PLUGIN_NAME}.xml")
# remove plugin
set(newContent "")
file(STRINGS "${IE_CONFIG_OUTPUT_FILE}" content)
set(skip_plugin OFF)
foreach(line IN LISTS content)
if("${line}" MATCHES "${IE_PLUGIN_NAME}")
set(skip_plugin ON)
endif()
if(NOT skip_plugin)
if(newContent)
set(newContent "${newContent}\n${line}")
else()
set(newContent "${line}")
endif()
endif()
if("${line}" MATCHES "</plugin>")
set(skip_plugin OFF)
endif()
endforeach()
file(WRITE "${IE_CONFIG_OUTPUT_FILE}" "${newContent}")

View File

@@ -0,0 +1,49 @@
# Copyright (C) 2018-2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
include(CMakeParseArguments)
find_host_program(shellcheck_PROGRAM NAMES shellcheck DOC "Path to shellcheck tool")
function(ie_shellcheck_process)
if(NOT shellcheck_PROGRAM)
message(WARNING "shellcheck tool is not found")
return()
endif()
cmake_parse_arguments(IE_SHELLCHECK "" "DIRECTORY" "SKIP" ${ARGN})
set(IE_SHELLCHECK_SCRIPT "${IEDevScripts_DIR}/shellcheck/shellcheck_process.cmake")
file(GLOB_RECURSE scripts "${IE_SHELLCHECK_DIRECTORY}/*.sh")
foreach(script IN LISTS scripts)
# check if we need to skip scripts
unset(skip_script)
foreach(skip_directory IN LISTS IE_SHELLCHECK_SKIP)
if(script MATCHES "${skip_directory}/*")
set(skip_script ON)
endif()
endforeach()
if(skip_script)
continue()
endif()
get_filename_component(dir_name "${script}" DIRECTORY)
string(REPLACE "${IE_SHELLCHECK_DIRECTORY}" "${CMAKE_BINARY_DIR}/shellcheck" output_file ${script})
set(output_file "${output_file}.txt")
get_filename_component(script_name "${script}" NAME)
add_custom_command(OUTPUT ${output_file}
COMMAND ${CMAKE_COMMAND}
-D IE_SHELLCHECK_PROGRAM=${shellcheck_PROGRAM}
-D IE_SHELL_SCRIPT=${script}
-D IE_SHELLCHECK_OUTPUT=${output_file}
-P ${IE_SHELLCHECK_SCRIPT}
DEPENDS ${script} ${IE_SHELLCHECK_SCRIPT}
COMMENT "Check script ${script_name}"
VERBATIM)
list(APPEND outputs ${output_file})
endforeach()
add_custom_target(ie_shellcheck DEPENDS ${outputs})
endfunction()

View File

@@ -0,0 +1,27 @@
# Copyright (C) 2018-2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
if(NOT DEFINED IE_SHELLCHECK_PROGRAM)
message(FATAL_ERROR "IE_SHELLCHECK_PROGRAM is not defined")
endif()
if(NOT DEFINED IE_SHELL_SCRIPT)
message(FATAL_ERROR "IE_SHELL_SCRIPT is not defined")
endif()
if(NOT DEFINED IE_SHELLCHECK_OUTPUT)
message(FATAL_ERROR "IE_SHELLCHECK_OUTPUT is not defined")
endif()
set(rules "SC1091,SC2164,SC2162,SC1090")
execute_process(COMMAND ${IE_SHELLCHECK_PROGRAM} --exclude=${rules} ${IE_SHELL_SCRIPT}
OUTPUT_VARIABLE error_message
RESULT_VARIABLE exit_code
OUTPUT_STRIP_TRAILING_WHITESPACE)
file(WRITE "${IE_SHELLCHECK_OUTPUT}" "${error_message}")
if(NOT exit_code EQUAL 0)
message(FATAL_ERROR "${error_message}")
endif()

View File

@@ -0,0 +1,57 @@
# Copyright (C) 2018-2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
# Target system specific flags
if(CMAKE_CL_64)
set(MSVC64 ON)
endif()
if(WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpmachine
OUTPUT_VARIABLE OPENVINO_GCC_TARGET_MACHINE
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(OPENVINO_GCC_TARGET_MACHINE MATCHES "amd64|x86_64|AMD64")
set(MINGW64 ON)
endif()
endif()
macro(_ie_process_msvc_generator_platform flag_name)
# if cmake -A <ARM|ARM64> is passed
if(CMAKE_GENERATOR_PLATFORM STREQUAL "ARM64")
set(AARCH64 ON)
elseif(CMAKE_GENERATOR_PLATFORM STREQUAL "ARM")
set(ARM ON)
elseif(CMAKE_GENERATOR_PLATFORM STREQUAL "x64")
set(X86_64 ON)
elseif(CMAKE_GENERATOR_PLATFORM STREQUAL "Win32")
set(X86 ON)
else()
set(${flag_name} ON)
endif()
endmacro()
if(MSVC64 OR MINGW64)
_ie_process_msvc_generator_platform(X86_64)
elseif(MINGW OR (MSVC AND NOT CMAKE_CROSSCOMPILING))
_ie_process_msvc_generator_platform(X86)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*")
set(X86_64 ON)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i686.*|i386.*|x86.*|amd64.*|AMD64.*")
set(X86 ON)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm.*|ARM.*)")
set(ARM ON)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*)")
set(AARCH64 ON)
endif()
# in case of cross-compilation (or -m32) CMAKE_SYSTEM_PROCESSOR is equal to
# CMAKE_HOST_SYSTEM_PROCESSOR which is X86_64; patch this until a better solution
if(CMAKE_SIZEOF_VOID_P EQUAL 4 AND X86_64)
unset(X86_64)
set(X86 ON)
endif()
if(UNIX AND NOT APPLE)
set(LINUX ON)
endif()

View File

@@ -3,18 +3,24 @@
#
function (branchName VAR)
if(NOT DEFINED repo_root)
message(FATAL_ERROR "repo_root is not defined")
endif()
execute_process(
COMMAND git rev-parse --abbrev-ref HEAD
WORKING_DIRECTORY ${OpenVINO_MAIN_SOURCE_DIR}
WORKING_DIRECTORY ${repo_root}
OUTPUT_VARIABLE GIT_BRANCH
OUTPUT_STRIP_TRAILING_WHITESPACE)
set (${VAR} ${GIT_BRANCH} PARENT_SCOPE)
endfunction()
function (commitHash VAR)
if(NOT DEFINED repo_root)
message(FATAL_ERROR "repo_root is not defined")
endif()
execute_process(
COMMAND git rev-parse HEAD
WORKING_DIRECTORY ${OpenVINO_MAIN_SOURCE_DIR}
WORKING_DIRECTORY ${repo_root}
OUTPUT_VARIABLE GIT_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE)
set (${VAR} ${GIT_COMMIT_HASH} PARENT_SCOPE)

View File

@@ -0,0 +1,90 @@
# Copyright (C) 2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
macro(ie_parse_ci_build_number)
if(CI_BUILD_NUMBER MATCHES "^([0-9]+)\.([0-9]+)\.([0-9]+)\-.*")
set(IE_VERSION_MAJOR ${CMAKE_MATCH_1})
set(IE_VERSION_MINOR ${CMAKE_MATCH_2})
set(IE_VERSION_PATCH ${CMAKE_MATCH_3})
set(IE_VS_VER_HAS_VERSION 1)
else()
set(IE_VS_VER_HAS_VERSION 0)
endif()
endmacro()
ie_parse_ci_build_number()
if(IE_VS_VER_HAS_VERSION)
set(IE_VS_VER_FILEVERSION_QUAD "${IE_VERSION_MAJOR},${IE_VERSION_MINOR},${IE_VERSION_PATCH},0")
set(IE_VS_VER_PRODUCTVERSION_QUAD "${IE_VERSION_MAJOR},${IE_VERSION_MINOR},${IE_VERSION_PATCH},0")
set(IE_VS_VER_FILEVERSION_STR "${IE_VERSION_MAJOR}.${IE_VERSION_MINOR}.${IE_VERSION_PATCH}.0")
endif()
set(IE_VS_VER_COMPANY_NAME_STR "Intel Corporation")
set(IE_VS_VER_PRODUCTVERSION_STR "${CI_BUILD_NUMBER}")
set(IE_VS_VER_PRODUCTNAME_STR "OpenVINO toolkit")
set(IE_VS_VER_COPYRIGHT_STR "Copyright (C) 2018-2020, Intel Corporation")
set(IE_VS_VER_COMMENTS_STR "https://docs.openvinotoolkit.org/")
#
# ie_add_vs_version_file(NAME <name>
# FILEDESCRIPTION <file description>
# [COMPANY_NAME <company name>]
# [FILEVERSION <file version>]
# [INTERNALNAME <internal name>]
# [COPYRIGHT <name>]
# [PRODUCTNAME <name>]
# [PRODUCTVERSION <name>]
# [COMMENTS <name>]
# [FILEVERSION_QUAD <name>]
# [PRODUCTVERSION_QUAD <name>])
#
function(ie_add_vs_version_file)
if(NOT WIN32)
return()
endif()
cmake_parse_arguments(VS_VER "" "COMPANY_NAME;NAME;FILEDESCRIPTION;FILEVERSION;INTERNALNAME;COPYRIGHT;PRODUCTNAME;PRODUCTVERSION;COMMENTS;FILEVERSION_QUAD;PRODUCTVERSION_QUAD" "" ${ARGN})
if(NOT TARGET ${VS_VER_NAME})
message(FATAL_ERROR "${VS_VER_NAME} must define a target")
endif()
macro(_vs_ver_update_variable name)
if(VS_VER_NAME AND DEFINED IE_${VS_VER_NAME}_VS_VER_${name})
set(IE_VS_VER_${name} "${IE_${VS_VER_NAME}_VS_VER_${name}}")
elseif(VS_VER_${name})
set(IE_VS_VER_${name} "${VS_VER_${name}}")
endif()
endmacro()
_vs_ver_update_variable(FILEVERSION_QUAD)
_vs_ver_update_variable(PRODUCTVERSION_QUAD)
macro(_vs_ver_update_str_variable name)
if(VS_VER_NAME AND DEFINED IE_${VS_VER_NAME}_VS_VER_${name})
set(IE_VS_VER_${name}_STR "${IE_${VS_VER_NAME}_VS_VER_${name}}")
elseif(VS_VER_${name})
set(IE_VS_VER_${name}_STR "${VS_VER_${name}}")
endif()
endmacro()
_vs_ver_update_str_variable(COMPANY_NAME)
_vs_ver_update_str_variable(FILEDESCRIPTION)
_vs_ver_update_str_variable(FILEVERSION)
_vs_ver_update_str_variable(INTERNALNAME)
_vs_ver_update_str_variable(COPYRIGHT)
_vs_ver_update_str_variable(PRODUCTNAME)
_vs_ver_update_str_variable(PRODUCTVERSION)
_vs_ver_update_str_variable(COMMENTS)
set(IE_VS_VER_ORIGINALFILENAME_STR "${CMAKE_SHARED_LIBRARY_PREFIX}${VS_VER_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}")
set(IE_VS_VER_INTERNALNAME_STR ${VS_VER_NAME})
set(vs_version_output "${CMAKE_CURRENT_BINARY_DIR}/vs_version.rc")
configure_file("${IEDevScripts_DIR}/vs_version/vs_version.rc.in" "${vs_version_output}" @ONLY)
source_group("src" FILES ${vs_version_output})
target_sources(${VS_VER_NAME} PRIVATE ${vs_version_output})
endfunction()

View File

@@ -0,0 +1,39 @@
#include <winver.h>
VS_VERSION_INFO VERSIONINFO
#if @IE_VS_VER_HAS_VERSION@
FILEVERSION @IE_VS_VER_FILEVERSION_QUAD@
PRODUCTVERSION @IE_VS_VER_PRODUCTVERSION_QUAD@
#endif
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS 1
#else
FILEFLAGS 0
#endif
FILEOS VOS__WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE 0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "CompanyName", "@IE_VS_VER_COMPANY_NAME_STR@\0"
VALUE "FileDescription", "@IE_VS_VER_FILEDESCRIPTION_STR@\0"
#if @IE_VS_VER_HAS_VERSION@
VALUE "FileVersion", "@IE_VS_VER_FILEVERSION_STR@\0"
#endif
VALUE "InternalName", "@IE_VS_VER_INTERNALNAME_STR@\0"
VALUE "LegalCopyright", "@IE_VS_VER_COPYRIGHT_STR@\0"
VALUE "OriginalFilename", "@IE_VS_VER_ORIGINALFILENAME_STR@\0"
VALUE "ProductName", "@IE_VS_VER_PRODUCTNAME_STR@\0"
VALUE "ProductVersion", "@IE_VS_VER_PRODUCTVERSION_STR@\0"
VALUE "Comments", "@IE_VS_VER_COMMENTS_STR@\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0409, 1252
END
END

View File

@@ -1,24 +0,0 @@
# Copyright (C) 2018-2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
function (Download from to fatal result output)
if((NOT EXISTS "${to}"))
message(STATUS "Downloading from ${from} to ${to} ...")
file(DOWNLOAD ${from} ${to}
TIMEOUT 3600
LOG log
STATUS status
SHOW_PROGRESS)
set (${output} ${status} PARENT_SCOPE)
else()
set (${output} 0 PARENT_SCOPE)
endif()
set(${result} "ON" PARENT_SCOPE)
endfunction(Download)
include ("download_and_apply")
include ("download_and_extract")

View File

@@ -1,58 +0,0 @@
# Copyright (C) 2018-2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
include (FindWget)
function (DownloadAndCheck from to fatal result)
set(status_res "ON")
set(output 1)
get_filename_component(download_dir ${to} DIRECTORY)
if (NOT EXISTS ${download_dir})
file(MAKE_DIRECTORY ${download_dir})
endif()
if(NOT EXISTS "${to}")
if (${from} MATCHES "(http:)|(https:)|(ftp:)")
message(STATUS "Downloading from ${from} to ${to} ...")
find_program(aria2c "aria2c")
if (${aria2c} STREQUAL "aria2c-NOTFOUND")
if (NOT ${WGET_FOUND})
Download(${from} ${to} ${fatal} ${result} output)
list(GET output 0 status_code)
else()
message(STATUS "${WGET_EXECUTABLE} --no-cache ${from}")
execute_process(COMMAND ${WGET_EXECUTABLE} "--no-cache" "--no-check-certificate" "${from}" "-O" "${to}"
TIMEOUT 2000
RESULT_VARIABLE status_code)
endif()
else()
message(STATUS "${aria2c} ,*.*.*.* -d ${download_dir} ${from}")
execute_process(COMMAND "${aria2c}" "-s10" "-x10" "--dir=${download_dir}" "${from}"
TIMEOUT 2000
RESULT_VARIABLE status_code)
endif()
if(NOT status_code EQUAL 0)
if (fatal)
message(FATAL_ERROR "fatal error: downloading '${from}' failed
status_code: ${status_code}
status_string: ${status_string}
log: ${log}")
else()
set(status_res "ARCHIVE_DOWNLOAD_FAIL")
message("error: downloading '${from}' failed
status_code: ${status_code}")
endif()
endif()
else()
message(STATUS "Copying from local folder ${from} to ${to} ... ")
file(COPY ${from} DESTINATION ${download_dir})
endif()
endif()
file(REMOVE ${to}.md5)
set(${result} "${status_res}" PARENT_SCOPE)
endfunction(DownloadAndCheck)

View File

@@ -2,46 +2,33 @@
# SPDX-License-Identifier: Apache-2.0
#
include (target_flags)
include (options)
# these options are aimed to optimize build time on development system
if(X86_64)
set(ENABLE_MKL_DNN_DEFAULT ON)
else()
set(ENABLE_MKL_DNN_DEFAULT OFF)
endif()
ie_option (ENABLE_TESTS "unit, behavior and functional tests" OFF)
ie_option (ENABLE_MKL_DNN "MKL-DNN plugin for inference engine" ${ENABLE_MKL_DNN_DEFAULT})
ie_dependent_option (ENABLE_CLDNN "clDnn based plugin for inference engine" ON "WIN32 OR X86_64;NOT APPLE;NOT MINGW" OFF)
ie_option (ENABLE_TESTS "unit, behavior and functional tests" OFF)
# FIXME: there are compiler failures with LTO and Cross-Compile toolchains. Disabling for now, but
# this must be addressed in a proper way
ie_dependent_option (ENABLE_LTO "Enable Link Time Optimization" OFF "LINUX OR WIN32;NOT CMAKE_CROSSCOMPILING" OFF)
ie_dependent_option (ENABLE_CLDNN "clDnn based plugin for inference engine" ON "X86_64;NOT APPLE;NOT MINGW;NOT WINDOWS_STORE;NOT WINDOWS_PHONE" OFF)
ie_option (OS_FOLDER "create OS dedicated folder in output" OFF)
ie_option (ENABLE_PROFILING_ITT "Build with ITT tracing. Optionally configure pre-built ittnotify library though INTEL_VTUNE_DIR variable." OFF)
# FIXME: ARM cross-compiler generates several "false positive" warnings regarding __builtin_memcpy buffer overflow
ie_dependent_option (TREAT_WARNING_AS_ERROR "Treat build warnings as errors" ON "X86 OR X86_64" OFF)
ie_option (ENABLE_DOCS "Build docs using Doxygen" OFF)
ie_option (ENABLE_INTEGRITYCHECK "build DLLs with /INTEGRITYCHECK flag" OFF)
ie_option(ENABLE_TEMPLATE_PLUGIN "Register template plugin into plugins.xml" OFF)
ie_option (ENABLE_SANITIZER "enable checking memory errors via AddressSanitizer" OFF)
ie_option_enum(SELECTIVE_BUILD "Enable OpenVINO conditional compilation or statistics collection. \
In case SELECTIVE_BUILD is enabled, the SELECTIVE_BUILD_STAT variable should contain the path to the collected InelSEAPI statistics. \
Usage: -DSELECTIVE_BUILD=ON -DSELECTIVE_BUILD_STAT=/path/*.csv" OFF
ALLOWED_VALUES ON OFF COLLECT)
ie_option (ENABLE_THREAD_SANITIZER "enable checking data races via ThreadSanitizer" OFF)
ie_option(ENABLE_ERROR_HIGHLIGHT "Highlight errors and warnings during compile time" OFF)
ie_dependent_option (COVERAGE "enable code coverage" OFF "CMAKE_CXX_COMPILER_ID STREQUAL GNU" OFF)
#
# Process options
#
# Define CPU capabilities
ie_dependent_option (ENABLE_SSE42 "Enable SSE4.2 optimizations" ON "X86_64 OR X86" OFF)
ie_dependent_option (ENABLE_AVX2 "Enable AVX2 optimizations" ON "X86_64 OR X86" OFF)
ie_dependent_option (ENABLE_AVX512F "Enable AVX512 optimizations" ON "X86_64 OR X86" OFF)
ie_dependent_option (ENABLE_PROFILING_ITT "ITT tracing of IE and plugins internals" ON "NOT CMAKE_CROSSCOMPILING" OFF)
print_enabled_features()

View File

@@ -1,30 +0,0 @@
# Copyright (C) 2018-2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
function(enable_fuzzing)
# Enable (libFuzzer)[https://llvm.org/docs/LibFuzzer.html] if supported.
if(CMAKE_CXX_COMPILER_ID MATCHES "^(Apple)?Clang$" AND NOT WIN32)
# Communicate libfuzzer is enabled
set(WITH_LIBFUZZER ON PARENT_SCOPE)
add_compile_definitions(WITH_LIBFUZZER)
# Enable libfuzzer and code coverage
set(FUZZING_COMPILER_FLAGS "-fsanitize=fuzzer-no-link -fprofile-instr-generate -fcoverage-mapping")
set(FUZZING_LINKER_FLAGS "-fsanitize-coverage=trace-pc-guard -fprofile-instr-generate")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${FUZZING_COMPILER_FLAGS}" PARENT_SCOPE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FUZZING_COMPILER_FLAGS}" PARENT_SCOPE)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${FUZZING_LINKER_FLAGS}" PARENT_SCOPE)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${FUZZING_LINKER_FLAGS}")
endif()
endfunction(enable_fuzzing)
function(add_fuzzer FUZZER_EXE_NAME FUZZER_SOURCES)
add_executable(${FUZZER_EXE_NAME} ${FUZZER_SOURCES})
if(WITH_LIBFUZZER)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=fuzzer" PARENT_SCOPE)
endif()
target_link_libraries(${FUZZER_EXE_NAME} PRIVATE fuzz-testhelper)
endfunction(add_fuzzer)

View File

@@ -1,27 +0,0 @@
# Copyright (C) 2018-2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
# Usage: ie_option(<option_variable> "description" <initial value or boolean expression> [IF <condition>])
include (CMakeDependentOption)
include (version)
macro (ie_option variable description value)
option(${variable} "${description}" ${value})
list(APPEND IE_OPTIONS ${variable})
endmacro()
macro (ie_dependent_option variable description def_value condition fallback_value)
cmake_dependent_option(${variable} "${description}" ${def_value} "${condition}" ${fallback_value})
list(APPEND IE_OPTIONS ${variable})
endmacro()
function (print_enabled_features)
message(STATUS "Inference Engine enabled features: ")
message(STATUS "")
message(STATUS " CI_BUILD_NUMBER: ${CI_BUILD_NUMBER}")
foreach(_var ${IE_OPTIONS})
message(STATUS " ${_var} = ${${_var}}")
endforeach()
message(STATUS "")
endfunction()

View File

@@ -1,42 +0,0 @@
# Copyright (C) 2018-2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
# Target system specific flags
if(CMAKE_CL_64)
set(MSVC64 ON)
endif()
if(WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpmachine
OUTPUT_VARIABLE OPENVINO_GCC_TARGET_MACHINE
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(OPENVINO_GCC_TARGET_MACHINE MATCHES "amd64|x86_64|AMD64")
set(MINGW64 ON)
endif()
endif()
if(MSVC64 OR MINGW64)
set(X86_64 ON)
elseif(MINGW OR (MSVC AND NOT CMAKE_CROSSCOMPILING))
set(X86 ON)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*")
set(X86_64 ON)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i686.*|i386.*|x86.*|amd64.*|AMD64.*")
set(X86 ON)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm.*|ARM.*)")
set(ARM ON)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*)")
set(AARCH64 ON)
endif()
# in case of cross-compilation (or -m32) CMAKE_SYSTEM_PROCESSOR is equal to
# CMAKE_HOST_SYSTEM_PROCESSOR which is X86_64; patch this until a better solution
if(CMAKE_SIZEOF_VOID_P EQUAL 4 AND X86_64)
unset(X86_64)
set(X86 ON)
endif()
if(UNIX AND NOT APPLE)
set(LINUX ON)
endif()

View File

@@ -0,0 +1,24 @@
# Copyright (C) 2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
set(CMAKE_CXX_FLAGS_INIT "-m32")
set(CMAKE_C_FLAGS_INIT "-m32")
set(CMAKE_SHARED_LINKER_FLAGS_INIT "-m32")
set(CMAKE_MODULE_LINKER_FLAGS_INIT "-m32")
set(CMAKE_EXE_LINKER_FLAGS_INIT "-m32")
# Hints for OpenVINO
macro(_set_if_not_defined var val)
if(NOT DEFINED ${var})
set(${var} ${val} CACHE BOOL "" FORCE)
endif()
endmacro()
# need libusb 32-bits version
_set_if_not_defined(ENABLE_VPU OFF)
# fix conversion from uint64_t / int64_t to size_t
_set_if_not_defined(NGRAPH_ONNX_IMPORT_ENABLE OFF)

View File

@@ -0,0 +1,39 @@
# Copyright (C) 2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
#
# Flags for 3rd party projects
#
set(use_static_runtime ON)
if(use_static_runtime)
foreach(lang C CXX)
foreach(build_type "" "_DEBUG" "_MINSIZEREL" "_RELEASE" "_RELWITHDEBINFO")
set(flag_var "CMAKE_${lang}_FLAGS${build_type}")
string(REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
endforeach()
endforeach()
endif()
function(onecoreuap_set_runtime var)
set(${var} ${use_static_runtime} CACHE BOOL "" FORCE)
endfunction()
# ONNX
onecoreuap_set_runtime(ONNX_USE_MSVC_STATIC_RUNTIME)
# pugixml
onecoreuap_set_runtime(STATIC_CRT)
# protobuf
onecoreuap_set_runtime(protobuf_MSVC_STATIC_RUNTIME)
# clDNN
onecoreuap_set_runtime(CLDNN__COMPILE_LINK_USE_STATIC_RUNTIME)
# google-test
if(use_static_runtime)
set(gtest_force_shared_crt OFF CACHE BOOL "" FORCE)
else()
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
endif()
unset(use_static_runtime)

View File

@@ -0,0 +1,74 @@
# Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
#
# Define CMAKE_SYSTEM_VERSION if not defined
#
if(NOT DEFINED CMAKE_SYSTEM_VERSION)
# Sometimes CMAKE_HOST_SYSTEM_VERSION has form 10.x.y while we need
# form 10.x.y.z Adding .0 at the end fixes the issue
if(CMAKE_HOST_SYSTEM_VERSION MATCHES "^10\.0\.[0-9]+$")
set(CMAKE_SYSTEM_VERSION "${CMAKE_HOST_SYSTEM_VERSION}.0")
else()
set(CMAKE_SYSTEM_VERSION "${CMAKE_HOST_SYSTEM_VERSION}")
endif()
endif()
if(NOT DEFINED CMAKE_SYSTEM_PROCESSOR)
set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_HOST_SYSTEM_PROCESSOR})
endif()
message(STATUS "Building for Windows OneCore compliance (using OneCoreUap.lib, ${CMAKE_SYSTEM_VERSION})")
#
# OneCore flags
#
set(_onecoreuap_arch "x64")
if(CMAKE_GENERATOR_PLATFORM)
set(_onecoreuap_arch ${CMAKE_GENERATOR_PLATFORM})
endif()
if(_onecoreuap_arch STREQUAL "x64")
# Forcefull make VS search for C++ libreries in these folders prior to other c++ standard libraries localizations.
add_link_options("/LIBPATH:\"\$\(VC_LibraryPath_VC_x64_OneCore\)\"")
set(CMAKE_C_STANDARD_LIBRARIES "\$\(UCRTContentRoot\)lib/\$\(TargetUniversalCRTVersion\)/um/\$\(Platform\)/OneCoreUap.lib" CACHE STRING "" FORCE)
set(CMAKE_CXX_STANDARD_LIBRARIES "\$\(UCRTContentRoot\)lib/\$\(TargetUniversalCRTVersion\)/um/\$\(Platform\)/OneCoreUap.lib" CACHE STRING "" FORCE)
elseif(_onecoreuap_arch STREQUAL "X86")
add_link_options("/LIBPATH:\"\$\(VCInstallDir\)lib/onecore\"")
add_link_options("/LIBPATH:\"\$\(VC_LibraryPath_VC_x86_OneCore\)\"")
set(CMAKE_C_STANDARD_LIBRARIES "\$\(UCRTContentRoot\)lib/\$\(TargetUniversalCRTVersion\)/um/x86/OneCoreUap.lib" CACHE STRING "" FORCE)
set(CMAKE_CXX_STANDARD_LIBRARIES "\$\(UCRTContentRoot\)lib/\$\(TargetUniversalCRTVersion\)/um/x86/OneCoreUap.lib" CACHE STRING "" FORCE)
else()
message(FATAL_ERROR "Unsupported architecture ${_onecoreuap_arch}. Only X86 or X86_64 are supported")
endif()
unset(_onecoreuap_arch)
# compile flags
set(includes "/I\"\$\(UniversalCRT_IncludePath\)\"")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${includes}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${includes}")
unset(includes)
# linker flags
foreach(lib kernel32 user32 advapi32 ole32 mscoree combase)
set(linker_flags "/NODEFAULTLIB:${lib}.lib ${linker_flags}")
endforeach()
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${linker_flags}")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${linker_flags}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${linker_flags}")
unset(linker_flags)
#
# Static runtime to overcome apiValidator tool restrictions
#
include("${CMAKE_CURRENT_LIST_DIR}/mt.runtime.win32.toolchain.cmake")

View File

@@ -0,0 +1,38 @@
# Copyright (C) 2018-2020 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
set(CMAKE_SYSTEM_NAME WindowsStore)
#
# Define CMAKE_SYSTEM_VERSION if not defined
#
if(NOT DEFINED CMAKE_SYSTEM_VERSION)
# Sometimes CMAKE_HOST_SYSTEM_VERSION has form 10.x.y while we need
# form 10.x.y.z Adding .0 at the end fixes the issue
if(CMAKE_HOST_SYSTEM_VERSION MATCHES "^10\.0\.[0-9]+$")
set(CMAKE_SYSTEM_VERSION "${CMAKE_HOST_SYSTEM_VERSION}.0")
else()
set(CMAKE_SYSTEM_VERSION "${CMAKE_HOST_SYSTEM_VERSION}")
endif()
endif()
if(NOT DEFINED CMAKE_SYSTEM_PROCESSOR)
set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_HOST_SYSTEM_PROCESSOR})
endif()
#
# Compilation flags
#
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/src/uwp.hpp"
"#ifdef WINAPI_FAMILY\n"
"#undef WINAPI_FAMILY\n"
"#define WINAPI_FAMILY WINAPI_FAMILY_DESKTOP_APP\n"
"#endif\n")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /FI\"${CMAKE_CURRENT_BINARY_DIR}/src/uwp.hpp\"")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /FI\"${CMAKE_CURRENT_BINARY_DIR}/src/uwp.hpp\"")
set(CMAKE_VS_GLOBALS "WindowsTargetPlatformMinVersion=${CMAKE_SYSTEM_VERSION}")

View File

@@ -2,59 +2,387 @@
# SPDX-License-Identifier: Apache-2.0
#
add_subdirectory(examples)
# Detect nGraph
find_package(ngraph QUIET)
if(NOT ngraph_FOUND)
set(ngraph_DIR ${CMAKE_BINARY_DIR}/ngraph)
endif()
# Detect InferenceEngine
find_package(InferenceEngine QUIET)
if(NOT InferenceEngine_FOUND)
set(InferenceEngine_DIR ${CMAKE_BINARY_DIR})
endif()
add_subdirectory(template_extension)
set(all_docs_targets
ie_docs_examples
template_extension
templatePlugin TemplateBehaviorTests TemplateFunctionalTests)
foreach(target_name IN LISTS all_docs_targets)
if (TARGET ${target_name})
set_target_properties(${target_name} PROPERTIES FOLDER docs)
if(NOT ENABLE_DOCKER)
if(CMAKE_COMPILER_IS_GNUCXX)
ie_add_compiler_flags(-Wall)
endif()
endforeach()
# OpenVINO docs
add_subdirectory(snippets)
set(OPENVINO_DOCS_PATH "" CACHE PATH "Path to openvino-documentation local repository")
set(args "")
# Detect nGraph
find_package(ngraph QUIET
PATHS "${CMAKE_BINARY_DIR}/ngraph"
NO_DEFAULT_PATH)
if(NOT ngraph_FOUND)
set(ngraph_DIR ${CMAKE_BINARY_DIR}/ngraph)
endif()
if(OPENVINO_DOCS_PATH)
set(args "${args} ovinodoc_path:${OPENVINO_DOCS_PATH}")
# Detect InferenceEngine
find_package(InferenceEngine QUIET
PATHS "${CMAKE_BINARY_DIR}"
NO_DEFAULT_PATH)
if(NOT InferenceEngine_FOUND)
set(InferenceEngine_DIR ${CMAKE_BINARY_DIR})
endif()
if (NGRAPH_ONNX_IMPORT_ENABLE)
add_subdirectory(onnx_custom_op)
endif()
add_subdirectory(template_extension)
set(all_docs_targets
ie_docs_snippets
template_extension
templatePlugin TemplateBehaviorTests TemplateFunctionalTests)
foreach(target_name IN LISTS all_docs_targets)
if (TARGET ${target_name})
set_target_properties(${target_name} PROPERTIES FOLDER docs)
if(WIN32)
set_target_properties(${target_name} PROPERTIES COMPILE_PDB_NAME ${target_name})
endif()
endif()
endforeach()
endif()
file(GLOB_RECURSE docs_files "${OpenVINO_MAIN_SOURCE_DIR}/docs")
file(GLOB_RECURSE include_files "${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/include")
file(GLOB_RECURSE ovino_files "${OPENVINO_DOCS_PATH}")
set(LINKCHECKER_PY "" CACHE FILEPATH "Path to linkchecker.py for documentation check")
set(OMZ_DOCS_DIR "" CACHE PATH "Path to open_model_zoo documentation")
set(WORKBENCH_DOCS_DIR "" CACHE PATH "Path to workbench documentation")
set(POT_DOCS_DIR "" CACHE PATH "Path to post-training-compression-tool documentation")
set(GST_DOCS_DIR "" CACHE PATH "Path to gst-video-analytics documentation")
add_custom_target(ie_docs
COMMAND ./build_docs.sh ${args}
WORKING_DIRECTORY "${OpenVINO_MAIN_SOURCE_DIR}/docs/build_documentation"
COMMENT "Generating OpenVINO documentation"
SOURCES ${docs_files} ${include_files} ${ovino_files}
VERBATIM)
set_target_properties(ie_docs PROPERTIES FOLDER docs)
function(build_docs)
find_package(Doxygen REQUIRED dot)
find_package(Python3 COMPONENTS Interpreter)
find_package(LATEX)
find_program(browser NAMES xdg-open)
if(browser)
add_custom_target(ie_docs_open
COMMAND ${browser} "${OpenVINO_MAIN_SOURCE_DIR}/doc/html/index.html"
DEPENDS ie_docs
COMMENT "Open OpenVINO documentation"
if(NOT DOXYGEN_FOUND)
message(FATAL_ERROR "Doxygen is required to build the documentation")
endif()
if(NOT Python3_FOUND)
message(FATAL_ERROR "Python3 is required to build the documentation")
endif()
execute_process(
COMMAND ${Python3_EXECUTABLE} -m pip show lxml
RESULT_VARIABLE PIP_EXIT_CODE
OUTPUT_QUIET
)
if (NOT ${PIP_EXIT_CODE} EQUAL 0)
message(FATAL_ERROR "lxml package is not installed. Please use \"pip install lxml\".")
endif()
if(NOT LATEX_FOUND)
message(FATAL_ERROR "LATEX is required to build the documentation")
endif()
set(DOCS_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}")
set(DOXYGEN_DIR "${OpenVINO_MAIN_SOURCE_DIR}/docs/doxygen")
set(IE_SOURCE_DIR "${OpenVINO_MAIN_SOURCE_DIR}/inference-engine")
set(PYTHON_API_IN "${IE_SOURCE_DIR}/ie_bridges/python/src/openvino/inference_engine/ie_api.pyx")
set(PYTHON_API_OUT "${DOCS_BUILD_DIR}/python_api/ie_api.pyx")
set(C_API "${IE_SOURCE_DIR}/ie_bridges/c/include")
set(PLUGIN_API_DIR "${DOCS_BUILD_DIR}/IE_PLUGIN_DG")
set(NGRAPH_DIR "${OpenVINO_MAIN_SOURCE_DIR}/ngraph")
set(NGRAPH_PY_DIR "${NGRAPH_DIR}/python/src/ngraph/")
set(NGRAPH_CPP_DIR "${NGRAPH_DIR}/core/include/" "${NGRAPH_DIR}/frontend/onnx_import/include")
# Preprocessing scripts
set(DOXY_MD_FILTER "${DOXYGEN_DIR}/doxy_md_filter.py")
set(DOXY_LAYOUT_SCRIPT "${DOXYGEN_DIR}/build_main_layout.py")
set(DOXY_LOG_SCRIPT "${DOXYGEN_DIR}/log.py")
set(PYX_FILTER "${DOXYGEN_DIR}/pyx_filter.py")
# assets dir
set(ASSETS_DIR "${DOXYGEN_DIR}/assets")
# header and footer
set(HEADER_SOURCE "${DOXYGEN_DIR}/header.html.in")
set(FOOTER_SOURCE "${DOXYGEN_DIR}/footer.html.in")
set(HEADER_BUILD "${DOCS_BUILD_DIR}/header.html")
set(FOOTER_BUILD "${DOCS_BUILD_DIR}/footer.html")
configure_file(${HEADER_SOURCE} ${HEADER_BUILD} @ONLY)
configure_file(${FOOTER_SOURCE} ${FOOTER_BUILD} @ONLY)
file(GLOB_RECURSE doc_source_files
LIST_DIRECTORIES true RELATIVE ${OpenVINO_MAIN_SOURCE_DIR}
"${OpenVINO_MAIN_SOURCE_DIR}/docs/*.md"
"${OpenVINO_MAIN_SOURCE_DIR}/docs/*.png"
"${OpenVINO_MAIN_SOURCE_DIR}/docs/*.gif"
"${OpenVINO_MAIN_SOURCE_DIR}/docs/*.jpg"
"${OpenVINO_MAIN_SOURCE_DIR}/docs/*.svg"
"${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.md"
"${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.png"
"${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.gif"
"${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.jpg"
"${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.svg")
configure_file(${PYTHON_API_IN} ${PYTHON_API_OUT} @ONLY)
set(NGRAPH_CPP_CONFIG_SOURCE "${DOXYGEN_DIR}/ngraph_cpp_api.config")
set(NGRAPH_PY_CONFIG_SOURCE "${DOXYGEN_DIR}/ngraph_py_api.config")
set(IE_CONFIG_SOURCE "${DOXYGEN_DIR}/ie_docs.config")
set(C_CONFIG_SOURCE "${DOXYGEN_DIR}/ie_c_api.config")
set(PY_CONFIG_SOURCE "${DOXYGEN_DIR}/ie_py_api.config")
set(PLUGIN_CONFIG_SOURCE "${DOXYGEN_DIR}/ie_plugin_api.config")
set(NGRAPH_CPP_CONFIG_BUILD "${DOCS_BUILD_DIR}/ngraph_cpp_api.config")
set(NGRAPH_PY_CONFIG_BUILD "${DOCS_BUILD_DIR}/ngraph_py_api.config")
set(IE_CONFIG_BUILD "${DOCS_BUILD_DIR}/ie_docs.config")
set(C_CONFIG_BUILD "${DOCS_BUILD_DIR}/ie_c_api.config")
set(PY_CONFIG_BUILD "${DOCS_BUILD_DIR}/ie_py_api.config")
set(PLUGIN_CONFIG_BUILD "${DOCS_BUILD_DIR}/ie_plugin_api.config")
set(NGRAPH_CPP_LAYOUT_SOURCE "${DOXYGEN_DIR}/ngraph_cpp_api.xml")
set(NGRAPH_PY_LAYOUT_SOURCE "${DOXYGEN_DIR}/ngraph_py_api.xml")
set(IE_LAYOUT_SOURCE "${DOXYGEN_DIR}/ie_docs.xml")
set(OPENVINO_LAYOUT_SOURCE "${DOXYGEN_DIR}/openvino_docs.xml")
set(C_LAYOUT_SOURCE "${DOXYGEN_DIR}/ie_c_api.xml")
set(PY_LAYOUT_SOURCE "${DOXYGEN_DIR}/ie_py_api.xml")
set(PLUGIN_LAYOUT_SOURCE "${DOXYGEN_DIR}/ie_plugin_api.xml")
set(NGRAPH_CPP_LAYOUT_BUILD "${DOCS_BUILD_DIR}/ngraph_cpp_api.xml")
set(NGRAPH_PY_LAYOUT_BUILD "${DOCS_BUILD_DIR}/ngraph_py_api.xml")
set(IE_LAYOUT_BUILD "${DOCS_BUILD_DIR}/ie_docs.xml")
set(OPENVINO_LAYOUT_BUILD "${DOCS_BUILD_DIR}/openvino_docs.xml")
set(C_LAYOUT_BUILD "${DOCS_BUILD_DIR}/ie_c_api.xml")
set(PY_LAYOUT_BUILD "${DOCS_BUILD_DIR}/ie_py_api.xml")
set(PLUGIN_LAYOUT_BUILD "${DOCS_BUILD_DIR}/ie_plugin_api.xml")
# out dirs
set(OUTPUT_DIRECTORY "${DOCS_BUILD_DIR}/html")
set(IE_OUTPUT "${OUTPUT_DIRECTORY}")
set(C_OUTPUT "${OUTPUT_DIRECTORY}/ie_c_api")
set(PY_OUTPUT "${OUTPUT_DIRECTORY}/ie_python_api")
set(PLUGIN_OUTPUT "${OUTPUT_DIRECTORY}/ie_plugin_api")
set(NGRAPH_CPP_OUTPUT "${OUTPUT_DIRECTORY}/ngraph_cpp_api")
set(NGRAPH_PY_OUTPUT "${OUTPUT_DIRECTORY}/ngraph_python_api")
# Tables of contents
configure_file(${NGRAPH_CPP_LAYOUT_SOURCE} ${NGRAPH_CPP_LAYOUT_BUILD} @ONLY)
configure_file(${NGRAPH_PY_LAYOUT_SOURCE} ${NGRAPH_PY_LAYOUT_BUILD} @ONLY)
configure_file(${IE_LAYOUT_SOURCE} ${IE_LAYOUT_BUILD} @ONLY)
configure_file(${OPENVINO_LAYOUT_SOURCE} ${OPENVINO_LAYOUT_BUILD} @ONLY)
configure_file(${C_LAYOUT_SOURCE} ${C_LAYOUT_BUILD} @ONLY)
configure_file(${PY_LAYOUT_SOURCE} ${PY_LAYOUT_BUILD} @ONLY)
configure_file(${PLUGIN_LAYOUT_SOURCE} ${PLUGIN_LAYOUT_BUILD} @ONLY)
# Doxygen config files
configure_file(${NGRAPH_CPP_CONFIG_SOURCE} ${NGRAPH_CPP_CONFIG_BUILD} @ONLY)
configure_file(${NGRAPH_PY_CONFIG_SOURCE} ${NGRAPH_PY_CONFIG_BUILD} @ONLY)
configure_file(${IE_CONFIG_SOURCE} ${IE_CONFIG_BUILD} @ONLY)
configure_file(${C_CONFIG_SOURCE} ${C_CONFIG_BUILD} @ONLY)
configure_file(${PY_CONFIG_SOURCE} ${PY_CONFIG_BUILD} @ONLY)
configure_file(${PLUGIN_CONFIG_SOURCE} ${PLUGIN_CONFIG_BUILD} @ONLY)
# Preprocessing scripts
set(DOXY_MD_FILTER "${DOXYGEN_DIR}/doxy_md_filter.py")
set(PYX_FILTER "${DOXYGEN_DIR}/pyx_filter.py")
# nGraph C++ API
add_custom_target(ngraph_cpp_api
COMMAND ${CMAKE_COMMAND} -E copy_directory ${ASSETS_DIR} ${NGRAPH_CPP_OUTPUT}/assets
COMMAND ${DOXYGEN_EXECUTABLE} ${NGRAPH_CPP_CONFIG_BUILD}
WORKING_DIRECTORY ${DOCS_BUILD_DIR}
VERBATIM)
set_target_properties(ie_docs_open PROPERTIES FOLDER docs)
# nGraph Python API
add_custom_target(ngraph_py_api
COMMAND ${CMAKE_COMMAND} -E copy_directory ${ASSETS_DIR} ${NGRAPH_PY_OUTPUT}/assets
COMMAND ${DOXYGEN_EXECUTABLE} ${NGRAPH_PY_CONFIG_BUILD}
WORKING_DIRECTORY ${DOCS_BUILD_DIR}
VERBATIM)
# C API
add_custom_target(c_api
COMMAND ${CMAKE_COMMAND} -E copy_directory ${ASSETS_DIR} ${C_OUTPUT}/assets
COMMAND ${DOXYGEN_EXECUTABLE} ${C_CONFIG_BUILD}
WORKING_DIRECTORY ${DOCS_BUILD_DIR}
COMMENT "Generating C API Reference"
VERBATIM)
# Python API
add_custom_target(py_api
COMMAND ${CMAKE_COMMAND} -E copy_directory ${ASSETS_DIR} ${PY_OUTPUT}/assets
COMMAND ${DOXYGEN_EXECUTABLE} ${PY_CONFIG_BUILD}
WORKING_DIRECTORY ${DOCS_BUILD_DIR}
COMMENT "Generating Python API Reference"
VERBATIM)
add_custom_command(TARGET py_api
PRE_BUILD
COMMAND ${Python3_EXECUTABLE} ${PYX_FILTER} ${PYTHON_API_OUT}
COMMENT "Pre-process Python API")
# Preprocess docs
add_custom_target(preprocess_docs
COMMENT "Pre-process docs"
VERBATIM)
# ovino doc files
file(GLOB_RECURSE ovino_doc_files
LIST_DIRECTORIES true RELATIVE ${OpenVINO_MAIN_SOURCE_DIR}
"${OpenVINO_MAIN_SOURCE_DIR}/docs/*.md"
"${OpenVINO_MAIN_SOURCE_DIR}/docs/*.png"
"${OpenVINO_MAIN_SOURCE_DIR}/docs/*.gif"
"${OpenVINO_MAIN_SOURCE_DIR}/docs/*.jpg"
"${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.md"
"${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.png"
"${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.gif"
"${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/*.jpg")
foreach(source_file ${ovino_doc_files})
list(APPEND commands COMMAND ${CMAKE_COMMAND} -E copy
"${OpenVINO_MAIN_SOURCE_DIR}/${source_file}" "${DOCS_BUILD_DIR}/openvino/${source_file}")
endforeach()
# omz doc files
if(EXISTS "${OMZ_DOCS_DIR}")
get_filename_component(OMZ_DOCS_DIR "${OMZ_DOCS_DIR}" ABSOLUTE)
file(GLOB_RECURSE omz_doc_files
LIST_DIRECTORIES true RELATIVE ${OMZ_DOCS_DIR}
"${OMZ_DOCS_DIR}/*.md"
"${OMZ_DOCS_DIR}/*.png"
"${OMZ_DOCS_DIR}/*.gif"
"${OMZ_DOCS_DIR}/*.jpg")
foreach(source_file ${omz_doc_files})
list(APPEND commands COMMAND ${CMAKE_COMMAND} -E copy
"${OMZ_DOCS_DIR}/${source_file}" "${DOCS_BUILD_DIR}/omz/${source_file}")
endforeach()
configure_file("${OMZ_DOCS_DIR}/omz_docs.xml" "${DOCS_BUILD_DIR}/omz_docs.xml" @ONLY)
endif()
# workbench doc files
if(EXISTS "${WORKBENCH_DOCS_DIR}")
get_filename_component(WORKBENCH_DOCS_DIR "${WORKBENCH_DOCS_DIR}" ABSOLUTE)
file(GLOB_RECURSE workbench_doc_files
LIST_DIRECTORIES true RELATIVE ${WORKBENCH_DOCS_DIR}
"${WORKBENCH_DOCS_DIR}/*.md"
"${WORKBENCH_DOCS_DIR}/*.png"
"${WORKBENCH_DOCS_DIR}/*.gif"
"${WORKBENCH_DOCS_DIR}/*.jpg")
foreach(source_file ${workbench_doc_files})
list(APPEND commands COMMAND ${CMAKE_COMMAND} -E copy
"${WORKBENCH_DOCS_DIR}/${source_file}" "${DOCS_BUILD_DIR}/workbench/${source_file}")
endforeach()
configure_file("${WORKBENCH_DOCS_DIR}/docs/Workbench_DG/workbench_docs.xml" "${DOCS_BUILD_DIR}/workbench_docs.xml" @ONLY)
endif()
# pot doc files
if(EXISTS "${POT_DOCS_DIR}")
get_filename_component(POT_DOCS_DIR "${POT_DOCS_DIR}" ABSOLUTE)
file(GLOB_RECURSE pot_doc_files
LIST_DIRECTORIES true RELATIVE ${POT_DOCS_DIR}
"${POT_DOCS_DIR}/*.md"
"${POT_DOCS_DIR}/*.png"
"${POT_DOCS_DIR}/*.gif"
"${POT_DOCS_DIR}/*.jpg")
foreach(source_file ${pot_doc_files})
list(APPEND commands COMMAND ${CMAKE_COMMAND} -E copy
"${POT_DOCS_DIR}/${source_file}" "${DOCS_BUILD_DIR}/pot/${source_file}")
endforeach()
configure_file("${POT_DOCS_DIR}/docs/pot_docs.xml" "${DOCS_BUILD_DIR}/pot_docs.xml" @ONLY)
endif()
# gst doc files
if(EXISTS "${GST_DOCS_DIR}")
get_filename_component(GST_DOCS_DIR "${GST_DOCS_DIR}" ABSOLUTE)
file(GLOB_RECURSE gst_doc_files
LIST_DIRECTORIES true RELATIVE ${GST_DOCS_DIR}
"${GST_DOCS_DIR}/*.md"
"${GST_DOCS_DIR}/*.png"
"${GST_DOCS_DIR}/*.gif"
"${GST_DOCS_DIR}/*.jpg")
foreach(source_file ${gst_doc_files})
list(APPEND commands COMMAND ${CMAKE_COMMAND} -E copy
"${GST_DOCS_DIR}/${source_file}" "${DOCS_BUILD_DIR}/gst/${source_file}")
endforeach()
endif()
add_custom_command(TARGET preprocess_docs
PRE_BUILD
${commands}
COMMAND ${Python3_EXECUTABLE} ${DOXY_LAYOUT_SCRIPT} --openvino ${OPENVINO_LAYOUT_BUILD}
COMMAND ${Python3_EXECUTABLE} ${DOXY_MD_FILTER} ${DOCS_BUILD_DIR}
COMMENT "Pre-process markdown and image links")
# IE dev guide and C++ API
add_custom_target(ie_docs
DEPENDS ngraph_cpp_api preprocess_docs
COMMAND ${CMAKE_COMMAND} -E copy_directory ${ASSETS_DIR} ${IE_OUTPUT}/assets
COMMAND ${DOXYGEN_EXECUTABLE} ${IE_CONFIG_BUILD}
WORKING_DIRECTORY ${DOCS_BUILD_DIR}
VERBATIM)
# Plugin API
add_custom_target(plugin_api
DEPENDS ngraph_cpp_api ie_docs
COMMAND ${CMAKE_COMMAND} -E copy_directory ${ASSETS_DIR} ${PLUGIN_OUTPUT}/assets
COMMAND ${DOXYGEN_EXECUTABLE} ${PLUGIN_CONFIG_BUILD}
WORKING_DIRECTORY ${DOCS_BUILD_DIR}
COMMENT "Generating Plugin API Reference"
VERBATIM)
# Umbrella OpenVINO target
add_custom_target(openvino_docs
DEPENDS ngraph_cpp_api ngraph_py_api c_api py_api ie_docs plugin_api
COMMENT "Generating OpenVINO documentation"
VERBATIM)
set_target_properties(openvino_docs ie_docs c_api py_api preprocess_docs plugin_api
ngraph_py_api ngraph_cpp_api
PROPERTIES FOLDER docs)
add_custom_command(TARGET openvino_docs
POST_BUILD
COMMAND ${Python3_EXECUTABLE} ${DOXY_LOG_SCRIPT} --log "${DOCS_BUILD_DIR}/ie_docs.log"
--include_omz $<BOOL:${OMZ_DOCS_DIR}>
--include_wb $<BOOL:${WORKBENCH_DOCS_DIR}>
--include_pot $<BOOL:${POT_DOCS_DIR}>
--include_gst $<BOOL:${GST_DOCS_DIR}>
COMMENT "Parse doxygen log to find errors."
VERBATIM)
# added linkcheker
if(EXISTS "${LINKCHECKER_PY}")
add_custom_target(docs_check
COMMAND ${Python3_EXECUTABLE} "${LINKCHECKER_PY}" -v "${DOCS_BUILD_DIR}/html/"
COMMENT "Check links in generated documentation"
WORKING_DIRECTORY "${DOCS_BUILD_DIR}"
VERBATIM)
set_target_properties(docs_check PROPERTIES FOLDER docs)
endif()
find_program(browser NAMES xdg-open)
if(browser)
add_custom_target(ie_docs_open
COMMAND ${browser} "${OpenVINO_MAIN_SOURCE_DIR}/docs/html/index.html"
DEPENDS ie_docs
COMMENT "Open OpenVINO documentation"
VERBATIM)
set_target_properties(ie_docs_open PROPERTIES FOLDER docs)
endif()
endfunction()
if(ENABLE_DOCS)
build_docs()
endif()

View File

@@ -1,212 +1,380 @@
# Custom Layers Guide {#openvino_docs_HOWTO_Custom_Layers_Guide}
# Custom Operations Guide {#openvino_docs_HOWTO_Custom_Layers_Guide}
The Intel® Distribution of OpenVINO™ toolkit supports neural network model layers in multiple frameworks including TensorFlow*, Caffe*, MXNet*, Kaldi* and ONYX*. The list of known layers is different for each of the supported frameworks. To see the layers supported by your framework, refer to [supported frameworks](../MO_DG/prepare_model/Supported_Frameworks_Layers.md).
The Intel® Distribution of OpenVINO™ toolkit supports neural network models trained with multiple frameworks including
TensorFlow*, Caffe*, MXNet*, Kaldi* and ONNX* file format. The list of supported operations (layers) is different for
each of the supported frameworks. To see the operations supported by your framework, refer to
[Supported Framework Layers](../MO_DG/prepare_model/Supported_Frameworks_Layers.md).
Custom layers are layers that are not included in the list of known layers. If your topology contains any layers that are not in the list of known layers, the Model Optimizer classifies them as custom.
Custom operations are operations that are not included in the list of known operations. If your model contains any
operation that is not in the list of known operations, the Model Optimizer is not able to generate an Intermediate
Representation (IR) for this model.
This guide illustrates the workflow for running inference on topologies featuring custom layers, allowing you to plug in your own implementation for existing or completely new layers.
For a step-by-step example of creating and executing a custom layer, see the [Custom Layer Implementation Tutorials for Linux and Windows.](https://github.com/david-drew/OpenVINO-Custom-Layers/tree/master/2019.r2.0)
This guide illustrates the workflow for running inference on topologies featuring custom operations, allowing you to
plug in your own implementation for existing or completely new operation.
## Terms used in this guide
> **NOTE:** *Layer* — The legacy term for an *operation* which came from Caffe\* framework. Currently it is not used.
> Refer to the [Deep Learning Network Intermediate Representation and Operation Sets in OpenVINO™](../MO_DG/IR_and_opsets.md)
> for more information on the topic.
- *Layer* — The abstract concept of a math function that is selected for a specific purpose (relu, sigmoid, tanh, convolutional). This is one of a sequential series of building blocks within the neural network.
- *Kernel* — The implementation of a layer function, in this case, the math programmed (in C++ and Python) to perform the layer operation for target hardware (CPU or GPU).
- *Intermediate Representation (IR)* — Neural Network used only by the Inference Engine in OpenVINO abstracting the different frameworks and describing topology, layer parameters and weights.
The original format will be a supported framework such as TensorFlow, Caffe, or MXNet.
## Terms Used in This Guide
- *Model Extension Generator* — Generates template source code files for each of the extensions needed by the Model Optimizer and the Inference Engine.
- *Intermediate Representation (IR)* — Neural Network used only by the Inference Engine in OpenVINO abstracting the
different frameworks and describing the model topology, operations parameters and weights.
- *Operation* — The abstract concept of a math function that is selected for a specific purpose. Operations supported by
OpenVINO™ are listed in the supported operation set provided in the [Available Operations Sets](../ops/opset.md).
Examples of the operations are: [ReLU](../ops/activation/ReLU_1.md), [Convolution](../ops/convolution/Convolution_1.md),
[Add](../ops/arithmetic/Add_1.md), etc.
- *Kernel* — The implementation of a operation function in the OpenVINO™ plugin, in this case, the math programmed (in
C++ and OpenCL) to perform the operation for a target hardware (CPU or GPU).
- *Inference Engine Extension* — Device-specific module implementing custom operations (a set of kernels).
## Custom Operation Support Overview
There are three steps to support inference of a model with custom operation(s):
1. Add support for a custom operation in the [Model Optimizer](../MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md) so
the Model Optimizer can generate the IR with the operation.
2. Create an operation set and implement a custom nGraph operation in it as described in the
[Custom nGraph Operation](../IE_DG/Extensibility_DG/AddingNGraphOps.md).
3. Implement a customer operation in one of the [Inference Engine](../IE_DG/Deep_Learning_Inference_Engine_DevGuide.md)
plugins to support inference of this operation using a particular target hardware (CPU, GPU or VPU).
To see the operations that are supported by each device plugin for the Inference Engine, refer to the
[Supported Devices](../IE_DG/supported_plugins/Supported_Devices.md).
> **NOTE:** If a device doesn't support a particular operation, an alternative to creating a new operation is to target
> an additional device using the HETERO plugin. The [Heterogeneous Plugin](../IE_DG/supported_plugins/HETERO.md) may be
> used to run an inference model on multiple devices allowing the unsupported operations on one device to "fallback" to
> run on another device (e.g., CPU) that does support those operations.
### Custom Operation Support for the Model Optimizer
Model Optimizer model conversion pipeline is described in details in "Model Conversion Pipeline" section on the
[Model Optimizer Extensibility](../MO_DG/prepare_model/customize_model_optimizer/Customize_Model_Optimizer.md).
It is recommended to read that article first for a better understanding of the following material.
Model Optimizer provides extensions mechanism to support new operations and implement custom model transformations to
generate optimized IR. This mechanism is described in the "Model Optimizer Extensions" section on the
[Model Optimizer Extensibility](../MO_DG/prepare_model/customize_model_optimizer/Customize_Model_Optimizer.md).
Two types of the Model Optimizer extensions should be implemented to support custom operation at minimum:
1. Operation class for a new operation. This class stores information about the operation, its attributes, shape
inference function, attributes to be saved to an IR and some others internally used attributes. Refer to the
"Model Optimizer Operation" section on the
[Model Optimizer Extensibility](../MO_DG/prepare_model/customize_model_optimizer/Customize_Model_Optimizer.md) for the
detailed instruction on how to implement it.
2. Operation attributes extractor. The extractor is responsible for parsing framework-specific representation of the
operation and uses corresponding operation class to update graph node attributes with necessary attributes of the
operation. Refer to the "Operation Extractor" section on the
[Model Optimizer Extensibility](../MO_DG/prepare_model/customize_model_optimizer/Customize_Model_Optimizer.md) for the
detailed instruction on how to implement it.
> **NOTE:** In some cases you may need to implement some transformation to support the operation. This topic is covered
> in the "Graph Transformation Extensions" section on the
> [Model Optimizer Extensibility](../MO_DG/prepare_model/customize_model_optimizer/Customize_Model_Optimizer.md).
## Custom Operations Extensions for the Inference Engine
Inference Engine provides extensions mechanism to support new operations. This mechanism is described in the
[Inference Engine Extensibility Mechanism](../IE_DG/Extensibility_DG/Intro.md).
Each device plugin includes a library of optimized implementations to execute known operations which must be extended to
execute a custom operation. The custom operation extension is implemented according to the target device:
- Custom Operation CPU Extension
- A compiled shared library (`.so`, `.dylib` or `.dll`) needed by the CPU Plugin for executing the custom operation
on a CPU. Refer to the [How to Implement Custom CPU Operations](../IE_DG/Extensibility_DG/CPU_Kernel.md) for more
details.
- Custom Operation GPU Extension
- OpenCL source code (.cl) for the custom operation kernel that will be compiled to execute on the GPU along with a
operation description file (.xml) needed by the GPU Plugin for the custom operation kernel. Refer to the
[How to Implement Custom GPU Operations](../IE_DG/Extensibility_DG/GPU_Kernel.md) for more details.
- Custom Operation VPU Extension
- OpenCL source code (.cl) for the custom operation kernel that will be compiled to execute on the VPU along with a
operation description file (.xml) needed by the VPU Plugin for the custom operation kernel. Refer to the
[How to Implement Custom Operations for VPU](../IE_DG/Extensibility_DG/VPU_Kernel.md) for more details.
Also, it is necessary to implement nGraph custom operation according to the
[Custom nGraph Operation](../IE_DG/Extensibility_DG/AddingNGraphOps.md) so the Inference Engine can read an IR with this
operation and correctly infer output tensors shape and type.
## Enabling Magnetic Resonance Image Reconstruction Model
This chapter provides a step-by-step instruction on how to enable the magnetic resonance image reconstruction model
implemented in the [repository](https://github.com/rmsouza01/Hybrid-CS-Model-MRI/) using a custom operation on CPU. The
example is prepared for a model generated from the repository with hash `2ede2f96161ce70dcdc922371fe6b6b254aafcc8`.
### Download and Convert the Model to a Frozen TensorFlow\* Model Format
The original pre-trained model is provided in the hdf5 format which is not supported by OpenVINO directly and needs to
be converted to TensorFlow\* frozen model format first.
1. Download repository `https://github.com/rmsouza01/Hybrid-CS-Model-MRI`:<br
```bash
git clone https://github.com/rmsouza01/Hybrid-CS-Model-MRI
git checkout 2ede2f96161ce70dcdc922371fe6b6b254aafcc8
```
2. Convert pre-trained `.hdf5` to a frozen `.pb` graph using the following script (tested with TensorFlow==1.15.0 and
Keras==2.2.4) which should be executed from the root of the cloned repository:<br>
```py
import keras as K
import numpy as np
import Modules.frequency_spatial_network as fsnet
import tensorflow as tf
under_rate = '20'
stats = np.load("Data/stats_fs_unet_norm_" + under_rate + ".npy")
var_sampling_mask = np.load("Data/sampling_mask_" + under_rate + "perc.npy")
model = fsnet.wnet(stats[0], stats[1], stats[2], stats[3], kshape = (5,5), kshape2=(3,3))
model_name = "Models/wnet_" + under_rate + ".hdf5"
model.load_weights(model_name)
inp = np.random.standard_normal([1, 256, 256, 2]).astype(np.float32)
np.save('inp', inp)
sess = K.backend.get_session()
sess.as_default()
graph_def = sess.graph.as_graph_def()
graph_def = tf.graph_util.convert_variables_to_constants(sess, graph_def, ['conv2d_44/BiasAdd'])
with tf.gfile.FastGFile('wnet_20.pb', 'wb') as f:
f.write(graph_def.SerializeToString())
```
- *Inference Engine Extension* — Device-specific module implementing custom layers (a set of kernels).
As a result the TensorFlow\* frozen model file "wnet_20.pb" is generated.
### Convert the Frozen TensorFlow\* Model to Intermediate Representation
## Custom Layer Overview
The [Model Optimizer](https://docs.openvinotoolkit.org/2019_R1.1/_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html) searches the list of known layers for each layer contained in the input model topology before building the model's internal representation, optimizing the model, and producing the Intermediate Representation files.
The [Inference Engine](https://docs.openvinotoolkit.org/2019_R1.1/_docs_IE_DG_Deep_Learning_Inference_Engine_DevGuide.html) loads the layers from the input model IR files into the specified device plugin, which will search a list of known layer implementations for the device. If your topology contains layers that are not in the list of known layers for the device, the Inference Engine considers the layer to be unsupported and reports an error. To see the layers that are supported by each device plugin for the Inference Engine, refer to the [Supported Devices](https://docs.openvinotoolkit.org/2019_R1.1/_docs_IE_DG_supported_plugins_Supported_Devices.html) documentation.
<br>
**Note:** If a device doesn't support a particular layer, an alternative to creating a new custom layer is to target an additional device using the HETERO plugin. The [Heterogeneous Plugin](https://docs.openvinotoolkit.org/2019_R1.1/_docs_IE_DG_supported_plugins_HETERO.html) may be used to run an inference model on multiple devices allowing the unsupported layers on one device to "fallback" to run on another device (e.g., CPU) that does support those layers.
## Custom Layer Implementation Workflow
When implementing a custom layer for your pre-trained model in the Intel® Distribution of OpenVINO™ toolkit, you will need to add extensions to both the Model Optimizer and the Inference Engine.
## Custom Layer Extensions for the Model Optimizer
The following figure shows the basic processing steps for the Model Optimizer highlighting the two necessary custom layer extensions, the Custom Layer Extractor and the Custom Layer Operation.
![](img/MO_extensions_flow.png)
The Model Optimizer first extracts information from the input model which includes the topology of the model layers along with parameters, input and output format, etc., for each layer. The model is then optimized from the various known characteristics of the layers, interconnects, and data flow which partly comes from the layer operation providing details including the shape of the output for each layer. Finally, the optimized model is output to the model IR files needed by the Inference Engine to run the model.
The Model Optimizer starts with a library of known extractors and operations for each [supported model framework](https://docs.openvinotoolkit.org/2019_R1.1/_docs_MO_DG_prepare_model_Supported_Frameworks_Layers.html) which must be extended to use each unknown custom layer. The custom layer extensions needed by the Model Optimizer are:
- Custom Layer Extractor
- Responsible for identifying the custom layer operation and extracting the parameters for each instance of the custom layer. The layer parameters are stored per instance and used by the layer operation before finally appearing in the output IR. Typically the input layer parameters are unchanged, which is the case covered by this tutorial.
- Custom Layer Operation
- Responsible for specifying the attributes that are supported by the custom layer and computing the output shape for each instance of the custom layer from its parameters. <br> The `--mo-op` command-line argument shown in the examples below generates a custom layer operation for the Model Optimizer.
## Custom Layer Extensions for the Inference Engine
The following figure shows the basic flow for the Inference Engine highlighting two custom layer extensions for the CPU and GPU Plugins, the Custom Layer CPU extension and the Custom Layer GPU Extension.
![](img/IE_extensions_flow.png)
Each device plugin includes a library of optimized implementations to execute known layer operations which must be extended to execute a custom layer. The custom layer extension is implemented according to the target device:
- Custom Layer CPU Extension
- A compiled shared library (.so or .dll binary) needed by the CPU Plugin for executing the custom layer on the CPU.
- Custom Layer GPU Extension
- OpenCL source code (.cl) for the custom layer kernel that will be compiled to execute on the GPU along with a layer description file (.xml) needed by the GPU Plugin for the custom layer kernel.
## Model Extension Generator
Using answers to interactive questions or a *.json* configuration file, the Model Extension Generator tool generates template source code files for each of the extensions needed by the Model Optimizer and the Inference Engine. To complete the implementation of each extension, the template functions may need to be edited to fill-in details specific to the custom layer or the actual custom layer functionality itself.
### Command-line
The Model Extension Generator is included in the Intel® Distribution of OpenVINO™ toolkit installation and is run using the command (here with the "--help" option):
Firstly, open the model in the TensorBoard or other TensorFlow* model visualization tool. The model supports dynamic
batch dimension because the value for the batch dimension is not hardcoded in the model. Model Optimizer need to set all
dynamic dimensions to some specific value to create the IR, therefore specify the command line parameter `-b 1` to set
the batch dimension equal to 1. The actual batch size dimension can be changed at runtime using the Inference Engine API
described in the [Using Shape Inference](../IE_DG/ShapeInference.md). Also refer to
[Converting a Model Using General Conversion Parameters](../MO_DG/prepare_model/convert_model/Converting_Model_General.md)
and [Convert Your TensorFlow* Model](../MO_DG/prepare_model/convert_model/Convert_Model_From_TensorFlow.md)
for more details and command line parameters used for the model conversion.
```bash
python3 /opt/intel/openvino/deployment_tools/tools/extension_generator/extgen.py new --help
./<MO_INSTALL_DIR>/mo.py --input_model <PATH_TO_MODEL>/wnet_20.pb -b 1
```
where the output will appear similar to:
```
usage: You can use any combination of the following arguments:
Arguments to configure extension generation in the interactive mode:
optional arguments:
-h, --help show this help message and exit
--mo-caffe-ext generate a Model Optimizer Caffe* extractor
--mo-mxnet-ext generate a Model Optimizer MXNet* extractor
--mo-tf-ext generate a Model Optimizer TensorFlow* extractor
--mo-op generate a Model Optimizer operation
--ie-cpu-ext generate an Inference Engine CPU extension
--ie-gpu-ext generate an Inference Engine GPU extension
--output_dir OUTPUT_DIR
set an output directory. If not specified, the current
directory is used by default.
Model Optimizer produces the following error:
```bash
[ ERROR ] List of operations that cannot be converted to Inference Engine IR:
[ ERROR ] Complex (1)
[ ERROR ] lambda_2/Complex
[ ERROR ] IFFT2D (1)
[ ERROR ] lambda_2/IFFT2D
[ ERROR ] ComplexAbs (1)
[ ERROR ] lambda_2/Abs
[ ERROR ] Part of the nodes was not converted to IR. Stopped.
```
The available command-line arguments are used to specify which extension(s) to generate templates for the Model Optimizer or Inference Engine. The generated extension files for each argument will appear starting from the top of the output directory as follows:
The error means that the Model Optimizer doesn't know how to handle 3 types of TensorFlow\* operations: "Complex",
"IFFT2D" and "ComplexAbs". In order to see more details about the conversion process run the model conversion with
additional parameter `--log_level DEBUG`. It is worth to mention the following lines from the detailed output:
Command-line Argument | Output Directory Location |
--------------------- | ------------------------------ |
`--mo-caffe-ext` | user_mo_extensions/front/caffe |
`--mo-mxnet-ext` | user_mo_extensions/front/mxnet |
`--mo-tf-ext` | user_mo_extensions/front/tf |
`--mo-op` | user_mo_extensions/ops |
`--ie-cpu-ext` | user_ie_extensions/cpu |
`--ie-gpu-ext` | user_ie_extensions/gpu |
```bash
[ INFO ] Called "tf_native_tf_node_infer" for node "lambda_2/Complex"
[ <TIMESTAMP> ] [ DEBUG ] [ tf:228 ] Added placeholder with name 'lambda_2/lambda_3/strided_slice_port_0_ie_placeholder'
[ <TIMESTAMP> ] [ DEBUG ] [ tf:228 ] Added placeholder with name 'lambda_2/lambda_4/strided_slice_port_0_ie_placeholder'
[ <TIMESTAMP> ] [ DEBUG ] [ tf:241 ] update_input_in_pbs: replace input 'lambda_2/lambda_3/strided_slice' with input 'lambda_2/lambda_3/strided_slice_port_0_ie_placeholder'
[ <TIMESTAMP> ] [ DEBUG ] [ tf:249 ] Replacing input '0' of the node 'lambda_2/Complex' with placeholder 'lambda_2/lambda_3/strided_slice_port_0_ie_placeholder'
[ <TIMESTAMP> ] [ DEBUG ] [ tf:241 ] update_input_in_pbs: replace input 'lambda_2/lambda_4/strided_slice' with input 'lambda_2/lambda_4/strided_slice_port_0_ie_placeholder'
[ <TIMESTAMP> ] [ DEBUG ] [ tf:249 ] Replacing input '1' of the node 'lambda_2/Complex' with placeholder 'lambda_2/lambda_4/strided_slice_port_0_ie_placeholder'
[ <TIMESTAMP> ] [ DEBUG ] [ tf:148 ] Inferred shape of the output tensor with index '0' of the node 'lambda_2/Complex': '[ 1 256 256]'
[ <TIMESTAMP> ] [ DEBUG ] [ infer:145 ] Outputs:
[ <TIMESTAMP> ] [ DEBUG ] [ infer:32 ] output[0]: shape = [ 1 256 256], value = <UNKNOWN>
[ <TIMESTAMP> ] [ DEBUG ] [ infer:129 ] --------------------
[ <TIMESTAMP> ] [ DEBUG ] [ infer:130 ] Partial infer for lambda_2/IFFT2D
[ <TIMESTAMP> ] [ DEBUG ] [ infer:131 ] Op: IFFT2D
[ <TIMESTAMP> ] [ DEBUG ] [ infer:132 ] Inputs:
[ <TIMESTAMP> ] [ DEBUG ] [ infer:32 ] input[0]: shape = [ 1 256 256], value = <UNKNOWN>
```
### Extension Workflow
This is a part of the log of the partial inference phase of the model conversion. See the "Partial Inference" section on
the [Model Optimizer Extensibility](../MO_DG/prepare_model/customize_model_optimizer/Customize_Model_Optimizer.md) for
more information about this phase. Model Optimizer inferred output shape for the unknown operation of type "Complex"
using a "fallback" to TensorFlow\*. However, it is not enough to generate the IR because Model Optimizer doesn't know
which attributes of the operation should be saved to IR. So it is necessary to implement Model Optimizer extensions to
support these operations.
The workflow for each generated extension follows the same basic steps:
Before going into the extension development it is necessary to understand what these unsupported operations do according
to the TensorFlow\* framework specification.
![](img/MEG_generic_flow.png)
* "Complex" - returns a tensor of complex type constructed from two real input tensors specifying real and imaginary
part of a complex number.
* "IFFT2D" - returns a tensor with inverse 2-dimensional discrete Fourier transform over the inner-most 2 dimensions of
an input.
* "ComplexAbs" - returns a tensor with absolute values of input tensor with complex numbers.
**Step 1: Generate:** Use the Model Extension Generator to generate the Custom Layer Template Files.
The part of the model with all three unsupported operations is depicted below:
**Step 2: Edit:** Edit the Custom Layer Template Files as necessary to create the specialized Custom Layer Extension Source Code.
![Unsupported sub-graph](img/unsupported_subgraph.png)
**Step 3: Specify:** Specify the custom layer extension locations to be used by the Model Optimizer or Inference Engine.
This model uses complex numbers during the inference but Inference Engine does not support tensors of this data type. So
it is necessary to find a way how to avoid using tensors of such a type in the model. Fortunately, the complex tensor
appear as a result of "Complex" operation, is used as input in the "IFFT2D" operation then is passed to "ComplexAbs"
which produces real value tensor as output. So there are just 3 operations consuming/producing complex tensors in the
model.
## Caffe\* Models with Custom Layers <a name="caffe-models-with-custom-layers"></a>
Let's design an OpenVINO operation "FFT" which get a single real number tensor describing the complex number and
produces a single real number tensor describing output complex tensor. This way the fact that the model uses complex
numbers is hidden inside the "FFT" operation implementation. The operation gets a tensor of shape `[N, H, W, 2]` and
produces the output tensor with the same shape, where the innermost dimension contains pairs of real numbers describing
the complex number (its real and imaginary part). As we will see further this operation will allow us to support the
model. The implementation of the Model Optimizer operation should be saved to `mo_extensions/ops/FFT.py` file:
If your Caffe\* model has custom layers:
@snippet FFT.py fft:operation
**Register the custom layers as extensions to the Model Optimizer**. For instructions, see [Extending Model Optimizer with New Primitives](../MO_DG/prepare_model/customize_model_optimizer/Extending_Model_Optimizer_with_New_Primitives.md). When your custom layers are registered as extensions, the Model Optimizer generates a valid and optimized Intermediate Representation. You will need a bit of Python\* code that lets the Model Optimizer;
The attribute `inverse` is a flag specifying type of the FFT to apply: forward or inverse.
- Generate a valid Intermediate Representation according to the rules you specified.
- Be independent from the availability of Caffe on your computer.
If your model contains Custom Layers, it is important to understand the internal workflow of the Model Optimizer. Consider the following example.
See the "Model Optimizer Operation" section on the
[Model Optimizer Extensibility](../MO_DG/prepare_model/customize_model_optimizer/Customize_Model_Optimizer.md) for the
detailed instruction on how to implement the operation.
**Example**:
Now it is necessary to implement extractor for the "IFFT2D" operation according to the
"Operation Extractor" section on the
[Model Optimizer Extensibility](../MO_DG/prepare_model/customize_model_optimizer/Customize_Model_Optimizer.md). The
following snippet provides two extractors: one for "IFFT2D", another one for "FFT2D", however only on of them is used
in this example. The implementation should be saved to the file `mo_extensions/front/tf/FFT_ext.py`.
The network has:
@snippet FFT_ext.py fft_ext:extractor
* One input layer (#1)
* One output Layer (#5)
* Three internal layers (#2, 3, 4)
> **NOTE:** The graph is in inconsistent state after extracting node attributes because according to original operation
> "IFFT2D" semantic it should have an input consuming a tensor of complex numbers, but the extractor instantiated an
> operation "FFT" which expects a real tensor with specific layout. But the inconsistency will be resolved during
> applying front phase transformations discussed below.
The custom and standard layer types are:
The output shape of the operation "AddV2" from the picture above is `[N, H, W, 2]`. Where the innermost dimension
contains pairs of real numbers describing the complex number (its real and imaginary part). The following "StridedSlice"
operations split the input tensor into 2 parts to get a tensor of real and a tensor of imaginary parts which are then
consumed with the "Complex" operation to produce a tensor of complex numbers. These "StridedSlice" and "Complex"
operations can be removed so the "FFT" operation will get a real value tensor encoding complex numbers. To achieve this
we implement the front phase transformation which searches for a pattern of two "StridedSlice" operations with specific
attributes producing data to "Complex" operation and removes it from the graph. Refer to the
"Pattern-Defined Front Phase Transformations" section on the
[Model Optimizer Extensibility](../MO_DG/prepare_model/customize_model_optimizer/Customize_Model_Optimizer.md) for more
information on how this type of transformation works. The code snippet should be saved to the file
`mo_extensions/front/tf/Complex.py`.
* Layers #2 and #5 are implemented as Model Optimizer extensions.
* Layers #1 and #4 are supported in Model Optimizer out-of-the box.
* Layer #3 is neither in the list of supported layers nor in extensions, but is specified in CustomLayersMapping.xml.
@snippet Complex.py complex:transformation
> **NOTE**: If any of the layers are not in one of three categories described above, the Model Optimizer fails with an appropriate message and a link to the corresponding question in [Model Optimizer FAQ](../MO_DG/prepare_model/Model_Optimizer_FAQ.md).
> **NOTE:** The graph is in inconsistent state because the "ComplexAbs" operation consumes complex value tensor but
> "FFT" produces real value tensor.
The general process is as shown:
Now lets implement a transformation which replace a "ComplexAbs" operation with a sub-graph of primitive operations
which calculate the result using the following formulae: \f$module(z) = \sqrt{real(z) \cdot real(z) + imag(z) \cdot imag(z)}\f$.
Original "IFFT2D" operation produces tensor of complex values, but the "FFT" operation produces a real value tensor with
the same format and shape as the input for the operation. So the input shape for the "ComplexAbs" will be `[N, H, W, 2]`
with the innermost dimension containing tuple with real and imaginary part of a complex number. In order to calculate
absolute values for the complex tensor we do the following:
1. Raise all elements in the power of 2.
2. Calculate a reduced sum over the innermost dimension.
3. Calculate a square root.
![Example custom layer network](img/mo_caffe_priorities.png)
<br>
The implementation should be saved to the file `mo_extensions/front/tf/ComplexAbs.py` and provided below:
**Step 1:** The example model is fed to the Model Optimizer that **loads the model** with the special parser built on top of the `caffe.proto` file. In case of failure, the Model Optimizer asks you to prepare the parser that can read the model. For more information, refer to the Model Optimizer, <a href="MO_FAQ.html#FAQ1">FAQ #1</a>.
@snippet ComplexAbs.py complex_abs:transformation
**Step 2:** The Model Optimizer **extracts the attributes of all layers** by going through the list of layers and attempting to find the appropriate extractor. In order of priority, the Model Optimizer checks if the layer is:
* A. Registered as a Model Optimizer extension
* B. Registered as a standard Model Optimizer layer
When the Model Optimizer finds a satisfying condition from the list above, it extracts the attributes according to the following rules:
* For A. - takes only the parameters specified in the extension
* For B. - takes only the parameters specified in the standard extractor
<br>
Now it is possible to convert the model using the following command line:
```bash
./<MO_INSTALL_DIR>/mo.py --input_model <PATH_TO_MODEL>/wnet_20.pb -b 1 --extensions mo_extensions/
```
**Step 3:** The Model Optimizer **calculates the output shape of all layers**. The logic is the same as it is for the priorities. **Important:** the Model Optimizer always takes the first available option.
The sub-graph corresponding to the originally non-supported one is depicted on the image below:
**Step 4:** The Model Optimizer **optimizes the original model and produces the two Intermediate Representation (IR) files in .xml and .bin**.
<br>
![Converted sub-graph](img/converted_subgraph.png)
## TensorFlow\* Models with Custom Layers <a name="Tensorflow-models-with-custom-layers"></a>
> **NOTE:** Model Optimizer performed conversion of the model from NHWC to NCHW layout that is why the dimension with
> the value 2 moved to another position.
You have two options for TensorFlow\* models with custom layers:
<br>
### Inference Engine Extension Implementation
Now it is necessary to implement the extension for the CPU plugin with operation "FFT" introduced previously. The code
below is based on the template extension described on the
[Inference Engine Extensibility Mechanism](../IE_DG/Extensibility_DG/Intro.md).
* **Register those layers as extensions to the Model Optimizer.** In this case, the Model Optimizer generates a valid and optimized Intermediate Representation.
* **If you have sub-graphs that should not be expressed with the analogous sub-graph in the Intermediate Representation, but another sub-graph should appear in the model, the Model Optimizer provides such an option.** This feature is helpful for many TensorFlow models. To read more, see [Sub-graph Replacement in the Model Optimizer](../MO_DG/prepare_model/customize_model_optimizer/Subgraph_Replacement_Model_Optimizer.md).
## MXNet\* Models with Custom Layers <a name="mxnet-models-with-custom-layers"></a>
#### CMake Build File
The first step is to create a CMake configuration file which builds the extension. The content of the "CMakeLists.txt"
file is the following:
There are two options to convert your MXNet* model that contains custom layers:
@snippet ../template_extension/CMakeLists.txt cmake:extension
1. Register the custom layers as extensions to the Model Optimizer. For instructions, see [Extending MXNet Model Optimizer with New Primitives](../MO_DG/prepare_model/customize_model_optimizer/Extending_MXNet_Model_Optimizer_with_New_Primitives.md). When your custom layers are registered as extensions, the Model Optimizer generates a valid and optimized Intermediate Representation. You can create Model Optimizer extensions for both MXNet layers with op `Custom` and layers which are not standard MXNet layers.
The CPU FFT kernel implementation uses OpenCV to perform the FFT that is why the extension library is linked with
"opencv_core" which comes with the OpenVINO.
2. If you have sub-graphs that should not be expressed with the analogous sub-graph in the Intermediate Representation, but another sub-graph should appear in the model, the Model Optimizer provides such an option. In MXNet the function is actively used for ssd models provides an opportunity to for the necessary subgraph sequences and replace them. To read more, see [Sub-graph Replacement in the Model Optimizer](../MO_DG/prepare_model/customize_model_optimizer/Subgraph_Replacement_Model_Optimizer.md).
#### Custom nGraph Operation "FFT" Implementation
The next step is to create the nGraph operation FFT. The header file "fft_op.hpp" has the following content:
## Kaldi\* Models with Custom Layers <a name="Kaldi-models-with-custom-layers"></a>
For information on converting your Kaldi* model containing custom layers see [Converting a Kaldi Model in the Model Optimizer Developer Guide](https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_Kaldi.html).
@snippet ../template_extension/fft_op.hpp fft_op:header
## ONNX\* Models with Custom Layers <a name="ONNX-models-with-custom-layers"></a>
For information on converting your ONNX* model containing custom layers see [Converting an ONNX Model in the Model Optimizer Developer Guide](https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_ONNX.html).
The operation has just one boolean attribute `inverse`. Implementation of the necessary nGraph operation functions are
in the "fft_op.cpp" file with the following content:
## Step-by-Step Custom Layers Tutorial
For a step-by-step walk-through creating and executing a custom layer, see [Custom Layer Implementation Tutorial for Linux and Windows.](https://github.com/david-drew/OpenVINO-Custom-Layers/tree/master/2019.r2.0)
@snippet ../template_extension/fft_op.cpp fft_op:implementation
Refer to the [Custom nGraph Operation](../IE_DG/Extensibility_DG/AddingNGraphOps.md) for more details.
#### CPU FFT Kernel Implementation
The operation implementation for CPU plugin uses OpenCV to perform the FFT. The header file "fft_kernel.hpp" has the
following content:
@snippet ../template_extension/fft_kernel.hpp fft_kernel:header
The "fft_kernel.cpp" with the implementation of the CPU has the following content:
@snippet ../template_extension/fft_kernel.cpp fft_kernel:implementation
Refer to the [How to Implement Custom CPU Operations](../IE_DG/Extensibility_DG/CPU_Kernel.md) for more details.
#### Extension Library Implementation
The last step is to create an extension library "extension.cpp" and "extension.hpp" which will include the FFT
operation for the CPU plugin. The code of the library is described in the [Extension Library](../IE_DG/Extensibility_DG/Extension.md).
### Building and Running the Custom Extension
In order to build the extension run the following:<br>
```bash
mkdir build && cd build
source /opt/intel/openvino_2021/bin/setupvars.sh
cmake .. -DCMAKE_BUILD_TYPE=Release
make --jobs=$(nproc)
```
The result of this command is a compiled shared library (`.so`, `.dylib` or `.dll`). It should be loaded in the
application using `Core` class instance method `AddExtension` like this
`core.AddExtension(make_so_pointer<IExtension>(compiled_library_file_name), "CPU");`.
To test that the extension is implemented correctly we can run the "mri_reconstruction_demo.py" with the following content:
@snippet mri_reconstruction_demo.py mri_demo:demo
The script can be executed using the following command line:
```bash
python3 mri_reconstruction_demo.py \
-m <PATH_TO_IR>/wnet_20.xml \
-i <PATH_TO_SAMPLE_MRI_IMAGE>.npy \
-p <Hybrid-CS-Model-MRI_repo>/Data/sampling_mask_20perc.npy \
-l <PATH_TO_BUILD_DIR>/libtemplate_extension.so \
-d CPU
```
## Additional Resources
- Intel® Distribution of OpenVINO™ toolkit home page: [https://software.intel.com/en-us/openvino-toolkit](https://software.intel.com/en-us/openvino-toolkit)
- OpenVINO™ toolkit online documentation: [https://docs.openvinotoolkit.org](https://docs.openvinotoolkit.org)
- [Model Optimizer Developer Guide](https://docs.openvinotoolkit.org/latest/_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html)
- [Kernel Extensivility in the Inference Engine Developer Guide](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Integrate_your_kernels_into_IE.html)
- [Inference Engine Samples Overview](https://docs.openvinotoolkit.org/latest/_docs_IE_DG_Samples_Overview.html)
- [Overview of OpenVINO™ Toolkit Pre-Trained Models](https://docs.openvinotoolkit.org/latest/_intel_models_index.html)
- [Inference Engine Tutorials](https://github.com/intel-iot-devkit/inference-tutorials-generic)
- [Model Optimizer Developer Guide](../MO_DG/Deep_Learning_Model_Optimizer_DevGuide.md)
- [Model Optimizer Extensibility](../MO_DG/prepare_model/customize_model_optimizer/Customize_Model_Optimizer.md)
- [Inference Engine Extensibility Mechanism](../IE_DG/Extensibility_DG/Intro.md)
- [Inference Engine Samples Overview](../IE_DG/Samples_Overview.md)
- [Overview of OpenVINO™ Toolkit Pre-Trained Models](@ref omz_models_group_intel)
- For IoT Libraries and Code Samples see the [Intel® IoT Developer Kit](https://github.com/intel-iot-devkit).
## Converting Models:
- [Convert Your Caffe* Model](../MO_DG/prepare_model/convert_model/Convert_Model_From_Caffe.md)
- [Convert Your Kaldi* Model](../MO_DG/prepare_model/convert_model/Convert_Model_From_Kaldi.md)
- [Convert Your TensorFlow* Model](../MO_DG/prepare_model/convert_model/Convert_Model_From_TensorFlow.md)
- [Convert Your MXNet* Model](../MO_DG/prepare_model/convert_model/Convert_Model_From_MxNet.md)
- [Convert Your ONNX* Model](../MO_DG/prepare_model/convert_model/Convert_Model_From_ONNX.md)

Some files were not shown because too many files have changed in this diff Show More