Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into feature/azaytsev/…
Browse files Browse the repository at this point in the history
…cherry-picks-from-2021-2
  • Loading branch information
andrew-zaytsev committed Feb 1, 2021
2 parents 8d4c028 + 2457225 commit fb0e28b
Show file tree
Hide file tree
Showing 145 changed files with 3,223 additions and 1,595 deletions.
2 changes: 1 addition & 1 deletion .ci/azure/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
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 --gtest_output=xml:TEST-NGraphUT.xml
- 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

Expand Down
1 change: 1 addition & 0 deletions docs/MO_DG/prepare_model/Supported_Frameworks_Layers.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ Standard MXNet\* symbols:
| SoftmaxActivation | No |
| SoftmaxOutput | No |
| SoftSign | No |
| Take | The attribute 'mode' is not supported |
| Tile | No |
| UpSampling | No |
| Where | No |
Expand Down
8 changes: 8 additions & 0 deletions docs/doxygen/assets/bootstrap.bundle.min.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions docs/doxygen/assets/bootstrap.min.css

Large diffs are not rendered by default.

34 changes: 29 additions & 5 deletions docs/doxygen/assets/customdoxygen.css
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ h3 {
}

h4 {
font: normal 400 1.25/1.25 "Lato", "Helvetica", sans-serif;
font: normal 400 1.25rem/1.25 "Lato", "Helvetica", sans-serif;
}

/* "H1" headings */
Expand Down Expand Up @@ -791,7 +791,11 @@ a.see-all {
}

#download-link {
margin-right:3.28rem;
margin-right: 2.25rem;
}

#install-link {
margin-right: 3.28rem;
}
}

Expand All @@ -816,7 +820,11 @@ div.old-version > p {
}

#download-link {
margin-right: 3.75rem;
margin-right: 2.25rem;
}

#install-link {
margin-right: 3.75rem;
}

