From bb039adef8ec0477d6d4025aff12a31c9912a73e Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Tue, 26 May 2020 17:17:36 +0300 Subject: [PATCH] Fixed compilation with clang-10 + xcode (#521) --- CMakeLists.txt | 9 ++++- cmake/developer_package.cmake | 12 +++--- .../src/inference_engine/generic_ie.cpp | 2 +- .../src/inference_engine/ie_layouts.cpp | 6 +-- .../src/legacy_api/CMakeLists.txt | 9 ++++- .../src/cnn_network_int8_normalizer.cpp | 1 - .../src/convert_function_to_cnn_network.cpp | 6 --- .../src/legacy_api/src/graph_transformer.cpp | 4 +- .../src/ie_cnn_layer_builder_ngraph.h | 2 + .../src/legacy_api/src/ie_deprecated.cpp | 2 +- .../legacy_api/src/ie_layer_validators.cpp | 4 ++ .../src/legacy_api/src/ie_layers_internal.cpp | 2 +- .../src/legacy_api/src/net_pass.cpp | 27 -------------- .../built-in/ie_unsqueeze_shape_infer.hpp | 1 - .../const_infer/ie_range_const_infer.hpp | 1 - .../ie_strided_slice_const_infer.hpp | 4 +- .../src/mkldnn_plugin/mean_image.cpp | 2 - .../src/mkldnn_plugin/mkldnn_graph_dumper.cpp | 1 - .../src/mkldnn_plugin/mkldnn_memory.cpp | 1 - .../src/mkldnn_plugin/mkldnn_node.cpp | 8 ++-- .../mkldnn_plugin/nodes/mkldnn_conv_node.cpp | 7 ++-- .../mkldnn_plugin/nodes/mkldnn_conv_node.h | 1 - .../nodes/mkldnn_deconv_node.cpp | 4 -- .../nodes/mkldnn_fullyconnected_node.cpp | 1 - .../mkldnn_plugin/nodes/mkldnn_mvn_node.cpp | 1 - .../nodes/mkldnn_reshape_node.cpp | 1 - .../nodes/mkldnn_tensoriterator_node.cpp | 6 --- .../nodes/roifeatureextractor_onnx.cpp | 9 ----- .../src/plugin_api/ie_metric_helpers.hpp | 2 +- .../src/preprocessing/CMakeLists.txt | 10 +++++ .../include/ngraph_ops/deconvolution_ie.hpp | 2 - .../convert_one_hot_to_one_hot_ie.hpp | 2 +- .../transformations/utils/annotations.hpp | 6 +-- .../src/ngraph_ops/deconvolution_ie.cpp | 37 +++---------------- .../src/ngraph_ops/fully_connected.cpp | 3 +- .../transformations/src/ngraph_ops/nms_ie.cpp | 2 +- .../src/ngraph_ops/onehot_ie.cpp | 2 +- .../transformations/src/ngraph_ops/power.cpp | 2 +- .../convert_lrn_to_lrn_ie.cpp | 4 +- .../convert_matmul_to_fc_or_gemm.cpp | 4 +- .../common_layers_params.cpp | 2 - .../xml_net_builder/ir_net.hpp | 14 +++---- .../unit_test_utils/CMakeLists.txt | 1 - 43 files changed, 80 insertions(+), 147 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4322f019233..848c2b4cc79 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,8 +9,13 @@ cmake_policy(SET CMP0054 NEW) # See https://blog.kitware.com/cmake-3-13-0-available-for-download/ if (APPLE) - # due to https://cmake.org/cmake/help/v3.12/policy/CMP0068.html - cmake_minimum_required(VERSION 3.9 FATAL_ERROR) + 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() diff --git a/cmake/developer_package.cmake b/cmake/developer_package.cmake index e0027fdcc53..5e022244b13 100644 --- a/cmake/developer_package.cmake +++ b/cmake/developer_package.cmake @@ -172,8 +172,8 @@ endif() set(CMAKE_DEBUG_POSTFIX ${IE_DEBUG_POSTFIX}) set(CMAKE_RELEASE_POSTFIX ${IE_RELEASE_POSTFIX}) -if (WIN32) - # Support CMake multiconfiguration for Visual Studio build +if (WIN32 OR CMAKE_GENERATOR STREQUAL "Xcode") + # Support CMake multiconfiguration for Visual Studio or Xcode build set(IE_BUILD_POSTFIX $<$:${IE_DEBUG_POSTFIX}>$<$:${IE_RELEASE_POSTFIX}>) else () if (${CMAKE_BUILD_TYPE} STREQUAL "Debug" ) @@ -187,10 +187,6 @@ message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") add_definitions(-DIE_BUILD_POSTFIX=\"${IE_BUILD_POSTFIX}\") if(NOT UNIX) - if (WIN32) - # set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT") - # set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd") - endif() 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}) @@ -205,6 +201,10 @@ else() 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() diff --git a/inference-engine/src/inference_engine/generic_ie.cpp b/inference-engine/src/inference_engine/generic_ie.cpp index 197a0966490..bf9dcea0b27 100644 --- a/inference-engine/src/inference_engine/generic_ie.cpp +++ b/inference-engine/src/inference_engine/generic_ie.cpp @@ -65,7 +65,7 @@ ngraph::op::GenericIE::GenericIE(const ngraph::NodeVector& inputs, ngraph::op::GenericIE::GenericIE(const ngraph::OutputVector& inputs, const std::map& params, const std::string type, const std::vector& outputs) - : Op(inputs), params(params), type(type), outputs(outputs), initialized(0) { + : Op(inputs), params(params), outputs(outputs), type(type), initialized(0) { constructor_validate_and_infer_types(); } diff --git a/inference-engine/src/inference_engine/ie_layouts.cpp b/inference-engine/src/inference_engine/ie_layouts.cpp index b0d88958a62..1a2f9f66da0 100644 --- a/inference-engine/src/inference_engine/ie_layouts.cpp +++ b/inference-engine/src/inference_engine/ie_layouts.cpp @@ -10,17 +10,17 @@ using namespace InferenceEngine; TensorDesc::TensorDesc(const Precision& precision, SizeVector dims, Layout layout) - : blockingDesc(dims, layout), precision(precision) { + : precision(precision), blockingDesc(dims, layout) { this->dims = dims; this->layout = layout; } -TensorDesc::TensorDesc(const Precision& precision, Layout layout): blockingDesc(), precision(precision) { +TensorDesc::TensorDesc(const Precision& precision, Layout layout): precision(precision), blockingDesc() { this->layout = layout; } TensorDesc::TensorDesc(const Precision& precision, SizeVector dims, const BlockingDesc& blockDesc) - : dims(dims), blockingDesc(blockDesc), precision(precision) { + : dims(dims), precision(precision), blockingDesc(blockDesc) { if (dims.size() == 0 || blockingDesc.getBlockDims().size() == 0) { layout = Layout::SCALAR; return; diff --git a/inference-engine/src/legacy_api/CMakeLists.txt b/inference-engine/src/legacy_api/CMakeLists.txt index 17a6c46294d..85524310b15 100644 --- a/inference-engine/src/legacy_api/CMakeLists.txt +++ b/inference-engine/src/legacy_api/CMakeLists.txt @@ -38,7 +38,14 @@ target_include_directories(${TARGET_NAME}_obj PRIVATE ${PUBLIC_HEADERS_DIR} ${CM # Create shared library +file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp) + add_library(${TARGET_NAME} SHARED + # according to https://cmake.org/cmake/help/latest/command/add_library.html#id4 + # Some native build systems (such as Xcode) may not like targets that have only + # object files, so consider adding at least one real source file to any target that + # references $. + ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp $ $) @@ -46,7 +53,7 @@ set_ie_threading_interface_for(${TARGET_NAME}) target_link_libraries(${TARGET_NAME} PRIVATE ${NGRAPH_LIBRARIES} inference_engine_transformations pugixml) -add_cpplint_target(${TARGET_NAME}_cpplint FOR_TARGETS ${TARGET_NAME}) +add_cpplint_target(${TARGET_NAME}_cpplint FOR_TARGETS ${TARGET_NAME} EXCLUDE_PATTERNS ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp) # export targets diff --git a/inference-engine/src/legacy_api/src/cnn_network_int8_normalizer.cpp b/inference-engine/src/legacy_api/src/cnn_network_int8_normalizer.cpp index 04830f389d0..b057db8c567 100644 --- a/inference-engine/src/legacy_api/src/cnn_network_int8_normalizer.cpp +++ b/inference-engine/src/legacy_api/src/cnn_network_int8_normalizer.cpp @@ -935,7 +935,6 @@ void CNNNetworkInt8Normalizer::QuantizeConvolutionOrFullyConnected(CNNLayer::Ptr if (weights) { const float* weight = static_cast(weights->buffer()); - WeightableLayer* pConv = dynamic_cast(target_layer.get()); ConvolutionLayer* pConv1 = dynamic_cast(target_layer.get()); if (pConv1 != nullptr && pConv1->_group == 0) { diff --git a/inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp b/inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp index 52006abc4ad..5b2b3015391 100644 --- a/inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp +++ b/inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp @@ -447,12 +447,6 @@ InferenceEngine::details::CNNLayerCreator::CNNLayerCreator(const std::shared_ptr } CNNLayerPtr InferenceEngine::details::CNNLayerCreator::create() { - auto one_from = [](const std::string& desc, const std::vector& descs) -> bool { - for (const auto& d : descs) { - if (details::CaselessEq()(d, desc)) return true; - } - return false; - }; LayerParams attrs = {node->get_friendly_name(), node->description(), details::convertPrecision(node->get_output_element_type(0))}; if (creators.find(node->description()) != creators.end()) diff --git a/inference-engine/src/legacy_api/src/graph_transformer.cpp b/inference-engine/src/legacy_api/src/graph_transformer.cpp index 180c63c0eda..d91b922ad95 100644 --- a/inference-engine/src/legacy_api/src/graph_transformer.cpp +++ b/inference-engine/src/legacy_api/src/graph_transformer.cpp @@ -67,7 +67,7 @@ static std::vector get_outputs(details::CNNNetworkImpl* _network) { } ConstTransformer::ConstTransformer(details::CNNNetworkImpl* _network) - : inputs(get_inputs(_network)), outputs(get_outputs(_network)), network(_network) { + : network(_network), inputs(get_inputs(_network)), outputs(get_outputs(_network)) { if (!_network) THROW_IE_EXCEPTION << "[ERROR]: Failed to init ConstTransformer with null pointer of network"; } @@ -86,7 +86,7 @@ ConstTransformer::ConstTransformer(ICNNNetwork* _network) { } ConstTransformer::ConstTransformer(std::vector &_inputs, std::vector &_outputs) - : inputs(_inputs), outputs(_outputs), network(nullptr) { + : network(nullptr), inputs(_inputs), outputs(_outputs) { if (inputs.empty() || outputs.empty()) THROW_IE_EXCEPTION << "[ERROR]: Failed to init ConstTransformer with empty list of inputs or outputs"; } diff --git a/inference-engine/src/legacy_api/src/ie_cnn_layer_builder_ngraph.h b/inference-engine/src/legacy_api/src/ie_cnn_layer_builder_ngraph.h index 43f69180a25..4b45eda00e8 100644 --- a/inference-engine/src/legacy_api/src/ie_cnn_layer_builder_ngraph.h +++ b/inference-engine/src/legacy_api/src/ie_cnn_layer_builder_ngraph.h @@ -28,6 +28,7 @@ class INodeConverter { public: virtual CNNLayer::Ptr createLayer(const std::shared_ptr& layer) const = 0; virtual bool canCreate(const std::shared_ptr& node) const = 0; + virtual ~INodeConverter() = default; }; template @@ -55,6 +56,7 @@ template class NodeConverter : public INodeConverter { public: NodeConverter() = default; + ~NodeConverter() override = default; CNNLayer::Ptr createLayer(const std::shared_ptr& layer) const override; diff --git a/inference-engine/src/legacy_api/src/ie_deprecated.cpp b/inference-engine/src/legacy_api/src/ie_deprecated.cpp index dc886c9038f..b3e1367673b 100644 --- a/inference-engine/src/legacy_api/src/ie_deprecated.cpp +++ b/inference-engine/src/legacy_api/src/ie_deprecated.cpp @@ -46,7 +46,7 @@ void CNNNetwork::AddExtension(InferenceEngine::IShapeInferExtensionPtr extension } CNNLayer::CNNLayer(const LayerParams& prms) - : name(prms.name), type(prms.type), precision(prms.precision), userValue({0}), node(nullptr) {} + : node(nullptr), name(prms.name), type(prms.type), precision(prms.precision), userValue({0}) {} CNNLayer::CNNLayer(const CNNLayer& other) : node(other.node), name(other.name), type(other.type), precision(other.precision), diff --git a/inference-engine/src/legacy_api/src/ie_layer_validators.cpp b/inference-engine/src/legacy_api/src/ie_layer_validators.cpp index a2030f92f6e..aa9938d4851 100644 --- a/inference-engine/src/legacy_api/src/ie_layer_validators.cpp +++ b/inference-engine/src/legacy_api/src/ie_layer_validators.cpp @@ -19,6 +19,10 @@ #include "ie_layers.h" #include "xml_parse_utils.h" +#ifdef __clang__ +#pragma clang diagnostic ignored "-Wunused-variable" +#endif + namespace InferenceEngine { using namespace details; diff --git a/inference-engine/src/legacy_api/src/ie_layers_internal.cpp b/inference-engine/src/legacy_api/src/ie_layers_internal.cpp index 51b3c5d5ef4..a15c38b61d9 100644 --- a/inference-engine/src/legacy_api/src/ie_layers_internal.cpp +++ b/inference-engine/src/legacy_api/src/ie_layers_internal.cpp @@ -124,7 +124,7 @@ Paddings getPaddingsImpl(const CNNLayer& layer) { int getNumIteration(const TensorIterator& tensorIterator) { using PortMap = TensorIterator::PortMap; const auto isIterable = [](const PortMap& rule) { return rule.axis != -1; }; - const auto getNumIterations = [&tensorIterator](const PortMap& rule, const DataPtr& iterableData) -> int { + const auto getNumIterations = [](const PortMap& rule, const DataPtr& iterableData) -> int { if (iterableData == nullptr) { THROW_IE_EXCEPTION << ": Iteration over an invalid data object (null pointer dereference)"; } diff --git a/inference-engine/src/legacy_api/src/net_pass.cpp b/inference-engine/src/legacy_api/src/net_pass.cpp index 88ef9df2ef3..534467ddc3d 100644 --- a/inference-engine/src/legacy_api/src/net_pass.cpp +++ b/inference-engine/src/legacy_api/src/net_pass.cpp @@ -304,19 +304,6 @@ void RemoveLayer(CNNLayerPtr& layer) { /**** Converter Passes ************************************/ /************************************************************/ -static RNNSequenceLayer::CellType cell_type_from_name(std::string& layer_type) { - RNNSequenceLayer::CellType res; - if (layer_type == "LSTMCell") - res = RNNSequenceLayer::LSTM; - else if (layer_type == "GRUCell") - res = RNNSequenceLayer::GRU; - else if (layer_type == "RNNCell") - res = RNNSequenceLayer::RNN; - else - THROW_IE_EXCEPTION << "Unknown Cell type (" << layer_type << "). Expected LSTMCell|GRUCell|RNNCell"; - return res; -} - static std::string cell_name(RNNSequenceLayer::CellType type) { std::string res; switch (type) { @@ -777,20 +764,6 @@ static void _link_with_clip(CNNLayerPtr src, CNNLayerPtr dst, const float clip_v _link(clip, dst, 0, dst_port); } } - -static Blob::Ptr make_partial_copy(Blob::Ptr src, size_t off, size_t size) { - auto res = make_plain_blob(src->getTensorDesc().getPrecision(), {size}); - res->allocate(); - - size_t elem_size = src->getTensorDesc().getPrecision().size(); - auto src_ptr = src->buffer().as(); - auto dst_ptr = res->buffer().as(); - - ie_memcpy(dst_ptr, res->byteSize(), src_ptr + off * elem_size, size * elem_size); - - return res; -} - static Blob::Ptr wrap_as_tensor(Blob::Ptr src, SizeVector dims) { auto res = make_blob_with_precision( TensorDesc {src->getTensorDesc().getPrecision(), dims, TensorDesc::getLayoutByDims(dims)}, src->buffer()); diff --git a/inference-engine/src/legacy_api/src/shape_infer/built-in/ie_unsqueeze_shape_infer.hpp b/inference-engine/src/legacy_api/src/shape_infer/built-in/ie_unsqueeze_shape_infer.hpp index 5fd20ca0855..8b522f5f467 100644 --- a/inference-engine/src/legacy_api/src/shape_infer/built-in/ie_unsqueeze_shape_infer.hpp +++ b/inference-engine/src/legacy_api/src/shape_infer/built-in/ie_unsqueeze_shape_infer.hpp @@ -43,7 +43,6 @@ public: SizeVector outShape; if (idx_dims.size() > 1) THROW_IE_EXCEPTION << " Index vector should be 1 dimension"; - size_t max = data_dims.size(); switch (inBlobs[UNSQUEEZE_INDEXES]->getTensorDesc().getPrecision()) { case Precision::FP32: { procIndices(inBlobs, UNSQUEEZE_INDEXES, data_dims, outShape, idx_dims); diff --git a/inference-engine/src/legacy_api/src/shape_infer/const_infer/ie_range_const_infer.hpp b/inference-engine/src/legacy_api/src/shape_infer/const_infer/ie_range_const_infer.hpp index 7fc1b949d2e..b68ca8b97d6 100644 --- a/inference-engine/src/legacy_api/src/shape_infer/const_infer/ie_range_const_infer.hpp +++ b/inference-engine/src/legacy_api/src/shape_infer/const_infer/ie_range_const_infer.hpp @@ -78,7 +78,6 @@ public: << "and only FP32 and I32 are supported!"; } - StatusCode retcode = OK; switch (outData[0]->getTensorDesc().getPrecision()) { case Precision::FP32: { range((inData[RANGE_START]->cbuffer().as() + diff --git a/inference-engine/src/legacy_api/src/shape_infer/const_infer/ie_strided_slice_const_infer.hpp b/inference-engine/src/legacy_api/src/shape_infer/const_infer/ie_strided_slice_const_infer.hpp index 21d60fd0a82..3bab18f6338 100644 --- a/inference-engine/src/legacy_api/src/shape_infer/const_infer/ie_strided_slice_const_infer.hpp +++ b/inference-engine/src/legacy_api/src/shape_infer/const_infer/ie_strided_slice_const_infer.hpp @@ -316,7 +316,7 @@ private: size_t work_amount_dst = dstStrides[0] * dst_dims[0] / dst_dims[dims_size_1]; parallel_nt(0, [&](const int ithr, const int nthr) { - size_t i, start = 0, end = 0; + size_t start = 0, end = 0; SizeVector counters(dims_size_1, 0); splitter(work_amount_dst, nthr, ithr, start, end); int src_idx = begin_dms[dims_size_1]; @@ -352,7 +352,7 @@ private: size_t work_amount_dst = dstStrides[0] * dst_dims[0]; parallel_nt(0, [&](const int ithr, const int nthr) { - size_t i, start = 0, end = 0; + size_t start = 0, end = 0; SizeVector counters(dims_size, 0); splitter(work_amount_dst, nthr, ithr, start, end); int src_idx = 0; diff --git a/inference-engine/src/mkldnn_plugin/mean_image.cpp b/inference-engine/src/mkldnn_plugin/mean_image.cpp index 0dd65353198..48f816f1f4f 100644 --- a/inference-engine/src/mkldnn_plugin/mean_image.cpp +++ b/inference-engine/src/mkldnn_plugin/mean_image.cpp @@ -24,8 +24,6 @@ void MeanImage::Load(const MKLDNNDims& inputDims, InputInfo::Ptr inputInfo) { THROW_IE_EXCEPTION << "channels mismatch between mean and input"; } - ResponseDesc resp; - switch (pp.getMeanVariant()) { case MEAN_VALUE: { // mean image common value per channel (1x1xC) diff --git a/inference-engine/src/mkldnn_plugin/mkldnn_graph_dumper.cpp b/inference-engine/src/mkldnn_plugin/mkldnn_graph_dumper.cpp index dcae1759820..1678ee557a1 100644 --- a/inference-engine/src/mkldnn_plugin/mkldnn_graph_dumper.cpp +++ b/inference-engine/src/mkldnn_plugin/mkldnn_graph_dumper.cpp @@ -52,7 +52,6 @@ std::shared_ptr dump_graph_as_ie_net(const MKLDNNGraph &graph) { for (int i = 0; i < ch_edges.size(); i++) { auto edge = node->getChildEdgeAt(i); - int out_port = edge->getInputNum(); int in_port = edge->getOutputNum(); auto ch_node = edge->getChild(); auto ch = node2layer[ch_node]; diff --git a/inference-engine/src/mkldnn_plugin/mkldnn_memory.cpp b/inference-engine/src/mkldnn_plugin/mkldnn_memory.cpp index 1ea2ecd2c0f..971b1c7eab8 100644 --- a/inference-engine/src/mkldnn_plugin/mkldnn_memory.cpp +++ b/inference-engine/src/mkldnn_plugin/mkldnn_memory.cpp @@ -53,7 +53,6 @@ void MKLDNNMemory::Create(memory::dims dims, memory::data_type data_type, memory void MKLDNNMemory::Create(const mkldnn::memory::desc& desc, const void *data, bool pads_zeroing) { auto primitive_desc = memory::primitive_desc(desc, eng); - uint8_t itemSize = MKLDNNExtensionUtils::sizeOfDataType(mkldnn::memory::data_type(desc.data.data_type)); if (data == nullptr) { prim.reset(new memory(primitive_desc)); diff --git a/inference-engine/src/mkldnn_plugin/mkldnn_node.cpp b/inference-engine/src/mkldnn_plugin/mkldnn_node.cpp index e5afa640662..d0ceeb6edb1 100644 --- a/inference-engine/src/mkldnn_plugin/mkldnn_node.cpp +++ b/inference-engine/src/mkldnn_plugin/mkldnn_node.cpp @@ -139,9 +139,9 @@ void MKLDNNNode::AddNode(const std::string& name, CreatorByLayerFunction factory MKLDNNNode::MKLDNNNode(const InferenceEngine::CNNLayerPtr& layer, const mkldnn::engine& eng, MKLDNNWeightsSharing::Ptr &w_cache) - : cnnLayer(layer), name(layer->name), typeStr(layer->type), type(TypeFromName(layer->type)), engine(eng), - selectedPrimitiveDescriptorIndex(-1), permanent(false), temporary(false), constant(ConstantType::Unknown), - profilingTask(name), weightCache(w_cache) { + : selectedPrimitiveDescriptorIndex(-1), permanent(false), temporary(false), constant(ConstantType::Unknown), + weightCache(w_cache), cnnLayer(layer), engine(eng), name(layer->name), typeStr(layer->type), + type(TypeFromName(layer->type)), profilingTask(name) { if (!layer->outData.empty()) { for (const auto& outData : layer->outData) { outDims.emplace_back(outData->getDims()); @@ -1128,4 +1128,4 @@ Layout MKLDNNNode::getWeightsLayoutByDims(SizeVector dims, bool isGrouped) { void MKLDNNNode::appendPostOps(mkldnn::post_ops& ops) { THROW_IE_EXCEPTION << "Fusing of " << this->getType() << " operation is not implemented"; -} \ No newline at end of file +} diff --git a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_conv_node.cpp b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_conv_node.cpp index e30e8842134..606e59914de 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_conv_node.cpp +++ b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_conv_node.cpp @@ -24,9 +24,9 @@ using namespace MKLDNNPlugin; using namespace InferenceEngine; MKLDNNConvolutionNode::MKLDNNConvolutionNode(const InferenceEngine::CNNLayerPtr& layer, const mkldnn::engine& eng, MKLDNNWeightsSharing::Ptr &cache) - : MKLDNNNode(layer, eng, cache), withBiases(false), withSum(false), dw_conv_iw(0), dw_conv_ih(0), - dw_conv_oc(0), dw_conv_in_dt(memory::data_type::data_undef), isDW(false), isMerged(false), withActivation(false), - isGrouped(false), baseInputsNumber(1), eltwisePrecision(Precision::FP32), withDWConv(false), groupNum(1lu) { + : MKLDNNNode(layer, eng, cache), withBiases(false), withSum(false), withDWConv(false), isDW(false), isMerged(false), + isGrouped(false), dw_conv_oc(0), dw_conv_ih(0), dw_conv_iw(0), dw_conv_in_dt(memory::data_type::data_undef), + groupNum(1lu), baseInputsNumber(1), eltwisePrecision(Precision::FP32) { internalBlobDesc.emplace_back([&](primitive_desc_iterator &primitive_desc_it, size_t idx) -> MKLDNNMemoryDesc { return MKLDNNMemoryDesc(primitive_desc_it.weights_primitive_desc(0).desc()); }); @@ -736,7 +736,6 @@ void MKLDNNConvolutionNode::addZeroPoints(mkldnn::primitive_attr& attr) const { } void MKLDNNConvolutionNode::addScaleToPrimitiveAttr(mkldnn::primitive_attr attr) const { - bool scaled = false; if (wScale != nullptr) { float* wScaleData = static_cast(wScale->buffer()); diff --git a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_conv_node.h b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_conv_node.h index f0a41e9f0f4..ecd2193c17e 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_conv_node.h +++ b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_conv_node.h @@ -61,7 +61,6 @@ private: void addZeroPoints(mkldnn::primitive_attr& attr) const; bool withBiases; - bool withActivation; bool withSum; bool withDWConv; bool isDW; diff --git a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_deconv_node.cpp b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_deconv_node.cpp index a7c3fdc3046..fea58144580 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_deconv_node.cpp +++ b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_deconv_node.cpp @@ -177,10 +177,6 @@ void MKLDNNDeconvolutionNode::createDescriptor(const std::vector &outputDesc) { MKLDNNMemoryDesc in_candidate(inputDesc[0]); MKLDNNMemoryDesc out_candidate(outputDesc[0]); - auto in_fmt = in_candidate.getFormat(); - auto out_fmt = out_candidate.getFormat(); - int O_IND = withGroups ? 1 : 0; - int I_IND = withGroups ? 2 : 1; // grouping and autoblicking is not compatible if ((withGroups && !isDW) && (in_candidate.blocksExtended() || out_candidate.blocksExtended())) diff --git a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_fullyconnected_node.cpp b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_fullyconnected_node.cpp index b43042cf0e0..2b5dfbaf908 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_fullyconnected_node.cpp +++ b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_fullyconnected_node.cpp @@ -325,7 +325,6 @@ const std::vector& MKLDNNFullyConnectedNode::getPrimitivesPriori std::shared_ptr MKLDNNFullyConnectedNode::initPrimitiveAttr() { auto attr = std::make_shared(mkldnn::primitive_attr()); - bool scaled = false; if (wScale != nullptr) { float* wScaleData = static_cast(wScale->buffer()); diff --git a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_mvn_node.cpp b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_mvn_node.cpp index 029b0c53684..e3554a29b99 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_mvn_node.cpp +++ b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_mvn_node.cpp @@ -737,7 +737,6 @@ void MKLDNNMVNNode::mvn_pln(const float* src_data, float* dst_data, const SizeVe blk_size = 4; } - size_t dims_size = dims.size(); size_t N = 0; size_t C = 0; size_t D = 0; size_t H = 0; size_t W = 0; std::tie(N, C, D, H, W) = get5dShapes(dims); diff --git a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_reshape_node.cpp b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_reshape_node.cpp index 7dda68cd0f3..03815d5d51f 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_reshape_node.cpp +++ b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_reshape_node.cpp @@ -36,7 +36,6 @@ void MKLDNNReshapeNode::initSupportedPrimitiveDescriptors() { if (inputDataType != outputDataType) inputDataType = outputDataType; - auto& inDims = getParentEdgeAt(0)->getDims(); auto& outDims = getChildEdgeAt(0)->getDims(); memory::format outFormat = MKLDNNMemory::GetPlainFormat(outDims); InferenceEngine::LayerConfig config; diff --git a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_tensoriterator_node.cpp b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_tensoriterator_node.cpp index 6d99b1d835f..0f866c9ad58 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_tensoriterator_node.cpp +++ b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_tensoriterator_node.cpp @@ -62,7 +62,6 @@ public: auto full_dims = full_blob->GetDims(); auto part_dims = part_blob->GetDims(); - bool simple_copy = port_map.axis == -1; if (port_map.axis == -1) { // simple copy mode. No iteration through this tensor reorders.emplace_back(from->GetPrimitive(), to->GetPrimitive()); @@ -132,13 +131,8 @@ class BackEdgePortHelper : public PortMapHelper { public: BackEdgePortHelper(const MKLDNNMemoryPtr &from, const MKLDNNMemoryPtr &to, const mkldnn::engine& eng, int n_iter) { auto mem_desc = from->GetDescriptor(); - - mem_holder.emplace_back(mkldnn::memory::primitive_desc(mem_desc, eng)); - auto &temp_mem = mem_holder.back(); - reorders.emplace_back(from->GetPrimitive(), to->GetPrimitive()); - iter_count = n_iter; } diff --git a/inference-engine/src/mkldnn_plugin/nodes/roifeatureextractor_onnx.cpp b/inference-engine/src/mkldnn_plugin/nodes/roifeatureextractor_onnx.cpp index 29539ef049c..55ffb832f67 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/roifeatureextractor_onnx.cpp +++ b/inference-engine/src/mkldnn_plugin/nodes/roifeatureextractor_onnx.cpp @@ -394,15 +394,6 @@ private: int pooled_width_ = 0; std::vector pyramid_scales_; int sampling_ratio_ = 0; - - int channels = 0; - int height = 0; - int width = 0; - - int nn = 0; - int nc = 0; - int nh = 0; - int nw = 0; }; REG_FACTORY_FOR(ExperimentalDetectronROIFeatureExtractorImpl, ExperimentalDetectronROIFeatureExtractor); diff --git a/inference-engine/src/plugin_api/ie_metric_helpers.hpp b/inference-engine/src/plugin_api/ie_metric_helpers.hpp index 5dc50433f41..bd1922a936f 100644 --- a/inference-engine/src/plugin_api/ie_metric_helpers.hpp +++ b/inference-engine/src/plugin_api/ie_metric_helpers.hpp @@ -52,7 +52,7 @@ struct MetricType; #define IE_SET_METRIC_RETURN(name, ...) \ typename ::InferenceEngine::Metrics::MetricType<::InferenceEngine::Metrics::name>::type _##name##_value = \ __VA_ARGS__; \ - return std::move(_##name##_value) + return _##name##_value /** * @def IE_SET_METRIC(name, ...) diff --git a/inference-engine/src/preprocessing/CMakeLists.txt b/inference-engine/src/preprocessing/CMakeLists.txt index 4c78228e3c5..9201a6ed53f 100644 --- a/inference-engine/src/preprocessing/CMakeLists.txt +++ b/inference-engine/src/preprocessing/CMakeLists.txt @@ -152,7 +152,14 @@ set_ie_threading_interface_for(${TARGET_NAME}_obj) # Create shared library file from object library +file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp) + add_library(${TARGET_NAME} SHARED + # according to https://cmake.org/cmake/help/latest/command/add_library.html#id4 + # Some native build systems (such as Xcode) may not like targets that have only + # object files, so consider adding at least one real source file to any target that + # references $. + ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp $) set_ie_threading_interface_for(${TARGET_NAME}) @@ -165,6 +172,9 @@ if(WIN32) set_target_properties(${TARGET_NAME} PROPERTIES COMPILE_PDB_NAME ${TARGET_NAME}) endif() +add_cpplint_target(${TARGET_NAME}_cpplint FOR_TARGETS ${TARGET_NAME} + EXCLUDE_PATTERNS ${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp) + # Static library used for unit tests which are always built add_library(${TARGET_NAME}_s STATIC diff --git a/inference-engine/src/transformations/include/ngraph_ops/deconvolution_ie.hpp b/inference-engine/src/transformations/include/ngraph_ops/deconvolution_ie.hpp index f5da2f3a274..0b3d359cc9a 100644 --- a/inference-engine/src/transformations/include/ngraph_ops/deconvolution_ie.hpp +++ b/inference-engine/src/transformations/include/ngraph_ops/deconvolution_ie.hpp @@ -48,8 +48,6 @@ public: std::shared_ptr copy_with_new_args(const NodeVector& new_args) const override; - std::shared_ptr copy(const OutputVector & new_args) const; - /// \return The data batch shape. const PartialShape get_output_shape() { return m_output_shape; } void set_output_shape(const Shape& output_shape) { m_output_shape = output_shape; } diff --git a/inference-engine/src/transformations/include/transformations/convert_opset1_to_legacy/convert_one_hot_to_one_hot_ie.hpp b/inference-engine/src/transformations/include/transformations/convert_opset1_to_legacy/convert_one_hot_to_one_hot_ie.hpp index f8562df9227..ab92e487382 100644 --- a/inference-engine/src/transformations/include/transformations/convert_opset1_to_legacy/convert_one_hot_to_one_hot_ie.hpp +++ b/inference-engine/src/transformations/include/transformations/convert_opset1_to_legacy/convert_one_hot_to_one_hot_ie.hpp @@ -22,7 +22,7 @@ class INFERENCE_ENGINE_API_CLASS(ConvertOneHotToOneHotIE); class ngraph::pass::ConvertOneHotToOneHotIE: public ngraph::pass::GraphRewrite { public: - ConvertOneHotToOneHotIE() : is_f16(false), GraphRewrite() { + ConvertOneHotToOneHotIE() : GraphRewrite(), is_f16(false) { convert_one_hot(); } diff --git a/inference-engine/src/transformations/include/transformations/utils/annotations.hpp b/inference-engine/src/transformations/include/transformations/utils/annotations.hpp index 27be478eed4..4012738df29 100644 --- a/inference-engine/src/transformations/include/transformations/utils/annotations.hpp +++ b/inference-engine/src/transformations/include/transformations/utils/annotations.hpp @@ -21,12 +21,12 @@ public: explicit EltwiseAttrs(std::shared_ptr & attrs): m_has_constant_input(attrs->has_constant_input()), - m_consumers_count(attrs->get_consumers_count()), - m_const_input_id(attrs->get_const_input_id()) {} + m_const_input_id(attrs->get_const_input_id()), + m_consumers_count(attrs->get_consumers_count()) {} EltwiseAttrs(size_t constant_input_id, size_t consumers_count): - m_const_input_id(constant_input_id), m_has_constant_input(true), + m_const_input_id(constant_input_id), m_consumers_count(consumers_count) {} bool has_constant_input() { diff --git a/inference-engine/src/transformations/src/ngraph_ops/deconvolution_ie.cpp b/inference-engine/src/transformations/src/ngraph_ops/deconvolution_ie.cpp index 782c5658e57..aa1dac6877e 100644 --- a/inference-engine/src/transformations/src/ngraph_ops/deconvolution_ie.cpp +++ b/inference-engine/src/transformations/src/ngraph_ops/deconvolution_ie.cpp @@ -2,12 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 // -#include "ngraph_ops/deconvolution_ie.hpp" - #include #include #include +#include "ngraph_ops/deconvolution_ie.hpp" + #include "ngraph/util.hpp" #include "ngraph/validation_util.hpp" @@ -31,8 +31,8 @@ op::DeconvolutionIE::DeconvolutionIE(const Output& data, , m_pads_begin(pads_begin) , m_pads_end(pads_end) , m_auto_pad(auto_pad) - , m_group(group) - , m_output_shape(output_shape) { + , m_output_shape(output_shape) + , m_group(group) { constructor_validate_and_infer_types(); } @@ -52,8 +52,8 @@ op::DeconvolutionIE::DeconvolutionIE(const Output& data, , m_pads_begin(pads_begin) , m_pads_end(pads_end) , m_auto_pad(auto_pad) - , m_group(group) - , m_output_shape(output_shape) { + , m_output_shape(output_shape) + , m_group(group) { constructor_validate_and_infer_types(); } @@ -85,28 +85,3 @@ shared_ptr op::DeconvolutionIE::copy_with_new_args(const NodeVector& new_a m_auto_pad); } } - -shared_ptr op::DeconvolutionIE::copy(const OutputVector& new_args) const { - if (new_args.size() == 2) { - return make_shared(new_args.at(0), - new_args.at(1), - m_strides, - m_pads_begin, - m_pads_end, - m_dilations, - m_output_shape, - m_group, - m_auto_pad); - } else { - return make_shared(new_args.at(0), - new_args.at(1), - new_args.at(2), - m_strides, - m_pads_begin, - m_pads_end, - m_dilations, - m_output_shape, - m_group, - m_auto_pad); - } -} \ No newline at end of file diff --git a/inference-engine/src/transformations/src/ngraph_ops/fully_connected.cpp b/inference-engine/src/transformations/src/ngraph_ops/fully_connected.cpp index 0395d905ae4..2a0cd649d25 100644 --- a/inference-engine/src/transformations/src/ngraph_ops/fully_connected.cpp +++ b/inference-engine/src/transformations/src/ngraph_ops/fully_connected.cpp @@ -17,8 +17,7 @@ using namespace ngraph; constexpr NodeTypeInfo op::FullyConnected::type_info; op::FullyConnected::FullyConnected(const Output& A, const Output& B, const Output& C, const Shape & output_shape) - : m_output_shape(output_shape), - Op({A, B, C}) { + : Op({A, B, C}), m_output_shape(output_shape) { constructor_validate_and_infer_types(); } diff --git a/inference-engine/src/transformations/src/ngraph_ops/nms_ie.cpp b/inference-engine/src/transformations/src/ngraph_ops/nms_ie.cpp index 9d3fb77897d..e6e452970a6 100644 --- a/inference-engine/src/transformations/src/ngraph_ops/nms_ie.cpp +++ b/inference-engine/src/transformations/src/ngraph_ops/nms_ie.cpp @@ -20,7 +20,7 @@ op::NonMaxSuppressionIE::NonMaxSuppressionIE(const Output &boxes, int center_point_box, bool sort_result_descending) : Op({boxes, scores, max_output_boxes_per_class, iou_threshold, score_threshold}), - m_output_shape{output_shape}, m_center_point_box{center_point_box}, m_sort_result_descending{sort_result_descending} { + m_center_point_box{center_point_box}, m_sort_result_descending{sort_result_descending}, m_output_shape{output_shape} { constructor_validate_and_infer_types(); } diff --git a/inference-engine/src/transformations/src/ngraph_ops/onehot_ie.cpp b/inference-engine/src/transformations/src/ngraph_ops/onehot_ie.cpp index bdfcae69942..4aa92ceb56d 100644 --- a/inference-engine/src/transformations/src/ngraph_ops/onehot_ie.cpp +++ b/inference-engine/src/transformations/src/ngraph_ops/onehot_ie.cpp @@ -12,7 +12,7 @@ using namespace ngraph; constexpr NodeTypeInfo op::OneHotIE::type_info; op::OneHotIE::OneHotIE(const Output& input, int axis, int depth, float on_value, float off_value, element::Type type) - : Op({input}), m_axis(axis), m_depth(depth), m_on_value(on_value), m_off_value(off_value), m_type(type) { + : Op({input}), m_type(type), m_axis(axis), m_depth(depth), m_off_value(off_value), m_on_value(on_value) { constructor_validate_and_infer_types(); } diff --git a/inference-engine/src/transformations/src/ngraph_ops/power.cpp b/inference-engine/src/transformations/src/ngraph_ops/power.cpp index 6419b470c51..24e61c443e5 100644 --- a/inference-engine/src/transformations/src/ngraph_ops/power.cpp +++ b/inference-engine/src/transformations/src/ngraph_ops/power.cpp @@ -15,7 +15,7 @@ using namespace ngraph; constexpr NodeTypeInfo op::PowerIE::type_info; op::PowerIE::PowerIE(const Output& data_batch, const float power, const float scale, const float shift) - : Op({data_batch}), power(power), scale(scale), shift(shift) { + : Op({data_batch}), scale(scale), power(power), shift(shift) { constructor_validate_and_infer_types(); } diff --git a/inference-engine/src/transformations/src/transformations/convert_opset1_to_legacy/convert_lrn_to_lrn_ie.cpp b/inference-engine/src/transformations/src/transformations/convert_opset1_to_legacy/convert_lrn_to_lrn_ie.cpp index 22b8deaf531..9583dd26724 100644 --- a/inference-engine/src/transformations/src/transformations/convert_opset1_to_legacy/convert_lrn_to_lrn_ie.cpp +++ b/inference-engine/src/transformations/src/transformations/convert_opset1_to_legacy/convert_lrn_to_lrn_ie.cpp @@ -57,11 +57,11 @@ void ngraph::pass::ConvertLRNToLRNIE::convert_lrn() { region); lrn_ie->set_friendly_name(lrn->get_friendly_name()); - ngraph:copy_runtime_info(lrn, lrn_ie); + ngraph::copy_runtime_info(lrn, lrn_ie); ngraph::replace_node(lrn, lrn_ie); return true; }; auto m = std::make_shared(lrn, "ConvertLRNToLRNIE"); this->add_matcher(m, callback, PassProperty::CHANGE_DYNAMIC_STATE); -} \ No newline at end of file +} diff --git a/inference-engine/src/transformations/src/transformations/convert_opset1_to_legacy/convert_matmul_to_fc_or_gemm.cpp b/inference-engine/src/transformations/src/transformations/convert_opset1_to_legacy/convert_matmul_to_fc_or_gemm.cpp index 966375dec0d..f4d7d9d6d23 100644 --- a/inference-engine/src/transformations/src/transformations/convert_opset1_to_legacy/convert_matmul_to_fc_or_gemm.cpp +++ b/inference-engine/src/transformations/src/transformations/convert_opset1_to_legacy/convert_matmul_to_fc_or_gemm.cpp @@ -23,7 +23,7 @@ void ngraph::pass::ConvertMatMulToFCorGemm::convert_matmul() { auto input_1 = std::make_shared(element::f32, Shape {1, 1}); auto matmul = std::make_shared(input_0, input_1); - ngraph::graph_rewrite_callback callback = [this](pattern::Matcher& m) { + ngraph::graph_rewrite_callback callback = [](pattern::Matcher& m) { auto matmul = std::dynamic_pointer_cast(m.get_match_root()); if (!matmul) { return false; @@ -200,4 +200,4 @@ void ngraph::pass::ConvertMatMulToFCorGemm::convert_matmul() { auto m = std::make_shared(matmul, "ConvertMatMulToFCorGemm"); this->add_matcher(m, callback, PassProperty::CHANGE_DYNAMIC_STATE); -} \ No newline at end of file +} diff --git a/inference-engine/tests/ie_test_utils/common_test_utils/common_layers_params.cpp b/inference-engine/tests/ie_test_utils/common_test_utils/common_layers_params.cpp index 434e76e469e..cc769c50585 100644 --- a/inference-engine/tests/ie_test_utils/common_test_utils/common_layers_params.cpp +++ b/inference-engine/tests/ie_test_utils/common_test_utils/common_layers_params.cpp @@ -17,7 +17,6 @@ void getConvOutShape(const std::vector &inShape, outShape.resize(inShape.size(), 1lu); outShape[0] = inShape[0]; outShape[1] = params.out_c; - size_t in_size = inShape.size(); for (int i = 0; i < params.kernel.size() && i + 2 < outShape.size(); i++) { outShape[i + 2] = (inShape[i + 2] + params.pads_begin[i] + params.pads_end[i] - @@ -58,7 +57,6 @@ void getPoolOutShape(const std::vector &inShape, outShape.resize(inShape.size(), 1lu); outShape[0] = inShape[0]; outShape[1] = inShape[1]; - size_t in_size = inShape.size(); for (int i = 0; i < params.kernel.size() && i + 2 < outShape.size(); i++) { outShape[i + 2] = (inShape[i + 2] + params.pads_begin[i] + params.pads_end[i] - params.kernel[i]) / params.stride[i] + diff --git a/inference-engine/tests/ie_test_utils/common_test_utils/xml_net_builder/ir_net.hpp b/inference-engine/tests/ie_test_utils/common_test_utils/xml_net_builder/ir_net.hpp index f947ddc8534..a2bff38405f 100644 --- a/inference-engine/tests/ie_test_utils/common_test_utils/xml_net_builder/ir_net.hpp +++ b/inference-engine/tests/ie_test_utils/common_test_utils/xml_net_builder/ir_net.hpp @@ -75,9 +75,9 @@ protected: private: Port(std::weak_ptr parent, size_t id, const std::vector &shape, std::map common_attributes = {}) - : m_parent(std::move(parent)), - m_id(id), + : m_id(id), m_shape(shape), + m_parent(std::move(parent)), m_common_attributes(std::move(common_attributes)) {} }; @@ -235,9 +235,9 @@ private: std::weak_ptr m_parent; Layer(std::weak_ptr parent, size_t id, std::map common_attributes = {}) - : m_parent(std::move(parent)), - m_id(id), - m_common_attributes(std::move(common_attributes)) { + : m_id(id), + m_common_attributes(std::move(common_attributes)), + m_parent(std::move(parent)) { } }; @@ -303,7 +303,7 @@ public: // convert to string std::stringstream ss; doc.print(ss, " "); - return std::move(ss.str()); + return ss.str(); } protected: @@ -482,4 +482,4 @@ private: std::shared_ptr m_ir_net; }; -} // namespace CommonTestUtils \ No newline at end of file +} // namespace CommonTestUtils diff --git a/inference-engine/tests/ie_test_utils/unit_test_utils/CMakeLists.txt b/inference-engine/tests/ie_test_utils/unit_test_utils/CMakeLists.txt index 5698f465a36..c6cafb304ff 100644 --- a/inference-engine/tests/ie_test_utils/unit_test_utils/CMakeLists.txt +++ b/inference-engine/tests/ie_test_utils/unit_test_utils/CMakeLists.txt @@ -7,7 +7,6 @@ set(TARGET_NAME unitTestUtils) list(APPEND EXPORT_DEPENDENCIES commonTestUtils_s inference_engine_s - inference_engine_preproc_s inference_engine_lp_transformations inference_engine_ir_readers gmock)