Merge remote-tracking branch 'upstream/master' into debian-packages
This commit is contained in:
@@ -146,7 +146,6 @@ endfunction()
|
||||
set(_ov_package_prefix_dir "${PACKAGE_PREFIX_DIR}")
|
||||
|
||||
set(THREADING "@THREADING@")
|
||||
# TODO: find system TBB instead of custom one
|
||||
if((THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO") AND NOT TBB_FOUND)
|
||||
set(ov_system_tbb "@ENABLE_SYSTEM_TBB@")
|
||||
if(ov_system_tbb)
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
* Ubuntu 18.04.x long-term support (LTS), 64-bit
|
||||
* Ubuntu 20.04.x long-term support (LTS), 64-bit
|
||||
* Red Hat Enterprise Linux 8.x, 64-bit
|
||||
|
||||
.. note::
|
||||
Since the OpenVINO™ 2022.1 release, CentOS 7.6, 64-bit is not longer supported.
|
||||
|
||||
@@ -66,10 +66,9 @@ This guide provides step-by-step instructions on how to install the Intel® Dist
|
||||
|
||||
By default, the Intel® Distribution of OpenVINO™ is installed in the following directory, referred to as `<INSTALL_DIR>` elsewhere in the documentation:
|
||||
|
||||
* For root or administrator: `/opt/intel/openvino_<version>/`
|
||||
* For regular users: `~/intel/openvino_<version>/`
|
||||
`/opt/intel/openvino_<version>/`
|
||||
|
||||
For simplicity, a symbolic link to the latest installation is also created: `/opt/intel/openvino_2022/` or `~/intel/openvino_2022/`.
|
||||
For simplicity, a symbolic link to the latest installation is also created: `/opt/intel/openvino_2022/`.
|
||||
|
||||
To check **Release Notes** please visit: [Release Notes](https://software.intel.com/en-us/articles/OpenVINO-RelNotes).
|
||||
|
||||
|
||||
@@ -66,13 +66,13 @@
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
/home/<user>/intel/openvino/installer/installer
|
||||
/home/<user>/intel/openvino_installer/installer
|
||||
|
||||
or in a case of administrative installation:
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
/opt/intel/openvino/installer/installer
|
||||
/opt/intel/openvino_installer/installer
|
||||
|
||||
2. Follow the uninstallation wizard instructions.
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
open /opt/intel/openvino/installer/installer.app
|
||||
open /opt/intel/openvino_installer/installer.app
|
||||
|
||||
2. Follow the uninstallation wizard instructions.
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ if(THREADING MATCHES "^(TBB|TBB_AUTO)$" AND TBBROOT MATCHES ${TEMP})
|
||||
|
||||
set(IE_TBB_DIR_INSTALL "3rdparty/tbb/cmake")
|
||||
install(FILES "${TBB}/cmake/TBBConfig.cmake"
|
||||
"${TBB}/cmake/TBBConfigVersion.cmake"
|
||||
"${TBB}/cmake/TBBConfigVersion.cmake"
|
||||
DESTINATION runtime/${IE_TBB_DIR_INSTALL}
|
||||
COMPONENT tbb_dev)
|
||||
install(DIRECTORY "${TBB}/include"
|
||||
|
||||
@@ -37,9 +37,8 @@ bool has_valid_pattern(const ov::Output<ov::Node>& node_out) {
|
||||
// Upper bound of the value
|
||||
auto ub = ngraph::evaluate_upper_bound(node_out);
|
||||
if (!ub) return false;
|
||||
const auto ub_const_node = std::make_shared<ngraph::opset8::Constant>(ub);
|
||||
if (!ub_const_node) return false;
|
||||
|
||||
const auto ub_const_node = std::make_shared<ngraph::opset8::Constant>(ub);
|
||||
const auto & ub_values = ub_const_node->cast_vector<int64_t>();
|
||||
if (lb_values.size() != ub_values.size()) return false;
|
||||
|
||||
|
||||
@@ -153,10 +153,12 @@ ngraph::pass::TransposeReshapeEliminationForMatmul::TransposeReshapeEliminationF
|
||||
// check transpose order before and after matmul
|
||||
auto transpose_before = std::dynamic_pointer_cast<opset1::Transpose>(pattern_value_map.at(transpose_before_pattern).get_node_shared_ptr());
|
||||
auto transpose_after = std::dynamic_pointer_cast<opset1::Transpose>(pattern_value_map.at(transpose_after_pattern).get_node_shared_ptr());
|
||||
if (!transpose_before || !transpose_after) return false;
|
||||
|
||||
auto transpose_before_constant = std::dynamic_pointer_cast<ngraph::opset1::Constant>(transpose_before->get_input_node_shared_ptr(1));
|
||||
auto transpose_after_constant = std::dynamic_pointer_cast<ngraph::opset1::Constant>(transpose_after->get_input_node_shared_ptr(1));
|
||||
if (!transpose_before || !transpose_after || !transpose_before_constant || !transpose_after_constant)
|
||||
return false;
|
||||
if (!transpose_before_constant || !transpose_after_constant) return false;
|
||||
|
||||
auto transpose_before_order = transpose_before_constant->cast_vector<int64_t>();
|
||||
auto transpose_after_order = transpose_after_constant->cast_vector<int64_t>();
|
||||
// need to check that input shape is correctly contracted and output shape is correctly unpacked using transposes
|
||||
|
||||
@@ -210,10 +210,11 @@ ngraph::pass::TransposeFQReduction::TransposeFQReduction() {
|
||||
auto &pattern_to_output = m.get_pattern_value_map();
|
||||
|
||||
auto transpose = pattern_to_output.at(transpose_label).get_node_shared_ptr();
|
||||
if (!transpose) return false;
|
||||
|
||||
auto transpose_order = std::dynamic_pointer_cast<opset6::Constant>(transpose->get_input_node_shared_ptr(1));
|
||||
auto fq = pattern_to_output.at(fq_label).get_node_shared_ptr();
|
||||
if (!transpose || !transpose_order || !fq)
|
||||
return false;
|
||||
if (!transpose_order || !fq) return false;
|
||||
|
||||
ngraph::NodeVector new_ops;
|
||||
|
||||
|
||||
@@ -152,6 +152,8 @@ namespace {
|
||||
gnn_sequence->get_activations_beta(),
|
||||
gnn_sequence->get_clip(),
|
||||
gnn_sequence->get_linear_before_reset());
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
ngraph::ParameterVector body_params;
|
||||
|
||||
@@ -125,11 +125,11 @@ ngraph::pass::SqueezeStridedSlice::SqueezeStridedSlice() {
|
||||
|
||||
matcher_pass_callback callback = [](pattern::Matcher& m) -> bool {
|
||||
auto slice = std::dynamic_pointer_cast<ngraph::opset5::StridedSlice>(m.get_match_root());
|
||||
if (!slice) return false;
|
||||
auto squeeze = slice->get_input_node_shared_ptr(0);
|
||||
const auto& const_axes =
|
||||
std::dynamic_pointer_cast<ngraph::opset5::Constant>(squeeze->get_input_node_shared_ptr(1));
|
||||
if (!const_axes || !slice)
|
||||
return false;
|
||||
if (!const_axes) return false;
|
||||
|
||||
auto begin = std::dynamic_pointer_cast<ngraph::opset5::Constant>(slice->input_value(1).get_node_shared_ptr());
|
||||
auto end = std::dynamic_pointer_cast<ngraph::opset5::Constant>(slice->input_value(2).get_node_shared_ptr());
|
||||
|
||||
@@ -23,8 +23,8 @@ OutputVector translate_conv_3d_op(const NodeContext& node) {
|
||||
auto tf_data_format = node.get_attribute<std::string>("data_format");
|
||||
|
||||
TENSORFLOW_OP_VALIDATION(node,
|
||||
tf_data_format == "NHWC" || tf_data_format == "NCHW",
|
||||
"Conv3D data format is neither NHWC nor NCHW");
|
||||
tf_data_format == "NDHWC" || tf_data_format == "NCDHW",
|
||||
"Conv3D data format is neither NDHWC nor NCDHW");
|
||||
|
||||
bool is_ndhwc = (tf_data_format == "NDHWC");
|
||||
|
||||
|
||||
@@ -79,9 +79,9 @@ Blob::Ptr InferRequest::GetBlob(const std::string& name) {
|
||||
Blob::Ptr blobPtr;
|
||||
INFER_REQ_CALL_STATEMENT(blobPtr = _impl->GetBlob(name);)
|
||||
std::string error = "Internal error: blob with name `" + name + "` is not allocated!";
|
||||
const bool remoteBlobPassed = blobPtr->is<RemoteBlob>();
|
||||
if (blobPtr == nullptr)
|
||||
IE_THROW() << error;
|
||||
const bool remoteBlobPassed = blobPtr->is<RemoteBlob>();
|
||||
if (!remoteBlobPassed && blobPtr->buffer() == nullptr)
|
||||
IE_THROW() << error;
|
||||
return blobPtr;
|
||||
|
||||
@@ -842,6 +842,8 @@ InferenceEngine::IExecutableNetworkInternal::Ptr AutoBatchInferencePlugin::LoadN
|
||||
optBatchSize = std::max(1u, std::min(requests, optimalBatchSize));
|
||||
if (optBatchSize > 2) // batching is usually in-efficient for batch<4 (as batch1 kernels are heavily optimized)
|
||||
metaDevice.batchForDevice = optBatchSize;
|
||||
else
|
||||
metaDevice.batchForDevice = 1;
|
||||
}
|
||||
|
||||
const auto perfConfig = fullConfig.find(PluginConfigParams::KEY_PERF_COUNT);
|
||||
|
||||
@@ -68,8 +68,8 @@ void MKLDNNAdaptivePoolingNode::getSupportedDescriptors() {
|
||||
|
||||
if (getParentEdges().size() != 2)
|
||||
IE_THROW() << errorPrefix << "has incorrect number of input edges: " << getParentEdges().size();
|
||||
if (getChildEdges().size() != (algorithm == AdaptivePoolingMax ? 2 : 1))
|
||||
IE_THROW() << errorPrefix << "has incorrect number of output edges: " << getParentEdges().size();
|
||||
if (getChildEdges().size() < (algorithm == AdaptivePoolingMax ? 2 : 1))
|
||||
IE_THROW() << errorPrefix << "has incorrect number of output edges: " << getChildEdges().size();
|
||||
|
||||
auto srcRank = getInputShapeAtPort(0).getRank();
|
||||
if (!one_of(spatialDimsCount, 1, 2, 3)) {
|
||||
|
||||
@@ -75,6 +75,9 @@ bool MatMulKey::operator==(const MatMulKey &rhs) const {
|
||||
return retVal;
|
||||
}
|
||||
|
||||
bool canBeExecutedInInt8(const Precision& firstInput, const Precision& secondInput) {
|
||||
return one_of(firstInput, Precision::U8, Precision::I8) && secondInput == Precision::I8;
|
||||
}
|
||||
} // namespace
|
||||
|
||||
bool MKLDNNMatMulNode::isSupportedOperation(const std::shared_ptr<const ngraph::Node>& op, std::string& errorMessage) noexcept {
|
||||
@@ -139,6 +142,14 @@ bool MKLDNNMatMulNode::canFuse(const MKLDNNNodePtr& node) const {
|
||||
}
|
||||
}
|
||||
|
||||
// Todo:
|
||||
// Consider the case when Matmul doesn't support execution in int8, but is getting fused with FQ with int8 output.
|
||||
// Then the Matmul will change its output precision to fp32, but the FQ child will still has the int8 input precision.
|
||||
// This information should be propagated! Note that we may need to propagate updated precision to child fused nodes.
|
||||
if (node->getType() == FakeQuantize &&
|
||||
one_of(node->getOriginalOutputPrecisionAtPort(0), Precision::I8, Precision::U8) &&
|
||||
!canBeExecutedInInt8(getOriginalInputPrecisionAtPort(0), getOriginalInputPrecisionAtPort(1)))
|
||||
return false;
|
||||
return canFuseSimpleOperation(node);
|
||||
}
|
||||
|
||||
@@ -233,10 +244,6 @@ void MKLDNNMatMulNode::getSupportedDescriptors() {
|
||||
|
||||
withBiases = getOriginalInputsNumber() == 3;
|
||||
|
||||
auto canBeExecutedInInt8 = [](const Precision firstInput, const Precision secondInput) {
|
||||
return one_of(firstInput, Precision::U8, Precision::I8) && secondInput == Precision::I8;
|
||||
};
|
||||
|
||||
auto firstInPortPrec = getOriginalInputPrecisionAtPort(0);
|
||||
auto secondInPortPrec = getOriginalInputPrecisionAtPort(1);
|
||||
auto outPortPrec = getOriginalOutputPrecisionAtPort(0);
|
||||
|
||||
3
thirdparty/ocl/CMakeLists.txt
vendored
3
thirdparty/ocl/CMakeLists.txt
vendored
@@ -32,6 +32,9 @@ function(get_lib_path OUTPUT_DIR FINAL_OUTPUT_DIR)
|
||||
set("${FINAL_OUTPUT_DIR}" "${OUTPUT_DIR}/${LIB_DIR}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
if(WIN32)
|
||||
set(CMAKE_DEBUG_POSTFIX "")
|
||||
endif()
|
||||
set(OPENCL_ICD_LOADER_HEADERS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cl_headers/" CACHE PATH "Path to OCL includes" FORCE)
|
||||
|
||||
set(OPENCL_HEADERS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cl_headers/" "${CMAKE_CURRENT_SOURCE_DIR}/clhpp_headers/include/" CACHE PATH "Path to OCL (CL and CLHPP) includes" FORCE)
|
||||
|
||||
@@ -11,4 +11,3 @@ urllib3>=1.26.4
|
||||
requests>=2.25.1
|
||||
fastjsonschema~=2.15.1
|
||||
openvino-telemetry>=2022.1.0
|
||||
importlib-metadata; python_version < "3.8" and sys_platform == "win32"
|
||||
@@ -42,16 +42,16 @@ py_modules.append(prefix.replace('/', '.') + '__main__')
|
||||
# Minimal set of dependencies
|
||||
deps_whitelist = ['networkx', 'defusedxml', 'numpy', 'openvino-telemetry']
|
||||
|
||||
# for py37 and less on Windows need importlib-metadata in order to use entry_point *.exe files
|
||||
if sys.platform == 'win32' and sys.version_info[1] < 8:
|
||||
deps_whitelist.append('importlib-metadata')
|
||||
|
||||
deps = []
|
||||
with open('requirements.txt', 'rt') as req_file:
|
||||
for line in req_file.read().split('\n'):
|
||||
if line.startswith(tuple(deps_whitelist)):
|
||||
deps.append(line)
|
||||
|
||||
# for py37 and less on Windows need importlib-metadata in order to use entry_point *.exe files
|
||||
if sys.platform == 'win32' and sys.version_info[1] < 8:
|
||||
deps.append('importlib-metadata')
|
||||
|
||||
|
||||
class InstallCmd(install):
|
||||
def run(self):
|
||||
|
||||
@@ -214,7 +214,9 @@ class FastBiasCorrection(Algorithm):
|
||||
calculate_input_shape[input_node.fullname] = {'shape_node': lambda x: x.shape}
|
||||
calculate_metrics = self._engine.calculate_metrics
|
||||
self._engine.calculate_metrics = False
|
||||
self._engine.inference_for_shape = True
|
||||
_, inputs_shape = self._engine.predict(calculate_input_shape, sampler)
|
||||
self._engine.inference_for_shape = False
|
||||
self._engine.calculate_metrics = calculate_metrics
|
||||
for node_name, shape_node in inputs_shape.items():
|
||||
inputs_shape[node_name] = shape_node['shape_node'][0]
|
||||
|
||||
@@ -24,6 +24,7 @@ class Engine(ABC):
|
||||
self._statistic_graph_builder = StatisticGraphBuilder()
|
||||
self._stat_requests_number = self.config.get('stat_requests_number', None)
|
||||
self._eval_requests_number = self.config.get('eval_requests_number', None)
|
||||
self.inference_for_shape = False
|
||||
self.calculate_metrics = True
|
||||
|
||||
def set_model(self, model):
|
||||
|
||||
@@ -248,7 +248,7 @@ class ACEngine(Engine):
|
||||
if not stats_layout:
|
||||
return
|
||||
dataset_index = kwargs['dataset_indices'][0]
|
||||
append_stats(self._accumulated_layer_stats, stats_layout, value, dataset_index)
|
||||
append_stats(self._accumulated_layer_stats, stats_layout, value, dataset_index, self.inference_for_shape)
|
||||
|
||||
@staticmethod
|
||||
def _set_requests_number(params, requests_number):
|
||||
|
||||
@@ -200,7 +200,7 @@ class IEEngine(Engine):
|
||||
:param annotations: list of annotations [(img_id, annotation)]
|
||||
"""
|
||||
dataset_index = annotations[0][0] if annotations is not None and annotations[0][0] else 0
|
||||
append_stats(self._accumulated_layer_stats, stats_layout, outputs, dataset_index)
|
||||
append_stats(self._accumulated_layer_stats, stats_layout, outputs, dataset_index, self.inference_for_shape)
|
||||
|
||||
def _update_metrics(self, output, annotations, need_metrics_per_sample=False):
|
||||
""" Updates metrics.
|
||||
|
||||
@@ -20,4 +20,4 @@ class SimplifiedEngine(IEEngine):
|
||||
batch_annotations, batch_meta, need_metrics_per_sample):
|
||||
# Collect statistics
|
||||
if stats_layout:
|
||||
append_stats(self._accumulated_layer_stats, stats_layout, predictions, 0)
|
||||
append_stats(self._accumulated_layer_stats, stats_layout, predictions, 0, self.inference_for_shape)
|
||||
|
||||
@@ -13,10 +13,10 @@ from ..utils.utils import convert_output_key
|
||||
logger = get_logger(__name__)
|
||||
|
||||
|
||||
def append_stats(accumulated_layer_stats, stats_layout, value, dataset_index):
|
||||
def append_stats(accumulated_layer_stats, stats_layout, value, dataset_index, inference_for_shape):
|
||||
inplace_stats_mapping = get_inplace_stats_mapping(stats_layout)
|
||||
if isinstance(value, list):
|
||||
value = parse_sequential_stats(value, stats_layout)
|
||||
value = parse_sequential_stats(value, stats_layout, inference_for_shape)
|
||||
else:
|
||||
value = process_raw_output(value)
|
||||
for layer, stats in stats_layout.items():
|
||||
@@ -29,7 +29,7 @@ def append_stats(accumulated_layer_stats, stats_layout, value, dataset_index):
|
||||
(dataset_index, compute_statistic(stat_fn, value, layer_stat_name)))
|
||||
|
||||
|
||||
def parse_sequential_stats(value_sequential, stats_layout):
|
||||
def parse_sequential_stats(value_sequential, stats_layout, inference_for_shape):
|
||||
stat_names_by_layer, old_names_mapping = get_per_layer_stat_mapping(stats_layout)
|
||||
activation_seq = defaultdict(lambda: [])
|
||||
for value in value_sequential:
|
||||
@@ -40,6 +40,9 @@ def parse_sequential_stats(value_sequential, stats_layout):
|
||||
|
||||
for layer, act_seq in activation_seq.items():
|
||||
seq_len = len(act_seq[0].shape)
|
||||
if inference_for_shape:
|
||||
activation_seq[layer] = act_seq[0]
|
||||
continue
|
||||
if not isinstance(stat_names_by_layer[layer], Statistic) or \
|
||||
not stat_names_by_layer[layer].kwargs.get('inplace_statistics', False):
|
||||
axis = 1 if seq_len == 2 else 2
|
||||
@@ -103,7 +106,8 @@ def get_sequential_activations(activations, layer, activation_seq, stats_layout,
|
||||
elif old_names_mapping.get(layer, None) in stats_layout and hasattr(stat_names_by_layer[layer], 'kwargs') \
|
||||
and not stat_names_by_layer[layer].kwargs.get('inplace_statistics', False):
|
||||
activation_seq[layer].append(activations)
|
||||
elif old_names_mapping.get(layer, None) in stats_layout and callable(stat_names_by_layer[layer]):
|
||||
elif old_names_mapping.get(layer, None) in stats_layout and (callable(stat_names_by_layer[layer]) \
|
||||
or callable(stats_layout[layer][stat_names_by_layer[layer]])):
|
||||
activation_seq[layer].append(activations)
|
||||
|
||||
|
||||
|
||||
@@ -44,7 +44,8 @@ def run_append_stats_test(engine):
|
||||
fc_layer_mock = create_ng_mock(['fc_layer'])
|
||||
value = {conv_layer_mock: sample_tensor, fc_layer_mock: sample_tensor}
|
||||
ref_value = {'conv_layer': sample_tensor, 'fc_layer': sample_tensor}
|
||||
append_stats(engine._accumulated_layer_stats, stats_layout, value, dataset_index=0)
|
||||
append_stats(engine._accumulated_layer_stats, stats_layout, value,
|
||||
dataset_index=0, inference_for_shape=False)
|
||||
for layer, accumulated_value in engine._accumulated_layer_stats.items():
|
||||
assert np.array_equal(accumulated_value[stat_name][0][1], ref_value[layer])
|
||||
|
||||
@@ -57,7 +58,8 @@ def run_append_stats_test(engine):
|
||||
{'conv_layer': sample_tensor, 'fc_layer': sample_tensor},
|
||||
{'conv_layer': sample_tensor, 'fc_layer': sample_tensor},
|
||||
]
|
||||
append_stats(engine._accumulated_layer_stats, stats_layout, value, dataset_index=0)
|
||||
append_stats(engine._accumulated_layer_stats, stats_layout, value,
|
||||
dataset_index=0, inference_for_shape=False)
|
||||
for layer, accumulated_value in engine._accumulated_layer_stats.items():
|
||||
assert np.array_equal(
|
||||
accumulated_value[stat_name][0][1][:, 0], ref_value[0][layer]
|
||||
|
||||
@@ -51,10 +51,9 @@ TEST_MODELS = [
|
||||
# {'drop_type': 'relative', 'max_iter_num': 1, 'accuracy_drop': 0.005, 'metrics': [
|
||||
# {'name': 'accuracy@top1', 'baseline_value': 0.431}]}, 'GNA'),
|
||||
|
||||
#TODO: Enable after the problem with the shapes will be fixed
|
||||
# ('mtcnn', 'caffe', 'DefaultQuantization', 'performance', 1, {'recall': 0.76, 'map': 0.6844}, {}, 'CPU'),
|
||||
('mtcnn', 'caffe', 'DefaultQuantization', 'performance', 1, {'recall': 0.76, 'map': 0.6844}, {}, 'CPU'),
|
||||
|
||||
('mtcnn', 'caffe', 'DefaultQuantization', 'performance', 2, {'recall': 0.8, 'map': 0.7445},
|
||||
('mtcnn', 'caffe', 'DefaultQuantization', 'performance', 2, {'recall': 0.76, 'map': 0.6638},
|
||||
{'use_fast_bias': False}, 'CPU')
|
||||
]
|
||||
CASCADE_MAP = Dict({
|
||||
|
||||
Reference in New Issue
Block a user