.nav-placeholder {
Expand Down Expand Up @@ -1298,11 +1306,26 @@ pre.fragment {
background: #f9f9f9;
border: none;
counter-reset: codegroup;
margin: 1.1rem 0;
padding: 0.75rem 1rem;
margin-bottom: 1.1rem;
padding: 0 1rem 0.75rem 0;
overflow: auto;
}

.code-container {
background: #f9f9f9;
margin-top: 0.75rem;
}

.code-header {
display: flex;
justify-content: flex-end;
padding: 0.3rem;
}

.copy-button {
cursor: pointer;
}

div.line {
box-sizing: content-box;
font-size: 12px;
Expand Down Expand Up @@ -1425,6 +1448,7 @@ iframe#MSearchResults {
transform: translateY(-50%);
right: 9rem;
width: 60vw;
padding-left:5px;
}

#search-slider {
Expand Down
46 changes: 46 additions & 0 deletions docs/doxygen/assets/openvino-layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,7 @@ function openVinoContent() {
searchSlider.on('click', function() {
$(this).toggleClass('closed open');
$("#MSearchField").animate({width:'toggle'},200);
$('#MSearchField').focus();
});
if (['http:', 'https:'].indexOf(window.location.protocol) !== -1) {
$('#MSearchField').replaceWith('<input type="text" name="query" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)">');
Expand Down Expand Up @@ -540,6 +541,51 @@ function openVinoContent() {
$(".contents").prepend($(".header"));
}

// assign clipboard button for each .fragment element
$('.fragment').wrap('<div class="code-container"></div>');
$('.code-container').prepend($('<div class="code-header"></div>'));
var $copyButton = $('<span class="material-icons copy-button">content_copy</span>');
$copyButton.click(function() {
var self = this;
$(self).text('check_circle_outline')
.css('color', '#003C71')
.css("pointer-events", 'none');;
$(self).next('.copy-tooltip')
.attr('data-original-title', 'Copied!')
.tooltip('show')
.addClass('active');
var fragment = $(self.parentElement.parentElement).children('div.fragment')[0];
var text = [];
$(fragment).children('div.line').each(function(key, val) {
text.push(val.innerText);
});
text = text.join('\n');
var $placeholder = $('<textarea>');
$placeholder.val(text);
$(document.body).append($placeholder);
$placeholder.select();
document.execCommand('copy');
$placeholder.remove();
setTimeout(function() {
$(self).text('content_copy')
.css({'color':'inherit', "pointer-events": 'all'});
$(self).next('.copy-tooltip')
.attr('data-original-title', 'Copy')
.tooltip('hide')
.removeClass('active');
}, 2000);
}).mouseenter(function() {
$(this).next('.copy-tooltip').tooltip('show');
}).mouseleave(function() {
if (!$(this).next('.copy-tooltip').hasClass('active')) {
$(this).next('.copy-tooltip').tooltip('hide');
}
});
$('.code-header').append($copyButton);
$('.code-header').append($('<span class="copy-tooltip" data-toggle="tooltip" trigger="manual" data-placement="right" title="Copy"></span>'));
// activate tooltips
$('[data-toggle="tooltip"]').tooltip();

// Detect any anchor in the content that links to an image and add target="_blank" to it
// This lets a user see very large images if they appear too narrow on page
// Less processor-intensive than interpreting every single image dimension at pageload
Expand Down
5 changes: 3 additions & 2 deletions docs/doxygen/header.html.in
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ limitations under the License.
<script src="assets/jquery-2.2.4.min.js"></script>
<script type="text/javascript" src="$relpath^dynsections.js"></script>
<!-- Bootstrap 4.4.1 -->
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet"
<link href="assets/bootstrap.min.css" rel="stylesheet"
type="text/css" />
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.bundle.min.js"
<script src="assets/bootstrap.bundle.min.js"
type="text/javascript"></script>
<!-- $treeview -->
$search
Expand All @@ -45,6 +45,7 @@ $extrastylesheet
<script type="text/javascript" src="assets/openvino-layout.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/viewerjs/1.6.2/viewer.css" integrity="sha512-Fd7AWkSYX3RBadbJlBrETnOyX5tkcQu2oN+nO11c+kewdhPlNWQ1Hj83W3hN1odgyh+k7rpvvv7IxZq9bRomCg==" crossorigin="anonymous" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/viewerjs/1.6.2/viewer.min.js" integrity="sha512-VzJLwaOOYyQemqxRypvwosaCDSQzOGqmBFRrKuoOv7rF2DZPlTaamK1zadh7i2FRmmpdUPAE/VBkCwq2HKPSEQ==" crossorigin="anonymous"></script>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
Expand Down
2 changes: 1 addition & 1 deletion docs/ops/detection/DeformablePSROIPooling_1.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ The box coordinates are specified as five element tuples: *[batch_id, x_1, y_1,

```xml
<layer ... type="DeformablePSROIPooling" ... >
<data group_size="7" mode="bilinear_deformable" no_trans="False" output_dim="8" part_size="7" pooled_height="7" pooled_width="7" spatial_bins_x="4" spatial_bins_y="4" spatial_scale="0.0625" trans_std="0.1"/>
<data group_size="7" mode="bilinear_deformable" output_dim="8" part_size="7" spatial_bins_x="4" spatial_bins_y="4" spatial_scale="0.0625" trans_std="0.1"/>
<input>
<port id="0">
<dim>1</dim>
Expand Down
2 changes: 1 addition & 1 deletion docs/ops/detection/DetectionOutput_1.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ At each feature map cell, *DetectionOutput* predicts the offsets relative to the

```xml
<layer ... type="DetectionOutput" ... >
<data background_label_id="1" code_type="caffe.PriorBoxParameter.CENTER_SIZE" confidence_threshold="0.019999999552965164" eta="1.0" height="0" height_scale="0" input_height="1" input_width="1" interp_mode="" keep_top_k="200" nms_threshold="0.44999998807907104" normalized="1" num_classes="2" pad_mode="" pad_value="" prob="0" resize_mode="" share_location="1" top_k="200" variance_encoded_in_target="0" visualize_threshold="0.6" width="0" width_scale="0"/>
<data background_label_id="1" code_type="caffe.PriorBoxParameter.CENTER_SIZE" confidence_threshold="0.019999999552965164" input_height="1" input_width="1" keep_top_k="200" nms_threshold="0.44999998807907104" normalized="true" num_classes="2" share_location="true" top_k="200" variance_encoded_in_target="false" clip_after_nms="false" clip_before_nms="false" objectness_score="0" decrease_label_id="false"/>
<input>
<port id="0">
<dim>1</dim>
Expand Down
2 changes: 1 addition & 1 deletion docs/ops/detection/PriorBoxClustered_1.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ If *clip* is defined, the coordinates of prior boxes are recalculated with the f

```xml
<layer type="PriorBoxClustered" ... >
<data clip="0" flip="1" height="44.0,10.0,30.0,19.0,94.0,32.0,61.0,53.0,17.0" offset="0.5" step="16.0" variance="0.1,0.1,0.2,0.2" width="86.0,13.0,57.0,39.0,68.0,34.0,142.0,50.0,23.0"/>
<data clip="false" height="44.0,10.0,30.0,19.0,94.0,32.0,61.0,53.0,17.0" offset="0.5" step="16.0" variance="0.1,0.1,0.2,0.2" width="86.0,13.0,57.0,39.0,68.0,34.0,142.0,50.0,23.0"/>
<input>
<port id="0">
<dim>2</dim> <!-- [10, 19] -->
Expand Down
2 changes: 1 addition & 1 deletion docs/ops/detection/PriorBox_1.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@

```xml
<layer type="PriorBox" ...>
<data aspect_ratio="2.0" clip="0" density="" fixed_ratio="" fixed_size="" flip="1" max_size="38.46" min_size="16.0" offset="0.5" step="16.0" variance="0.1,0.1,0.2,0.2"/>
<data aspect_ratio="2.0" clip="false" density="" fixed_ratio="" fixed_size="" flip="true" max_size="38.46" min_size="16.0" offset="0.5" step="16.0" variance="0.1,0.1,0.2,0.2"/>
<input>
<port id="0">
<dim>2</dim> <!-- values: [24, 42] -->
Expand Down
2 changes: 1 addition & 1 deletion docs/ops/image/Interpolate_4.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@

* *cube_coeff*

* **Description**: *cube_coeff* specifies the parameter *a* for cubic interpolation (see, e.g. [article](https://ieeexplore.ieee.org/document/1163711/)). *cube_coeff* is used only when `mode == cubic`.
* **Description**: *cube_coeff* specifies the parameter *a* for cubic interpolation (see, e.g. [article](https://ieeexplore.ieee.org/document/1163711/)). *cube_coeff* is used only when `mode == cubic`.
* **Range of values**: floating point number
* **Type**: any of supported floating point type
* **Default value**: `-0.75`
Expand Down
14 changes: 7 additions & 7 deletions docs/ops/pooling/AvgPool_1.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
* **Default value**: None
* **Required**: *yes*

* *exclude_pad*
* *exclude-pad*

* **Description**: *exclude_pad* is a type of pooling strategy for values in the padding area. For example, if *exclude_pad* is "true", then zero-values that came from padding are not included in averaging calculation.
* **Description**: *exclude-pad* is a type of pooling strategy for values in the padding area. For example, if *exclude-pad* is "true", then zero-values that came from padding are not included in averaging calculation.
* **Range of values**: true or false
* **Type**: boolean
* **Default value**: None
Expand Down Expand Up @@ -94,7 +94,7 @@ output_{j} = \frac{\sum_{i = 0}^{n}x_{i}}{n}

```xml
<layer ... type="AvgPool" ... >
<data auto_pad="same_upper" exclude_pad="true" kernel="2,2" pads_begin="0,0" pads_end="1,1" strides="2,2"/>
<data auto_pad="same_upper" exclude-pad="true" kernel="2,2" pads_begin="0,0" pads_end="1,1" strides="2,2"/>
<input>
<port id="0">
<dim>1</dim>
Expand All @@ -114,7 +114,7 @@ output_{j} = \frac{\sum_{i = 0}^{n}x_{i}}{n}
</layer>

<layer ... type="AvgPool" ... >
<data auto_pad="same_upper" exclude_pad="false" kernel="5,5" pads_begin="0,0" pads_end="1,1" strides="2,2"/>
<data auto_pad="same_upper" exclude-pad="false" kernel="5,5" pads_begin="0,0" pads_end="1,1" strides="2,2"/>
<input>
<port id="0">
<dim>1</dim>
Expand All @@ -134,7 +134,7 @@ output_{j} = \frac{\sum_{i = 0}^{n}x_{i}}{n}
</layer>

<layer ... type="AvgPool" ... >
<data auto_pad="explicit" exclude_pad="true" kernel="5,5" pads_begin="1,1" pads_end="1,1" strides="3,3"/>
<data auto_pad="explicit" exclude-pad="true" kernel="5,5" pads_begin="1,1" pads_end="1,1" strides="3,3"/>
<input>
<port id="0">
<dim>1</dim>
Expand All @@ -154,7 +154,7 @@ output_{j} = \frac{\sum_{i = 0}^{n}x_{i}}{n}
</layer>

<layer ... type="AvgPool" ... >
<data auto_pad="explicit" exclude_pad="false" kernel="5,5" pads_begin="1,1" pads_end="1,1" strides="2,2"/>
<data auto_pad="explicit" exclude-pad="false" kernel="5,5" pads_begin="1,1" pads_end="1,1" strides="2,2"/>
<input>
<port id="0">
<dim>1</dim>
Expand All @@ -174,7 +174,7 @@ output_{j} = \frac{\sum_{i = 0}^{n}x_{i}}{n}
</layer>

<layer ... type="AvgPool" ... >
<data auto_pad="valid" exclude_pad="true" kernel="5,5" pads_begin="1,1" pads_end="1,1" strides="2,2"/>
<data auto_pad="valid" exclude-pad="true" kernel="5,5" pads_begin="1,1" pads_end="1,1" strides="2,2"/>
<input>
<port id="0">
<dim>1</dim>
Expand Down
5 changes: 3 additions & 2 deletions docs/ops/sequence/CTCGreedyDecoder_1.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ Sequences in the batch can have different length. The lengths of sequences are c

**Attributes**

* *merge_repeated*
* *ctc_merge_repeated*

* **Description**: *merge_repeated* is a flag for merging repeated labels during the CTC calculation.
* **Description**: *ctc_merge_repeated* is a flag for merging repeated labels during the CTC calculation.
* **Range of values**: true or false
* **Type**: `boolean`
* **Default value**: true
Expand All @@ -41,6 +41,7 @@ Sequences in the batch can have different length. The lengths of sequences are c

```xml
<layer ... type="CTCGreedyDecoder" ...>
<data ctc_merge_repeated="true" />
<input>
<port id="0">
<dim>20</dim>
Expand Down
9 changes: 6 additions & 3 deletions docs/template_plugin/src/template_async_infer_request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,19 @@ TemplateAsyncInferRequest::TemplateAsyncInferRequest(
if (remoteDevice) {
_pipeline = {
{cpuTaskExecutor, [this] {
IE_PROFILING_AUTO_SCOPE(PreprocessingAndStartPipeline)
OV_ITT_SCOPED_TASK(itt::domains::TemplatePlugin,
"TemplateAsyncInferRequest::PreprocessingAndStartPipeline");
_inferRequest->inferPreprocess();
_inferRequest->startPipeline();
}},
{_waitExecutor, [this] {
IE_PROFILING_AUTO_SCOPE(WaitPipeline)
OV_ITT_SCOPED_TASK(itt::domains::TemplatePlugin,
"TemplateAsyncInferRequest::WaitPipeline");
_inferRequest->waitPipeline();
}},
{cpuTaskExecutor, [this] {
IE_PROFILING_AUTO_SCOPE(Postprocessing)
OV_ITT_SCOPED_TASK(itt::domains::TemplatePlugin,
"TemplateAsyncInferRequest::Postprocessing");
_inferRequest->inferPostprocess();
}}
};
Expand Down
5 changes: 4 additions & 1 deletion docs/template_plugin/src/template_executable_network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "template/template_config.hpp"
#include "template_plugin.hpp"
#include "template_executable_network.hpp"
#include "template_itt.hpp"

using namespace TemplatePlugin;

Expand Down Expand Up @@ -61,7 +62,7 @@ TemplatePlugin::ExecutableNetwork::ExecutableNetwork(std::istream & model,
model.read(dataBlob->buffer(), dataSize);
}

// TODO: implement Import / Export of configuration options
// TODO: implement Import / Export of configuration options and merge with `cfg`
// TODO: implement Import / Export of network precisions, layouts, preprocessing info

auto cnnnetwork = _plugin->GetCore()->ReadNetwork(xmlString, std::move(dataBlob));
Expand Down Expand Up @@ -188,6 +189,8 @@ InferenceEngine::Parameter TemplatePlugin::ExecutableNetwork::GetMetric(const st

// ! [executable_network:export_impl]
void TemplatePlugin::ExecutableNetwork::ExportImpl(std::ostream& modelStream) {
OV_ITT_SCOPED_TASK(itt::domains::TemplatePlugin, "ExecutableNetwork::ExportImpl");

// Note: custom ngraph extensions are not supported
std::map<std::string, ngraph::OpSet> custom_opsets;
std::stringstream xmlFile, binFile;
Expand Down
17 changes: 9 additions & 8 deletions docs/template_plugin/src/template_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <transformations/rt_info/fused_names_attribute.hpp>

#include "template/template_config.hpp"
#include "template_itt.hpp"
#include "template_plugin.hpp"
#include "template_executable_network.hpp"
#include "template_infer_request.hpp"
Expand Down Expand Up @@ -74,6 +75,8 @@ std::shared_ptr<ngraph::Function> TransformNetwork(const std::shared_ptr<const n
// ! [plugin:load_exe_network_impl]
InferenceEngine::ExecutableNetworkInternal::Ptr Plugin::LoadExeNetworkImpl(const InferenceEngine::CNNNetwork & network,
const ConfigMap &config) {
OV_ITT_SCOPED_TASK(itt::domains::TemplatePlugin, "Plugin::LoadExeNetworkImpl");

auto cfg = Configuration{ config, _cfg };
InferenceEngine::InputsDataMap networkInputs = network.getInputsInfo();
InferenceEngine::OutputsDataMap networkOutputs = network.getOutputsInfo();
Expand Down Expand Up @@ -113,22 +116,20 @@ InferenceEngine::ExecutableNetworkInternal::Ptr Plugin::LoadExeNetworkImpl(const

// ! [plugin:import_network_impl]
InferenceEngine::ExecutableNetwork Plugin::ImportNetworkImpl(std::istream& model, const std::map<std::string, std::string>& config) {
// TODO: Import network from stream is not mandatory functionality;
// Can just throw an exception and remove the code below
Configuration exportedCfg;

// some code below which reads exportedCfg from `model` stream
// ..
OV_ITT_SCOPED_TASK(itt::domains::TemplatePlugin, "Plugin::ImportNetworkImpl");

auto cfg = Configuration(config, exportedCfg);
auto exec_network_impl = std::make_shared<ExecutableNetwork>(model, cfg, std::static_pointer_cast<Plugin>(shared_from_this()));
Configuration cfg(config);
auto exec_network_impl = std::make_shared<ExecutableNetwork>(model, cfg,
std::static_pointer_cast<Plugin>(shared_from_this()));

return make_executable_network(exec_network_impl);
}
// ! [plugin:import_network_impl]

// ! [plugin:query_network]
InferenceEngine::QueryNetworkResult Plugin::QueryNetwork(const InferenceEngine::CNNNetwork &network, const ConfigMap& config) const {
OV_ITT_SCOPED_TASK(itt::domains::TemplatePlugin, "Plugin::QueryNetwork");

InferenceEngine::QueryNetworkResult res;
Configuration cfg{config, _cfg, false};

Expand Down
Loading

0 comments on commit fb0e28b

Please sign in to comment.