diff --git a/CMakeLists.txt b/CMakeLists.txt index 6019fe63d931f1..cfbb8e5ea459ce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,50 +42,6 @@ endforeach() # Build # -function(build_ngraph) - function(ngraph_set option value) - if(NOT DEFINED ${option}) - set(${option} ${value} CACHE BOOL "" FORCE) - endif() - endfunction() - - if(ENABLE_TESTS AND NOT ANDROID) - ngraph_set(NGRAPH_UNIT_TEST_ENABLE ON) - else() - ngraph_set(NGRAPH_UNIT_TEST_ENABLE OFF) - endif() - - if(NOT (ANDROID OR WINDOWS_STORE OR (MSVC AND (ARM OR AARCH64)) )) - ngraph_set(NGRAPH_ONNX_IMPORT_ENABLE ON) - ngraph_set(NGRAPH_PDPD_FRONTEND_ENABLE ON) - else() - ngraph_set(NGRAPH_ONNX_IMPORT_ENABLE OFF) - ngraph_set(NGRAPH_PDPD_FRONTEND_ENABLE OFF) - endif() - - 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) - endif() - - # WA for GCC 7.0 - if (UNIX) - ie_add_compiler_flags(-Wno-error=return-type -Wno-undef) - elseif(WIN32) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4308 /wd4146 /wd4703 /wd4244 /wd4819") - endif() - - if(ENABLE_LTO) - set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ON) - endif() - - ie_cpack_add_component(ngraph REQUIRED) - ie_cpack_add_component(ngraph_dev REQUIRED DEPENDS ngraph) - - add_subdirectory(ngraph) -endfunction() - function(openvino_developer_export_targets) cmake_parse_arguments(EXPORT "" "COMPONENT" "TARGETS" ${ARGN}) @@ -118,9 +74,12 @@ function(openvino_developer_export_targets) "A list of OpenVINO exported components" FORCE) endfunction() +ie_cpack_add_component(ngraph REQUIRED) +ie_cpack_add_component(ngraph_dev REQUIRED DEPENDS ngraph) + add_subdirectory(thirdparty) add_subdirectory(openvino) -build_ngraph() +add_subdirectory(ngraph) add_subdirectory(inference-engine) # for Template plugin diff --git a/cmake/developer_package/compile_flags/os_flags.cmake b/cmake/developer_package/compile_flags/os_flags.cmake index 072f2a0dcee22a..7b5cc66d3e3434 100644 --- a/cmake/developer_package/compile_flags/os_flags.cmake +++ b/cmake/developer_package/compile_flags/os_flags.cmake @@ -3,6 +3,7 @@ # include(ProcessorCount) +include(CheckCXXCompilerFlag) # # Disables deprecated warnings generation @@ -292,9 +293,14 @@ else() elseif(UNIX) ie_add_compiler_flags(-Wuninitialized -Winit-self) if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - ie_add_compiler_flags(-Wno-error=switch) + ie_add_compiler_flags(-Wno-error=switch + -Winconsistent-missing-override) else() ie_add_compiler_flags(-Wmaybe-uninitialized) + check_cxx_compiler_flag("-Wsuggest-override" SUGGEST_OVERRIDE_SUPPORTED) + if(SUGGEST_OVERRIDE_SUPPORTED) + set(CMAKE_CXX_FLAGS "-Wsuggest-override ${CMAKE_CXX_FLAGS}") + endif() endif() endif() @@ -316,3 +322,27 @@ else() set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gc-sections -Wl,--exclude-libs,ALL") endif() endif() + +# Links provided libraries and include their INTERFACE_INCLUDE_DIRECTORIES as SYSTEM +function(link_system_libraries TARGET_NAME) + set(MODE PRIVATE) + + foreach(arg IN LISTS ARGN) + if(arg MATCHES "(PRIVATE|PUBLIC|INTERFACE)") + set(MODE ${arg}) + else() + if(TARGET "${arg}") + target_include_directories(${TARGET_NAME} + SYSTEM ${MODE} + $ + $ + ) + endif() + + target_link_libraries(${TARGET_NAME} + ${MODE} + ${arg} + ) + endif() + endforeach() +endfunction() diff --git a/cmake/developer_package/compile_flags/sanitizer.cmake b/cmake/developer_package/compile_flags/sanitizer.cmake index dbf351965079a3..ef71780c0f169b 100644 --- a/cmake/developer_package/compile_flags/sanitizer.cmake +++ b/cmake/developer_package/compile_flags/sanitizer.cmake @@ -6,7 +6,7 @@ include(CheckCXXCompilerFlag) if (ENABLE_SANITIZER) set(SANITIZER_COMPILER_FLAGS "${SANITIZER_COMPILER_FLAGS} -fsanitize=address") - CHECK_CXX_COMPILER_FLAG("-fsanitize-recover=address" SANITIZE_RECOVER_ADDRESS_SUPPORTED) + check_cxx_compiler_flag("-fsanitize-recover=address" SANITIZE_RECOVER_ADDRESS_SUPPORTED) if (SANITIZE_RECOVER_ADDRESS_SUPPORTED) set(SANITIZER_COMPILER_FLAGS "${SANITIZER_COMPILER_FLAGS} -fsanitize-recover=address") endif() @@ -18,7 +18,7 @@ if (ENABLE_UB_SANITIZER) # TODO: Remove -fno-sanitize=null as thirdparty/ocl/clhpp_headers UBSAN compatibility resolved: # https://github.com/KhronosGroup/OpenCL-CLHPP/issues/17 set(SANITIZER_COMPILER_FLAGS "${SANITIZER_COMPILER_FLAGS} -fsanitize=undefined -fno-sanitize=null") - CHECK_CXX_COMPILER_FLAG("-fsanitize-recover=undefined" SANITIZE_RECOVER_UNDEFINED_SUPPORTED) + check_cxx_compiler_flag("-fsanitize-recover=undefined" SANITIZE_RECOVER_UNDEFINED_SUPPORTED) if (SANITIZE_RECOVER_UNDEFINED_SUPPORTED) set(SANITIZER_COMPILER_FLAGS "${SANITIZER_COMPILER_FLAGS} -fsanitize-recover=undefined") endif() diff --git a/cmake/features.cmake b/cmake/features.cmake index 1f0c198913cc23..ea32a7a42fe822 100644 --- a/cmake/features.cmake +++ b/cmake/features.cmake @@ -114,6 +114,25 @@ ie_option (ENABLE_SYSTEM_PUGIXML "use the system copy of pugixml" OFF) ie_option (ENABLE_CPU_DEBUG_CAPS "enable CPU debug capabilities at runtime" OFF) +if(ANDROID OR WINDOWS_STORE OR (MSVC AND (ARM OR AARCH64))) + set(protoc_available OFF) +else() + set(protoc_available ON) +endif() + +ie_dependent_option(NGRAPH_ONNX_IMPORT_ENABLE "Enable ONNX importer" ON "protoc_available" OFF) +ie_dependent_option(NGRAPH_ONNX_EDITOR_ENABLE "Enable ONNX Editor" ON "NGRAPH_ONNX_IMPORT_ENABLE" OFF) +ie_dependent_option(NGRAPH_PDPD_FRONTEND_ENABLE "Enable PaddlePaddle FrontEnd" ON "protoc_available" OFF) +ie_dependent_option(NGRAPH_USE_PROTOBUF_LITE "Compiles and links with protobuf-lite" OFF + "NGRAPH_ONNX_IMPORT_ENABLE OR NGRAPH_PDPD_FRONTEND_ENABLE" OFF) +ie_dependent_option(NGRAPH_UNIT_TEST_ENABLE "Enables ngraph unit tests" ON "ENABLE_TESTS;NOT ANDROID" OFF) +ie_dependent_option(NGRAPH_UNIT_TEST_BACKENDS_ENABLE "Control the building of unit tests using backends" ON + "NGRAPH_UNIT_TEST_ENABLE" OFF) +option(NGRAPH_DEBUG_ENABLE "Enable output for NGRAPH_DEBUG statements" OFF) + +# WA for ngraph python build on Windows debug +list(REMOVE_ITEM IE_OPTIONS NGRAPH_UNIT_TEST_ENABLE NGRAPH_UNIT_TEST_BACKENDS_ENABLE) + # # Process featues # diff --git a/cmake/templates/InferenceEngineDeveloperPackageConfig.cmake.in b/cmake/templates/InferenceEngineDeveloperPackageConfig.cmake.in index 4aca14b72bd46d..72af5ca89cadac 100644 --- a/cmake/templates/InferenceEngineDeveloperPackageConfig.cmake.in +++ b/cmake/templates/InferenceEngineDeveloperPackageConfig.cmake.in @@ -13,7 +13,7 @@ set_and_check(IE_MAIN_SOURCE_DIR "@IE_MAIN_SOURCE_DIR@") # HDDL # Variables to export in plugin's projects -set(ie_options "@IE_OPTIONS@;CMAKE_BUILD_TYPE;CMAKE_SKIP_RPATH;") +set(ie_options "@IE_OPTIONS@;CMAKE_BUILD_TYPE;CMAKE_SKIP_RPATH") list(APPEND ie_options CMAKE_CXX_COMPILER_LAUNCHER CMAKE_C_COMPILER_LAUNCHER) file(TO_CMAKE_PATH "${CMAKE_CURRENT_LIST_DIR}" cache_path) @@ -73,6 +73,9 @@ if(NOT MSVC) ie_add_compiler_flags(-Wno-error=unused-variable) if(CMAKE_COMPILER_IS_GNUCXX) ie_add_compiler_flags(-Wno-error=unused-but-set-variable) + if(SUGGEST_OVERRIDE_SUPPORTED) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-suggest-override") + endif() endif() endif() diff --git a/inference-engine/samples/speech_sample/fileutils.hpp b/inference-engine/samples/speech_sample/fileutils.hpp index 0cf5adc1922bde..b437c0a7af32e5 100644 --- a/inference-engine/samples/speech_sample/fileutils.hpp +++ b/inference-engine/samples/speech_sample/fileutils.hpp @@ -30,7 +30,7 @@ class ArkFile : public BaseFile { * @param ptrNumMemoryBytes pointer to specific number of memory bytes * @return none. */ - virtual void GetFileInfo(const char* fileName, uint32_t numArrayToFindSize, uint32_t* ptrNumArrays, uint32_t* ptrNumMemoryBytes); + void GetFileInfo(const char* fileName, uint32_t numArrayToFindSize, uint32_t* ptrNumArrays, uint32_t* ptrNumMemoryBytes) override; /** * @brief Load Kaldi ARK speech feature vector file @@ -43,8 +43,8 @@ class ArkFile : public BaseFile { * @param ptrNumBytesPerElement pointer to number bytes per element (size of float by default) * @return none. */ - virtual void LoadFile(const char* fileName, uint32_t arrayIndex, std::string& ptrName, std::vector& memory, uint32_t* ptrNumRows, - uint32_t* ptrNumColumns, uint32_t* ptrNumBytesPerElement); + void LoadFile(const char* fileName, uint32_t arrayIndex, std::string& ptrName, std::vector& memory, uint32_t* ptrNumRows, uint32_t* ptrNumColumns, + uint32_t* ptrNumBytesPerElement) override; /** * @brief Save Kaldi ARK speech feature vector file @@ -56,7 +56,7 @@ class ArkFile : public BaseFile { * @param numColumns number of columns * @return none. */ - virtual void SaveFile(const char* fileName, bool shouldAppend, std::string name, void* ptrMemory, uint32_t numRows, uint32_t numColumns); + void SaveFile(const char* fileName, bool shouldAppend, std::string name, void* ptrMemory, uint32_t numRows, uint32_t numColumns) override; }; /// @brief Responsible to work with .npz files @@ -70,7 +70,7 @@ class NumpyFile : public BaseFile { * @param ptrNumMemoryBytes pointer to specific number of memory bytes * @return none. */ - virtual void GetFileInfo(const char* fileName, uint32_t numArrayToFindSize, uint32_t* ptrNumArrays, uint32_t* ptrNumMemoryBytes); + void GetFileInfo(const char* fileName, uint32_t numArrayToFindSize, uint32_t* ptrNumArrays, uint32_t* ptrNumMemoryBytes) override; /** * @brief Load Numpy* uncompressed NPZ speech feature vector file @@ -83,8 +83,8 @@ class NumpyFile : public BaseFile { * @param ptrNumBytesPerElement pointer to number bytes per element (size of float by default) * @return none. */ - virtual void LoadFile(const char* fileName, uint32_t arrayIndex, std::string& ptrName, std::vector& memory, uint32_t* ptrNumRows, - uint32_t* ptrNumColumns, uint32_t* ptrNumBytesPerElement); + void LoadFile(const char* fileName, uint32_t arrayIndex, std::string& ptrName, std::vector& memory, uint32_t* ptrNumRows, uint32_t* ptrNumColumns, + uint32_t* ptrNumBytesPerElement) override; /** * @brief Save Numpy* uncompressed NPZ speech feature vector file @@ -96,5 +96,5 @@ class NumpyFile : public BaseFile { * @param numColumns number of columns * @return none. */ - virtual void SaveFile(const char* fileName, bool shouldAppend, std::string name, void* ptrMemory, uint32_t numRows, uint32_t numColumns); + void SaveFile(const char* fileName, bool shouldAppend, std::string name, void* ptrMemory, uint32_t numRows, uint32_t numColumns) override; }; diff --git a/inference-engine/src/mkldnn_plugin/CMakeLists.txt b/inference-engine/src/mkldnn_plugin/CMakeLists.txt index 453aff2d9737a2..f2bbc52bdc56bb 100644 --- a/inference-engine/src/mkldnn_plugin/CMakeLists.txt +++ b/inference-engine/src/mkldnn_plugin/CMakeLists.txt @@ -46,8 +46,10 @@ target_link_libraries(${TARGET_NAME} PRIVATE mkldnn inference_engine_lp_transformations) target_include_directories(${TARGET_NAME} PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR} - $) + ${CMAKE_CURRENT_SOURCE_DIR}) + +target_include_directories(${TARGET_NAME} SYSTEM PRIVATE + $) # Cross compiled function # TODO: The same for proposal, proposalONNX, topk @@ -64,15 +66,16 @@ ie_add_api_validator_post_build_step(TARGET ${TARGET_NAME}) # add test object library add_library(${TARGET_NAME}_obj OBJECT ${SOURCES} ${HEADERS}) -target_link_libraries(${TARGET_NAME}_obj PUBLIC mkldnn) +link_system_libraries(${TARGET_NAME}_obj PUBLIC mkldnn) target_include_directories(${TARGET_NAME}_obj PRIVATE $ $ $ $ PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} - $ - $) + $) + +target_include_directories(${TARGET_NAME}_obj SYSTEM PUBLIC $) set_ie_threading_interface_for(${TARGET_NAME}_obj) diff --git a/inference-engine/src/mkldnn_plugin/nodes/common/tensor_desc_creator.cpp b/inference-engine/src/mkldnn_plugin/nodes/common/tensor_desc_creator.cpp index 0467d205fb71b1..18d4838316272f 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/common/tensor_desc_creator.cpp +++ b/inference-engine/src/mkldnn_plugin/nodes/common/tensor_desc_creator.cpp @@ -13,17 +13,17 @@ constexpr size_t channelsPos = 1lu; class PlainFormatCreator : public TensorDescCreator { public: - virtual InferenceEngine::TensorDesc createDesc(const InferenceEngine::Precision& precision, const InferenceEngine::SizeVector& srcDims) const { + InferenceEngine::TensorDesc createDesc(const InferenceEngine::Precision& precision, const InferenceEngine::SizeVector& srcDims) const override { SizeVector order(srcDims.size()); std::iota(order.begin(), order.end(), 0); return TensorDesc(precision, srcDims, {srcDims, order}); } - virtual size_t getMinimalRank() const { return 0lu; } + size_t getMinimalRank() const override { return 0lu; } }; class PerChannelCreator : public TensorDescCreator { public: - virtual InferenceEngine::TensorDesc createDesc(const InferenceEngine::Precision &precision, const InferenceEngine::SizeVector &srcDims) const { + InferenceEngine::TensorDesc createDesc(const InferenceEngine::Precision &precision, const InferenceEngine::SizeVector &srcDims) const override { SizeVector order(srcDims.size()); std::iota(order.begin(), order.end(), 0); SizeVector blkDims = srcDims; @@ -39,13 +39,13 @@ class PerChannelCreator : public TensorDescCreator { return TensorDesc(precision, srcDims, {blkDims, order}); } - virtual size_t getMinimalRank() const { return 3lu; } + size_t getMinimalRank() const override { return 3lu; } }; class ChannelBlockedCreator : public TensorDescCreator { public: ChannelBlockedCreator(size_t blockSize) : _blockSize(blockSize) {} - virtual InferenceEngine::TensorDesc createDesc(const InferenceEngine::Precision& precision, const InferenceEngine::SizeVector& srcDims) const { + InferenceEngine::TensorDesc createDesc(const InferenceEngine::Precision& precision, const InferenceEngine::SizeVector& srcDims) const override { if (srcDims.size() < 2) { IE_THROW() << "Can't create blocked tensor descriptor!"; } @@ -60,7 +60,7 @@ class ChannelBlockedCreator : public TensorDescCreator { return TensorDesc(precision, srcDims, {blkDims, order}); } - virtual size_t getMinimalRank() const { return 3lu; } + size_t getMinimalRank() const override { return 3lu; } private: size_t _blockSize; diff --git a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_input_node.cpp b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_input_node.cpp index 1926914f07431a..cdb553309b84c3 100644 --- a/inference-engine/src/mkldnn_plugin/nodes/mkldnn_input_node.cpp +++ b/inference-engine/src/mkldnn_plugin/nodes/mkldnn_input_node.cpp @@ -149,7 +149,7 @@ struct jit_has_subnormals_base::reg { template struct jit_has_subnormals : public jit_has_subnormals_base { - void generate() final { + void generate() override final { // NOLINT size_t const vlen = reg::length; const int sh_bits = std::ilogb(vlen); diff --git a/inference-engine/tests/functional/inference_engine/CMakeLists.txt b/inference-engine/tests/functional/inference_engine/CMakeLists.txt index 0d10d4d8f469c4..80d95d875e3ab7 100644 --- a/inference-engine/tests/functional/inference_engine/CMakeLists.txt +++ b/inference-engine/tests/functional/inference_engine/CMakeLists.txt @@ -72,6 +72,11 @@ file(GLOB_RECURSE legacy_tests set_source_files_properties(${legacy_tests} PROPERTIES INCLUDE_DIRECTORIES $) +if(SUGGEST_OVERRIDE_SUPPORTED) + set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/caching_test.cpp + PROPERTIES COMPILE_OPTIONS -Wno-suggest-override) +endif() + include(CMakeParseArguments) # diff --git a/inference-engine/tests/functional/inference_engine/ngraph_reader/ngraph_reader_tests.hpp b/inference-engine/tests/functional/inference_engine/ngraph_reader/ngraph_reader_tests.hpp index dc8ca7cff0520c..c8424b93b6f373 100644 --- a/inference-engine/tests/functional/inference_engine/ngraph_reader/ngraph_reader_tests.hpp +++ b/inference-engine/tests/functional/inference_engine/ngraph_reader/ngraph_reader_tests.hpp @@ -25,9 +25,6 @@ using namespace InferenceEngine; class NGraphReaderTests : public CommonTestUtils::TestsCommon { protected: - void TearDown() override {} - void SetUp() override {} - void compareIRs(const std::string& modelV10, const std::string& oldModel, size_t weightsSize = 0, const std::function& fillBlob = {}) { Core ie; Blob::Ptr weights; diff --git a/inference-engine/tests/functional/inference_engine/pre_allocator_test.cpp b/inference-engine/tests/functional/inference_engine/pre_allocator_test.cpp index 5b3c6f96f5df2d..3ac7e5a6ff6dfe 100644 --- a/inference-engine/tests/functional/inference_engine/pre_allocator_test.cpp +++ b/inference-engine/tests/functional/inference_engine/pre_allocator_test.cpp @@ -17,10 +17,7 @@ class PreallocatorTests: public ::testing::Test { protected: std::vector mybuf; - virtual void TearDown() { - } - - virtual void SetUp() { + void SetUp() override { mybuf.resize(10); allocator = details::make_pre_allocator(&*mybuf.begin(), mybuf.size()); } diff --git a/inference-engine/tests/functional/inference_engine/transformations/fq_decomposition_test.cpp b/inference-engine/tests/functional/inference_engine/transformations/fq_decomposition_test.cpp index 91d218924db641..a16d6d8c8d32be 100644 --- a/inference-engine/tests/functional/inference_engine/transformations/fq_decomposition_test.cpp +++ b/inference-engine/tests/functional/inference_engine/transformations/fq_decomposition_test.cpp @@ -56,7 +56,7 @@ class FakeQuantizeDecompositionTest : public CommonTestUtils::TestsCommon, publi } protected: - void SetUp() { + void SetUp() override { FakeQuantizeDecompositionBasicParams basic_params; std::pair input_ranges_values; bool should_be_decompos; diff --git a/inference-engine/tests/functional/plugin/conformance/subgraphs_dumper/tests/CMakeLists.txt b/inference-engine/tests/functional/plugin/conformance/subgraphs_dumper/tests/CMakeLists.txt index 41b542ce867e1c..e07dea2d455533 100644 --- a/inference-engine/tests/functional/plugin/conformance/subgraphs_dumper/tests/CMakeLists.txt +++ b/inference-engine/tests/functional/plugin/conformance/subgraphs_dumper/tests/CMakeLists.txt @@ -4,11 +4,6 @@ set(TARGET_NAME subgraphsDumperTests) -list(APPEND DEPENDENCIES - unitTestUtils - ngraph - ) - addIeTargetTest( NAME ${TARGET_NAME} ROOT ${CMAKE_CURRENT_SOURCE_DIR} @@ -18,7 +13,7 @@ addIeTargetTest( $ LINK_LIBRARIES PRIVATE - unitTestUtils + funcTestUtils ngraph pugixml::static ADD_CPPLINT diff --git a/inference-engine/tests/functional/plugin/conformance/subgraphs_dumper/tests/matchers/convolutions_matcher.cpp b/inference-engine/tests/functional/plugin/conformance/subgraphs_dumper/tests/matchers/convolutions_matcher.cpp index c06cbd89d27ca6..04caaf98c94167 100644 --- a/inference-engine/tests/functional/plugin/conformance/subgraphs_dumper/tests/matchers/convolutions_matcher.cpp +++ b/inference-engine/tests/functional/plugin/conformance/subgraphs_dumper/tests/matchers/convolutions_matcher.cpp @@ -17,7 +17,7 @@ using ngraph::element::Type_t; class ConvolutionMatcherTest : public ::testing::Test { protected: - void SetUp() { + void SetUp() override { matcher = SubgraphsDumper::ConvolutionsMatcher(); op_info = LayerTestsUtils::OPInfo(); } diff --git a/inference-engine/tests/functional/plugin/conformance/subgraphs_dumper/tests/matchers/generic_single_op.cpp b/inference-engine/tests/functional/plugin/conformance/subgraphs_dumper/tests/matchers/generic_single_op.cpp index 00cff572a5da1a..d114ec0562b0da 100644 --- a/inference-engine/tests/functional/plugin/conformance/subgraphs_dumper/tests/matchers/generic_single_op.cpp +++ b/inference-engine/tests/functional/plugin/conformance/subgraphs_dumper/tests/matchers/generic_single_op.cpp @@ -13,7 +13,7 @@ using ngraph::element::Type_t; class SingleOpMatcherTest : public ::testing::Test { protected: - void SetUp() { + void SetUp() override { matcher = SubgraphsDumper::SingleOpMatcher(); op_info = LayerTestsUtils::OPInfo(); } diff --git a/inference-engine/tests/functional/plugin/conformance/subgraphs_dumper/tests/matchers/matchers_config.cpp b/inference-engine/tests/functional/plugin/conformance/subgraphs_dumper/tests/matchers/matchers_config.cpp index 263d316a50e48b..c6e18667dd9e3e 100644 --- a/inference-engine/tests/functional/plugin/conformance/subgraphs_dumper/tests/matchers/matchers_config.cpp +++ b/inference-engine/tests/functional/plugin/conformance/subgraphs_dumper/tests/matchers/matchers_config.cpp @@ -12,7 +12,7 @@ using ngraph::element::Type_t; class MatcherConfigTest : public ::testing::Test { protected: - void SetUp() { + void SetUp() override { const auto const1 = std::make_shared(Type_t::f32, Shape({5, 5}), 1); const auto const2 = std::make_shared(Type_t::f32, Shape({5, 5}), 2); node = std::make_shared(const1, const2); diff --git a/inference-engine/tests/functional/plugin/cpu/bfloat16/memory_conv.cpp b/inference-engine/tests/functional/plugin/cpu/bfloat16/memory_conv.cpp index fc2cebf349340e..e4d7fa1ea38ef6 100644 --- a/inference-engine/tests/functional/plugin/cpu/bfloat16/memory_conv.cpp +++ b/inference-engine/tests/functional/plugin/cpu/bfloat16/memory_conv.cpp @@ -32,7 +32,7 @@ class MemoryConv : public testing::WithParamInterfaceGetParam(); diff --git a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/eltwise.cpp b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/eltwise.cpp index 3932b9349bb212..f347546ed7f2ac 100644 --- a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/eltwise.cpp +++ b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/eltwise.cpp @@ -32,7 +32,7 @@ class EltwiseLayerCPUTest : public testing::WithParamInterfaceGetParam(); diff --git a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/group_convolution.cpp b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/group_convolution.cpp index 1f75554b1b49ea..814db862ed0bd1 100644 --- a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/group_convolution.cpp +++ b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/group_convolution.cpp @@ -67,7 +67,7 @@ class GroupConvolutionLayerCPUTest : public testing::WithParamInterface additionalConfig; diff --git a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/gru_sequence.cpp b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/gru_sequence.cpp index 799f7516887429..b34136facf9ccc 100644 --- a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/gru_sequence.cpp +++ b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/gru_sequence.cpp @@ -41,7 +41,7 @@ class GRUSequenceCPUTest : public testing::WithParamInterface additionalConfig; @@ -142,7 +142,7 @@ class GRUSequenceCPUTest : public testing::WithParamInterface additionalConfig; diff --git a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/lstm_sequence.cpp b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/lstm_sequence.cpp index 959d5e0c89d6e2..47453bde9ee5cc 100644 --- a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/lstm_sequence.cpp +++ b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/lstm_sequence.cpp @@ -42,7 +42,7 @@ class LSTMSequenceCPUTest : public testing::WithParamInterface additionalConfig; @@ -149,7 +149,7 @@ class LSTMSequenceCPUTest : public testing::WithParamInterfaceGetParam(); diff --git a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/pooling.cpp b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/pooling.cpp index 0021a43dbb9d8b..70e732fdb3b2d5 100644 --- a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/pooling.cpp +++ b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/pooling.cpp @@ -37,7 +37,7 @@ class PoolingLayerCPUTest : public testing::WithParamInterface additionalConfig; diff --git a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/rnn_sequence.cpp b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/rnn_sequence.cpp index e1e66a660501e8..f2030fe8c0e0da 100644 --- a/inference-engine/tests/functional/plugin/cpu/single_layer_tests/rnn_sequence.cpp +++ b/inference-engine/tests/functional/plugin/cpu/single_layer_tests/rnn_sequence.cpp @@ -41,7 +41,7 @@ class RNNSequenceCPUTest : public testing::WithParamInterface additionalConfig; @@ -119,7 +119,7 @@ class RNNSequenceCPUTest : public testing::WithParamInterfaceGetParam(); diff --git a/inference-engine/tests/functional/plugin/cpu/subgraph_tests/src/eltwise_chain.cpp b/inference-engine/tests/functional/plugin/cpu/subgraph_tests/src/eltwise_chain.cpp index 8179b0867b4cde..fd10413a926e43 100644 --- a/inference-engine/tests/functional/plugin/cpu/subgraph_tests/src/eltwise_chain.cpp +++ b/inference-engine/tests/functional/plugin/cpu/subgraph_tests/src/eltwise_chain.cpp @@ -60,7 +60,7 @@ class EltwiseChainTest : public testing::WithParamInterface, } protected: - void SetUp() { + void SetUp() override { threshold = 0.1f; std::vector> inputShapes; diff --git a/inference-engine/tests/functional/plugin/cpu/subgraph_tests/src/fuse_scaleshift_and_fakequantize.cpp b/inference-engine/tests/functional/plugin/cpu/subgraph_tests/src/fuse_scaleshift_and_fakequantize.cpp index 7c2dadd9f5262f..b29748832205a2 100644 --- a/inference-engine/tests/functional/plugin/cpu/subgraph_tests/src/fuse_scaleshift_and_fakequantize.cpp +++ b/inference-engine/tests/functional/plugin/cpu/subgraph_tests/src/fuse_scaleshift_and_fakequantize.cpp @@ -46,7 +46,7 @@ class FuseScaleShiftAndFakeQuantizeTest : public testing::WithParamInterfaceallocate(); diff --git a/inference-engine/tests/functional/plugin/gna/pass_tests/convert_matmul_to_pointwise_conv.cpp b/inference-engine/tests/functional/plugin/gna/pass_tests/convert_matmul_to_pointwise_conv.cpp index 2065ed394d2706..8980af68da9781 100644 --- a/inference-engine/tests/functional/plugin/gna/pass_tests/convert_matmul_to_pointwise_conv.cpp +++ b/inference-engine/tests/functional/plugin/gna/pass_tests/convert_matmul_to_pointwise_conv.cpp @@ -56,7 +56,7 @@ class ConvertMatmulToPointwiseConv : public testing::WithParamInterfaceallocate(); @@ -122,7 +122,7 @@ class ConvertMatmulToPointwiseConvWithFq : public testing::WithParamInterfaceallocate(); diff --git a/inference-engine/tests/functional/plugin/gna/pass_tests/insert_transpose_between_convs.cpp b/inference-engine/tests/functional/plugin/gna/pass_tests/insert_transpose_between_convs.cpp index 578eecb33ac3d9..d8783a85621339 100644 --- a/inference-engine/tests/functional/plugin/gna/pass_tests/insert_transpose_between_convs.cpp +++ b/inference-engine/tests/functional/plugin/gna/pass_tests/insert_transpose_between_convs.cpp @@ -48,7 +48,7 @@ class InsertTransposeBetweenConvs : public testing::WithParamInterfaceallocate(); @@ -123,7 +123,7 @@ class InsertTransposeBetweenConvsWithPool : public testing::WithParamInterfaceallocate(); diff --git a/inference-engine/tests/functional/plugin/gpu/remote_blob_tests/cldnn_remote_blob_tests.cpp b/inference-engine/tests/functional/plugin/gpu/remote_blob_tests/cldnn_remote_blob_tests.cpp index 30b740464a62f3..83a4b3d5f5b375 100644 --- a/inference-engine/tests/functional/plugin/gpu/remote_blob_tests/cldnn_remote_blob_tests.cpp +++ b/inference-engine/tests/functional/plugin/gpu/remote_blob_tests/cldnn_remote_blob_tests.cpp @@ -25,7 +25,7 @@ class RemoteBlob_Test : public CommonTestUtils::TestsCommon { protected: std::shared_ptr fn_ptr; - virtual void SetUp() { + void SetUp() override { fn_ptr = ngraph::builder::subgraph::makeSplitMultiConvConcat(); } }; diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/add_output.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/add_output.hpp index 82bc95a001a8c1..fb7a5c24f9ea5a 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/add_output.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/add_output.hpp @@ -21,7 +21,7 @@ class AddOutputsTest : public CommonTestUtils::TestsCommon, std::vector outputsToAdd; std::string deviceName; - void SetUp(); + void SetUp() override; public: static std::string getTestCaseName(const testing::TestParamInfo &obj); }; diff --git a/inference-engine/tests/functional/plugin/shared/include/behavior/memory_states.hpp b/inference-engine/tests/functional/plugin/shared/include/behavior/memory_states.hpp index 245be3dfb758db..6c8c26ed41fdca 100644 --- a/inference-engine/tests/functional/plugin/shared/include/behavior/memory_states.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/behavior/memory_states.hpp @@ -21,7 +21,7 @@ class VariableStateTest : public CommonTestUtils::TestsCommon, std::vector statesToQuery; std::string deviceName; - void SetUp(); + void SetUp() override; InferenceEngine::ExecutableNetwork PrepareNetwork(); public: static std::string getTestCaseName(const testing::TestParamInfo &obj); diff --git a/inference-engine/tests/functional/plugin/shared/include/execution_graph_tests/exec_graph_serialization.hpp b/inference-engine/tests/functional/plugin/shared/include/execution_graph_tests/exec_graph_serialization.hpp index b94093683d35d8..24f407ea31fb74 100644 --- a/inference-engine/tests/functional/plugin/shared/include/execution_graph_tests/exec_graph_serialization.hpp +++ b/inference-engine/tests/functional/plugin/shared/include/execution_graph_tests/exec_graph_serialization.hpp @@ -20,7 +20,7 @@ class ExecGraphSerializationTest : public ::testing::Test, public testing::WithP // vector which is later used for comparison struct exec_graph_walker : pugi::xml_tree_walker { std::vector nodes; - virtual bool for_each(pugi::xml_node &node); + bool for_each(pugi::xml_node &node) override; }; // compare_docs() helper diff --git a/inference-engine/tests/ie_test_utils/common_test_utils/CMakeLists.txt b/inference-engine/tests/ie_test_utils/common_test_utils/CMakeLists.txt index ef88fab70e015c..9da03836041557 100644 --- a/inference-engine/tests/ie_test_utils/common_test_utils/CMakeLists.txt +++ b/inference-engine/tests/ie_test_utils/common_test_utils/CMakeLists.txt @@ -51,13 +51,13 @@ function(add_common_utils ADD_TARGET_NAME) target_include_directories(${ADD_TARGET_NAME} PUBLIC - ${IE_TESTS_ROOT}/ie_test_utils $ PRIVATE $ $ $ ) + target_include_directories(${ADD_TARGET_NAME} SYSTEM PUBLIC ${IE_TESTS_ROOT}/ie_test_utils) target_compile_definitions(${ADD_TARGET_NAME} PUBLIC ${ARGN}) endfunction() 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 f2fd5d1801ff07..cf49c484c40f7f 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 @@ -2,6 +2,10 @@ # SPDX-License-Identifier: Apache-2.0 # +if(SUGGEST_OVERRIDE_SUPPORTED) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-suggest-override") +endif() + set(TARGET_NAME unitTestUtils) add_subdirectory(mocks/mock_engine) diff --git a/inference-engine/tests/ngraph_helpers/lpt_ngraph_functions/src/concat_function.cpp b/inference-engine/tests/ngraph_helpers/lpt_ngraph_functions/src/concat_function.cpp index 1b5a9d863a3fe4..af132e17b98266 100644 --- a/inference-engine/tests/ngraph_helpers/lpt_ngraph_functions/src/concat_function.cpp +++ b/inference-engine/tests/ngraph_helpers/lpt_ngraph_functions/src/concat_function.cpp @@ -374,7 +374,8 @@ std::shared_ptr ConcatFunction::getOriginalWithSplitedIntermed Output lastOutput = intermediateOp->output(1); if (addConvolution) { auto weights = ngraph::opset1::Constant::create( - precision, ngraph::Shape{ inputShape[1].get_length() / numSplit, inputShape[1].get_length() / numSplit, 1, 1 }, { 1 }); + precision, ngraph::Shape{ static_cast(inputShape[1].get_length() / numSplit), + static_cast(inputShape[1].get_length() / numSplit), 1, 1 }, { 1 }); auto convolution = std::make_shared( intermediateOp->output(1), weights, @@ -1260,7 +1261,8 @@ std::shared_ptr ConcatFunction::getReferenceWithSplitedInterme if (addConvolution) { auto weights = ngraph::opset1::Constant::create( precision, - ngraph::Shape{ inputShape[1].get_length() / numSplit, inputShape[1].get_length() / numSplit, 1, 1 }, { 1 }); + ngraph::Shape{ static_cast(inputShape[1].get_length() / numSplit), + static_cast(inputShape[1].get_length() / numSplit), 1, 1 }, { 1 }); auto convolution = std::make_shared( lastDequantization2, diff --git a/inference-engine/tests/unit/cpu/CMakeLists.txt b/inference-engine/tests/unit/cpu/CMakeLists.txt index 901b1f21f3f417..bea484969fc66c 100644 --- a/inference-engine/tests/unit/cpu/CMakeLists.txt +++ b/inference-engine/tests/unit/cpu/CMakeLists.txt @@ -12,10 +12,12 @@ addIeTargetTest( OBJECT_FILES $ LINK_LIBRARIES - unitTestUtils + gtest + gtest_main mkldnn inference_engine_transformations inference_engine_lp_transformations + inference_engine_s ADD_CPPLINT LABELS CPU diff --git a/inference-engine/tests/unit/frontends/onnx_import/CMakeLists.txt b/inference-engine/tests/unit/frontends/onnx_import/CMakeLists.txt index 7567c718688d68..2f3efc8aae5f4b 100644 --- a/inference-engine/tests/unit/frontends/onnx_import/CMakeLists.txt +++ b/inference-engine/tests/unit/frontends/onnx_import/CMakeLists.txt @@ -8,11 +8,9 @@ if (NOT NGRAPH_USE_PROTOBUF_LITE) addIeTargetTest( NAME ${TARGET_NAME} ROOT ${CMAKE_CURRENT_SOURCE_DIR} - DEPENDENCIES - ngraph - onnx_importer LINK_LIBRARIES - unitTestUtils + gtest + gtest_main onnx_importer DEFINES ONNX_MODELS_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}/models\" diff --git a/inference-engine/tests/unit/gna/CMakeLists.txt b/inference-engine/tests/unit/gna/CMakeLists.txt index 4ecd6d63c12372..99b9461e61a9b8 100644 --- a/inference-engine/tests/unit/gna/CMakeLists.txt +++ b/inference-engine/tests/unit/gna/CMakeLists.txt @@ -8,9 +8,15 @@ addIeTargetTest( NAME ${TARGET_NAME} ROOT ${CMAKE_CURRENT_SOURCE_DIR} LINK_LIBRARIES - unitTestUtils + gmock + commonTestUtils_s GNAPlugin_test_static ADD_CPPLINT LABELS GNA -) \ No newline at end of file +) + +if(SUGGEST_OVERRIDE_SUPPORTED) + set_source_files_properties(gna_model_serial_test.cpp + PROPERTIES COMPILE_OPTIONS -Wno-suggest-override) +endif() diff --git a/inference-engine/tests/unit/inference_engine/CMakeLists.txt b/inference-engine/tests/unit/inference_engine/CMakeLists.txt index 5c38c77b9b7e9a..e1fed82f40d865 100644 --- a/inference-engine/tests/unit/inference_engine/CMakeLists.txt +++ b/inference-engine/tests/unit/inference_engine/CMakeLists.txt @@ -16,7 +16,6 @@ addIeTargetTest( NAME ${TARGET_NAME} ROOT ${CMAKE_CURRENT_SOURCE_DIR} LINK_LIBRARIES - unitTestUtils inference_engine_lp_transformations ${OpenCV_LIBRARIES} ADD_CPPLINT @@ -26,3 +25,10 @@ addIeTargetTest( LABELS IE ) + +if(SUGGEST_OVERRIDE_SUPPORTED) + set_source_files_properties(cpp_interfaces/ie_memory_state_internal_test.cpp + PROPERTIES COMPILE_OPTIONS -Wno-suggest-override) +endif() + +link_system_libraries(${TARGET_NAME} PRIVATE unitTestUtils) diff --git a/inference-engine/tests/unit/inference_engine/cpp_interfaces/ie_infer_async_request_base_test.cpp b/inference-engine/tests/unit/inference_engine/cpp_interfaces/ie_infer_async_request_base_test.cpp index 6fbb50abe3e52c..bfb768f8b90389 100644 --- a/inference-engine/tests/unit/inference_engine/cpp_interfaces/ie_infer_async_request_base_test.cpp +++ b/inference-engine/tests/unit/inference_engine/cpp_interfaces/ie_infer_async_request_base_test.cpp @@ -32,10 +32,7 @@ class InferRequestBaseTests : public ::testing::Test { shared_ptr request; ResponseDesc dsc; - virtual void TearDown() { - } - - virtual void SetUp() { + void SetUp() override { mock_impl.reset(new MockIInferRequestInternal()); request = std::make_shared(mock_impl); } diff --git a/inference-engine/tests/unit/inference_engine/cpp_interfaces/ie_infer_async_request_thread_safe_default_test.cpp b/inference-engine/tests/unit/inference_engine/cpp_interfaces/ie_infer_async_request_thread_safe_default_test.cpp index 520da77a9bb882..bd718d1bd19308 100644 --- a/inference-engine/tests/unit/inference_engine/cpp_interfaces/ie_infer_async_request_thread_safe_default_test.cpp +++ b/inference-engine/tests/unit/inference_engine/cpp_interfaces/ie_infer_async_request_thread_safe_default_test.cpp @@ -56,10 +56,10 @@ class InferRequestThreadSafeDefaultTests : public ::testing::Test { MockTaskExecutor::Ptr mockTaskExecutor; - virtual void TearDown() { + void TearDown() override { } - virtual void SetUp() { + void SetUp() override { InputsDataMap inputsInfo; OutputsDataMap outputsInfo; mockTaskExecutor = make_shared(); diff --git a/inference-engine/tests/unit/inference_engine/cpp_interfaces/ie_memory_state_internal_test.cpp b/inference-engine/tests/unit/inference_engine/cpp_interfaces/ie_memory_state_internal_test.cpp index f35afd674e4f55..dec0f9e9d2979e 100644 --- a/inference-engine/tests/unit/inference_engine/cpp_interfaces/ie_memory_state_internal_test.cpp +++ b/inference-engine/tests/unit/inference_engine/cpp_interfaces/ie_memory_state_internal_test.cpp @@ -30,7 +30,7 @@ class VariableStateTests : public ::testing::Test { SoExecutableNetworkInternal net; IInferRequestInternal::Ptr req; - virtual void SetUp() { + void SetUp() override { mockExeNetworkInternal = make_shared(); mockInferRequestInternal = make_shared(); mockVariableStateInternal = make_shared(); @@ -199,14 +199,12 @@ TEST_F(VariableStateTests, VariableStateCanPropagateGetLastState) { ASSERT_FLOAT_EQ(saver->cbuffer().as()[2], 125); IE_SUPPRESS_DEPRECATED_END } - class VariableStateInternalMockImpl : public IVariableStateInternal { public: VariableStateInternalMockImpl(const char* name) : IVariableStateInternal(name) {} MOCK_METHOD0(Reset, void()); }; - TEST_F(VariableStateTests, VariableStateInternalCanSaveName) { IVariableStateInternal::Ptr pState(new VariableStateInternalMockImpl("VariableStateInternalMockImpl")); ASSERT_STREQ(pState->GetName().c_str(), "VariableStateInternalMockImpl"); diff --git a/inference-engine/tests/unit/inference_engine/cpp_interfaces/ie_plugin_test.cpp b/inference-engine/tests/unit/inference_engine/cpp_interfaces/ie_plugin_test.cpp index 2d26c7bd0e2a7f..0314fdd53c577e 100644 --- a/inference-engine/tests/unit/inference_engine/cpp_interfaces/ie_plugin_test.cpp +++ b/inference-engine/tests/unit/inference_engine/cpp_interfaces/ie_plugin_test.cpp @@ -35,14 +35,14 @@ class InferenceEnginePluginInternalTest : public ::testing::Test { ResponseDesc dsc; StatusCode sts; - virtual void TearDown() { + void TearDown() override { EXPECT_TRUE(Mock::VerifyAndClearExpectations(mock_plugin_impl.get())); EXPECT_TRUE(Mock::VerifyAndClearExpectations(mockIExeNetworkInternal.get())); EXPECT_TRUE(Mock::VerifyAndClearExpectations(mockExeNetworkTS.get())); EXPECT_TRUE(Mock::VerifyAndClearExpectations(mockInferRequestInternal.get())); } - virtual void SetUp() { + void SetUp() override { pluginId = "TEST"; mock_plugin_impl.reset(new MockInferencePluginInternal()); mock_plugin_impl->SetName(pluginId); diff --git a/inference-engine/tests/unit/inference_engine/ie_blob_test.cpp b/inference-engine/tests/unit/inference_engine/ie_blob_test.cpp index e33fcbc42d46ed..0223262a56f842 100644 --- a/inference-engine/tests/unit/inference_engine/ie_blob_test.cpp +++ b/inference-engine/tests/unit/inference_engine/ie_blob_test.cpp @@ -16,10 +16,6 @@ class BlobTests: public ::testing::Test { protected: - virtual void TearDown() {} - - virtual void SetUp() {} - std::shared_ptr createMockAllocator() { return std::shared_ptr(new MockAllocator()); } diff --git a/inference-engine/tests/unit/inference_engine/ie_executable_network_test.cpp b/inference-engine/tests/unit/inference_engine/ie_executable_network_test.cpp index 998620c026da7f..95471c7229111a 100644 --- a/inference-engine/tests/unit/inference_engine/ie_executable_network_test.cpp +++ b/inference-engine/tests/unit/inference_engine/ie_executable_network_test.cpp @@ -42,13 +42,13 @@ class ExecutableNetworkTests : public ::testing::Test { MockIInferencePlugin* mockIPlugin; InferencePlugin plugin; - virtual void TearDown() { + void TearDown() override { mockIExeNet.reset(); exeNetwork = {}; plugin = {}; } - virtual void SetUp() { + void SetUp() override { mockIExeNet = std::make_shared(); auto mockIPluginPtr = std::make_shared(); ON_CALL(*mockIPluginPtr, LoadNetwork(MatcherCast(_), _)).WillByDefault(Return(mockIExeNet)); @@ -113,12 +113,12 @@ class ExecutableNetworkWithIInferReqTests : public ExecutableNetworkTests { protected: std::shared_ptr mockIInferReq_p; - virtual void TearDown() { + void TearDown() override { ExecutableNetworkTests::TearDown(); mockIInferReq_p.reset(); } - virtual void SetUp() { + void SetUp() override { ExecutableNetworkTests::SetUp(); mockIInferReq_p = std::make_shared(); } @@ -143,10 +143,7 @@ class ExecutableNetworkBaseTests : public ::testing::Test { std::shared_ptr exeNetwork; ResponseDesc dsc; - virtual void TearDown() { - } - - virtual void SetUp() { + void SetUp() override { mock_impl.reset(new MockIExecutableNetworkInternal()); exeNetwork = std::make_shared(mock_impl); } diff --git a/inference-engine/tests/unit/inference_engine/ie_plugin_ptr.cpp b/inference-engine/tests/unit/inference_engine/ie_plugin_ptr.cpp index 28e4245a6bce6b..a0d07255ddd80f 100644 --- a/inference-engine/tests/unit/inference_engine/ie_plugin_ptr.cpp +++ b/inference-engine/tests/unit/inference_engine/ie_plugin_ptr.cpp @@ -25,7 +25,7 @@ class PluginTest: public ::testing::Test { return CommonTestUtils::pre + mockEngineName + IE_BUILD_POSTFIX + CommonTestUtils::ext; } - virtual void SetUp() { + void SetUp() override { std::string libraryName = get_mock_engine_name(); sharedObjectLoader.reset(new SharedObjectLoader(libraryName.c_str())); createPluginEngineProxy = make_std_function("CreatePluginEngineProxy"); diff --git a/inference-engine/tests/unit/vpu/CMakeLists.txt b/inference-engine/tests/unit/vpu/CMakeLists.txt index 2743bdcc1391e7..f43866fac26589 100644 --- a/inference-engine/tests/unit/vpu/CMakeLists.txt +++ b/inference-engine/tests/unit/vpu/CMakeLists.txt @@ -19,7 +19,6 @@ addIeTargetTest( $ LINK_LIBRARIES vpu_graph_transformer_test_static - unitTestUtils mvnc ngraph interpreter_backend @@ -29,3 +28,5 @@ addIeTargetTest( VPU MYRIAD ) + +link_system_libraries(${TARGET_NAME} PRIVATE unitTestUtils) diff --git a/inference-engine/tests_deprecated/functional/shared_tests/io_blob_tests/cropResize_tests.hpp b/inference-engine/tests_deprecated/functional/shared_tests/io_blob_tests/cropResize_tests.hpp index 957f47b31563f4..dc592ad64568c9 100644 --- a/inference-engine/tests_deprecated/functional/shared_tests/io_blob_tests/cropResize_tests.hpp +++ b/inference-engine/tests_deprecated/functional/shared_tests/io_blob_tests/cropResize_tests.hpp @@ -126,9 +126,6 @@ class Base : public TestsCommon, public WithParamInterface { ie = PluginCache::get().ie(); } - void TearDown() override { - } - public: std::shared_ptr createSubgraph(const SizeVector &dims, InferenceEngine::Precision prc = InferenceEngine::Precision::FP32) { ngraph::element::Type type = FuncTestUtils::PrecisionUtils::convertIE2nGraphPrc(prc); diff --git a/inference-engine/tests_deprecated/functional/shared_tests/lstm/plg_test.hpp b/inference-engine/tests_deprecated/functional/shared_tests/lstm/plg_test.hpp index 9e5b63d76a3753..18ca8b20b329a4 100644 --- a/inference-engine/tests_deprecated/functional/shared_tests/lstm/plg_test.hpp +++ b/inference-engine/tests_deprecated/functional/shared_tests/lstm/plg_test.hpp @@ -32,7 +32,7 @@ template class PlgTest : public testing::TestWithParam> { protected: std::map config; - virtual void SetUp() { + void SetUp() override { device_name = std::get<0>(this->GetParam()); std::transform(device_name.begin(), device_name.end(), device_name.begin(), [] (char v) { return v == '_' ? ':' : v; }); diff --git a/inference-engine/tests_deprecated/functional/vpu/common/regression/helpers/vpu_case_common.hpp b/inference-engine/tests_deprecated/functional/vpu/common/regression/helpers/vpu_case_common.hpp index b3f3b15b3c7e19..9f4675b1263232 100644 --- a/inference-engine/tests_deprecated/functional/vpu/common/regression/helpers/vpu_case_common.hpp +++ b/inference-engine/tests_deprecated/functional/vpu/common/regression/helpers/vpu_case_common.hpp @@ -83,6 +83,5 @@ class VpuNoRegressionBase : public TestsCommon { std::map config_; //Operations - virtual void SetUp() override = 0; virtual void InitConfig(); }; diff --git a/inference-engine/tests_deprecated/functional/vpu/common/regression/helpers/vpu_raw_results_case.hpp b/inference-engine/tests_deprecated/functional/vpu/common/regression/helpers/vpu_raw_results_case.hpp index db333f6e12fe00..062834152b5fc1 100644 --- a/inference-engine/tests_deprecated/functional/vpu/common/regression/helpers/vpu_raw_results_case.hpp +++ b/inference-engine/tests_deprecated/functional/vpu/common/regression/helpers/vpu_raw_results_case.hpp @@ -49,7 +49,7 @@ class VpuNoRawResultsRegression : public VpuNoRegressionBase, protected: //Operations - virtual void SetUp() override; + void SetUp() override; virtual void InitConfig() override; template diff --git a/inference-engine/tests_deprecated/functional/vpu/vpu_base/myriad_layers_tests.hpp b/inference-engine/tests_deprecated/functional/vpu/vpu_base/myriad_layers_tests.hpp index 4c9b8bdd35dc4d..df358274f7b3d1 100644 --- a/inference-engine/tests_deprecated/functional/vpu/vpu_base/myriad_layers_tests.hpp +++ b/inference-engine/tests_deprecated/functional/vpu/vpu_base/myriad_layers_tests.hpp @@ -56,7 +56,7 @@ class PoolingTest : public myriadLayersTests_nightly, pooling_layer_params, vpu::LayoutPreference, Types...>> { public: - virtual void SetUp() { + void SetUp() override { myriadLayersTests_nightly::SetUp(); auto p = ::testing::WithParamInterface>::GetParam(); _input_tensor = std::get<0>(p); @@ -118,7 +118,7 @@ class GlobalPoolingTest : public myriadLayersTests_nightly, public testing::WithParamInterface { public: - virtual void SetUp() { + void SetUp() override { myriadLayersTests_nightly::SetUp(); auto params = ::testing::WithParamInterface::GetParam(); _input_tensor = std::get<0>(params); @@ -166,7 +166,7 @@ class PoolingTestPad4 : public myriadLayersTests_nightly, public testing::WithParamInterface> { public: - virtual void SetUp() { + void SetUp() override { myriadLayersTests_nightly::SetUp(); auto p = ::testing::WithParamInterface>::GetParam(); _input_tensor = std::get<0>(p); @@ -225,7 +225,7 @@ class ConvolutionTest : public myriadLayersTests_nightly, public testing::WithParamInterface> { public: - virtual void SetUp() { + void SetUp() override { myriadLayersTests_nightly::SetUp(); auto p = ::testing::WithParamInterface>::GetParam(); _input_tensor = std::get<0>(p); @@ -281,7 +281,7 @@ class FCTest : public myriadLayersTests_nightly, public testing::WithParamInterface> { public: - virtual void SetUp() { + void SetUp() override { myriadLayersTests_nightly::SetUp(); auto p = ::testing::WithParamInterface>::GetParam(); _par = std::get<0>(p); diff --git a/inference-engine/tests_deprecated/unit/CMakeLists.txt b/inference-engine/tests_deprecated/unit/CMakeLists.txt index 2526a17bb2198f..651e27c1e800ea 100644 --- a/inference-engine/tests_deprecated/unit/CMakeLists.txt +++ b/inference-engine/tests_deprecated/unit/CMakeLists.txt @@ -29,6 +29,12 @@ if (ENABLE_GNA) list(APPEND TEST_SRC ${GNA_TESTS}) list(APPEND TEST_DEPS GNAPlugin_test_static) + if(SUGGEST_OVERRIDE_SUPPORTED) + set_source_files_properties(engines/gna/graph_tools/graph_copy_tests.cpp + engines/gna/graph_tools/graph_tools_test.cpp + PROPERTIES COMPILE_OPTIONS -Wno-suggest-override) + endif() + # TODO: fix GNA tests if(OFF) set(gna_stub "${CMAKE_CURRENT_SOURCE_DIR}/engines/gna/gna_api_stub.cpp") @@ -55,6 +61,15 @@ endif() if (ENABLE_MYRIAD) include(${XLINK_DIR}/XLink.cmake) + if(SUGGEST_OVERRIDE_SUPPORTED) + set_source_files_properties(engines/vpu/myriad_tests/helpers/myriad_test_case.cpp + engines/vpu/mvnc/watchdog_tests.cpp + engines/vpu/sw_conv_adaptation.cpp + engines/vpu/myriad_tests/myriad_engine_tests.cpp + engines/vpu/myriad_tests/myriad_metrics_tests.cpp + PROPERTIES COMPILE_OPTIONS -Wno-suggest-override) + endif() + file(GLOB VPU_TESTS engines/vpu/*cpp diff --git a/inference-engine/tests_deprecated/unit/engines/vpu/range_tests.cpp b/inference-engine/tests_deprecated/unit/engines/vpu/range_tests.cpp index 69f48016e0d06e..1dd07f75e67f65 100644 --- a/inference-engine/tests_deprecated/unit/engines/vpu/range_tests.cpp +++ b/inference-engine/tests_deprecated/unit/engines/vpu/range_tests.cpp @@ -232,7 +232,7 @@ class VPU_FilterRangeTests: public ::testing::Test { const int count = 10; std::vector vec; - virtual void SetUp() override { + void SetUp() override { for (int i = 0; i < count; ++i) { vec.push_back(i); } diff --git a/inference-engine/tests_deprecated/unit/inference_engine_tests/layers_test.cpp b/inference-engine/tests_deprecated/unit/inference_engine_tests/layers_test.cpp index 915fb37dca3a3b..417dad84470be0 100644 --- a/inference-engine/tests_deprecated/unit/inference_engine_tests/layers_test.cpp +++ b/inference-engine/tests_deprecated/unit/inference_engine_tests/layers_test.cpp @@ -20,12 +20,6 @@ InferenceEngine::Precision defaultPrecision{InferenceEngine::Precision::FP32}; class LayersTests : public ::testing::Test { public: - virtual void TearDown() { - } - - virtual void SetUp() { - } - static InferenceEngine::LayerParams getParamsForLayer(std::string name, std::string type, InferenceEngine::Precision precision) { InferenceEngine::LayerParams params = {}; diff --git a/inference-engine/thirdparty/CMakeLists.txt b/inference-engine/thirdparty/CMakeLists.txt index be9a165cc43af5..deb63c92dd6b99 100644 --- a/inference-engine/thirdparty/CMakeLists.txt +++ b/inference-engine/thirdparty/CMakeLists.txt @@ -6,14 +6,7 @@ if(ENABLE_MYRIAD) add_subdirectory(movidius) endif() -if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=unknown-warning-option -Wno-error=inconsistent-missing-override -Wno-error=pass-failed") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=unknown-warning-option -Wno-error=inconsistent-missing-override -Wno-error=pass-failed") -elseif(CMAKE_COMPILER_IS_GNUCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 9.1) - # On g++ 9.3.0 (Ubuntu 20.04) the ADE library raises "redundant-move" warnings - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error=redundant-move") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=redundant-move") -elseif((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") AND (MSVC_VERSION VERSION_GREATER_EQUAL "1910")) +if((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") AND (MSVC_VERSION VERSION_GREATER_EQUAL "1910")) # 1910 version of Visual Studio 2017 # This flagis needed for enabling SIMD vectorization with command '#pragma omp simd'. # Compilation with '/openmp:experimental' key allow us to enable vectorizatikon capability in MSVC. @@ -30,19 +23,12 @@ if (ENABLE_CLDNN) else() set(CLDNN__INCLUDE_TESTS OFF CACHE BOOL "" FORCE) endif() - if (WIN32) - set(CLDNN__ARCHITECTURE_TARGET "Windows64" CACHE STRING "" FORCE) - elseif (ANDROID) - set(CLDNN__ARCHITECTURE_TARGET "Android64" CACHE STRING "" FORCE) - else() - set(CLDNN__ARCHITECTURE_TARGET "Linux64" CACHE STRING "" FORCE) - endif() set(CLDNN_THREADING "${THREADING}" CACHE STRING "" FORCE) set(GPU_DEBUG_CONFIG OFF CACHE BOOL "Enable debug config feature") add_subdirectory(clDNN) endif() -if(ENABLE_MKL_DNN) +function(ie_add_mkldnn) set(DNNL_ENABLE_CONCURRENT_EXEC ON CACHE BOOL "" FORCE) set(DNNL_ENABLE_PRIMITIVE_CACHE OFF CACHE BOOL "" FORCE) ## TODO: try it later set(DNNL_ENABLE_MAX_CPU_ISA OFF CACHE BOOL "" FORCE) ## TODO: try it later @@ -56,6 +42,18 @@ if(ENABLE_MKL_DNN) set(OpenMP_cmake_included ON) ## to skip "omp simd" inside a code. Lead to some crashes inside NDK LLVM.. endif() + if(CMAKE_COMPILER_IS_GNUCXX) + ie_add_compiler_flags(-Wno-undef) + if(SUGGEST_OVERRIDE_SUPPORTED) + # xbyak compilation fails + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-suggest-override") + endif() + endif() + add_subdirectory(mkl-dnn EXCLUDE_FROM_ALL) add_library(mkldnn ALIAS dnnl) +endfunction() + +if(ENABLE_MKL_DNN) + ie_add_mkldnn() endif() diff --git a/inference-engine/thirdparty/clDNN/CMakeLists.txt b/inference-engine/thirdparty/clDNN/CMakeLists.txt index 7f0eb9f7c27604..830c53f104fd41 100644 --- a/inference-engine/thirdparty/clDNN/CMakeLists.txt +++ b/inference-engine/thirdparty/clDNN/CMakeLists.txt @@ -2,12 +2,6 @@ # SPDX-License-Identifier: Apache-2.0 # -cmake_minimum_required (VERSION 3.1) - -# ====================================================================================================== -# ====================================================================================================== -# ====================================================================================================== - # Name of project (helper constant variable). set(CLDNN__PROJ_NAME "clDNN") @@ -58,18 +52,6 @@ set(CLDNN__CODEGEN_INCDIR "${CLDNN__CODEGEN_DIR}/include") # ============================================ CMAKE OPTIONS =========================================== # ====================================================================================================== -# Include and build: Core of clDNN framework. -set(CLDNN__INCLUDE_CORE ON CACHE BOOL "Include and build: clDNN core.") -mark_as_advanced(CLDNN__INCLUDE_CORE) - -# ====================================================================================================== - -# Include and build: Kernel selector for clDNN framework. -set(CLDNN__INCLUDE_KERNEL_SELECTOR ON CACHE BOOL "Include and build: clDNN kernel selector.") -mark_as_advanced(CLDNN__INCLUDE_KERNEL_SELECTOR) - -# ====================================================================================================== - # Include and build: Tests (unit tests and small acceptance tests) for clDNN framework. set(CLDNN__INCLUDE_TESTS ON CACHE BOOL "Include and build: clDNN framework's tests.") mark_as_advanced(CLDNN__INCLUDE_TESTS) @@ -96,10 +78,6 @@ set(CLDNN_UTILS__RAPIDJSON_INCDIRS "utils/rapidjson" CACHE INTERNAL "Paths to in set(CLDNN_BUILD__PROJ__clDNN "clDNN_lib") set(CLDNN_BUILD__PROJ_LABEL__clDNN "clDNN") -# ================================================ Outputs ============================================= - -set(CLDNN_BUILD__PROJ_OUTPUT_NAME__clDNN "clDNN${CLDNN__OUT_CPU_SUFFIX}") - # ===================================== Include/Link directories ======================================= include_directories( @@ -109,13 +87,11 @@ include_directories( ) # =================================== Link targets and dependencies ==================================== -if(CLDNN__INCLUDE_CORE) - add_subdirectory(src) - add_subdirectory(runtime) -endif() +add_subdirectory(src) +add_subdirectory(runtime) + if(CLDNN__INCLUDE_TESTS) add_subdirectory(tests) endif() -if(CLDNN__INCLUDE_KERNEL_SELECTOR) - add_subdirectory(kernel_selector) -endif() + +add_subdirectory(kernel_selector) diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/CMakeLists.txt b/inference-engine/thirdparty/clDNN/kernel_selector/CMakeLists.txt index adb363d1c789a2..8afd112d9e7f60 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/CMakeLists.txt +++ b/inference-engine/thirdparty/clDNN/kernel_selector/CMakeLists.txt @@ -6,7 +6,6 @@ set(CLDNN_BUILD__PROJ "cldnn_kernel_selector") set(CLDNN_BUILD__PROJ_LABEL "${CLDNN_BUILD__PROJ}") -set(CLDNN_BUILD__PROJ_OUTPUT_NAME "${CLDNN_BUILD__PROJ}${CLDNN__OUT_CPU_SUFFIX}") # ========================================= Source/Header files ======================================== @@ -125,7 +124,6 @@ add_library("${CLDNN_BUILD__PROJ}" STATIC ) set_property(TARGET "${CLDNN_BUILD__PROJ}" PROPERTY PROJECT_LABEL "${CLDNN_BUILD__PROJ_LABEL}") -set_property(TARGET "${CLDNN_BUILD__PROJ}" PROPERTY OUTPUT_NAME "${CLDNN_BUILD__PROJ_OUTPUT_NAME}") if(COMMAND add_cpplint_target) add_cpplint_target("${CLDNN_BUILD__PROJ}_cpplint" FOR_TARGETS "${CLDNN_BUILD__PROJ}") diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/activation/activation_kernel_base.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/activation/activation_kernel_base.h index 48b62f8b1aae77..5958df4e1b0df6 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/activation/activation_kernel_base.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/activation/activation_kernel_base.h @@ -15,7 +15,7 @@ struct activation_params : public base_params { MultiDataTensor inputActivationParams; - virtual ParamsKey GetParamsKey() const { + ParamsKey GetParamsKey() const override { auto k = base_params::GetParamsKey(); if (!inputActivationParams.empty()) { k.EnableActivationAdditionalParamsAsInput(); diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/arg_max_min/arg_max_min_kernel_base.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/arg_max_min/arg_max_min_kernel_base.h index 94f22ed0aa28ba..2ebbe3cf37a28f 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/arg_max_min/arg_max_min_kernel_base.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/arg_max_min/arg_max_min_kernel_base.h @@ -21,7 +21,7 @@ struct arg_max_min_params : public base_params { uint32_t outputs_num = 1; bool values_first = false; - virtual ParamsKey GetParamsKey() const { + ParamsKey GetParamsKey() const override { ParamsKey k = base_params::GetParamsKey(); k.EnableArgMaxMinAxis(argMaxMinAxis); diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/average_unpooling/average_unpooling_kernel_base.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/average_unpooling/average_unpooling_kernel_base.h index 31a6f1c397007b..e76d5c7faaa38e 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/average_unpooling/average_unpooling_kernel_base.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/average_unpooling/average_unpooling_kernel_base.h @@ -16,10 +16,6 @@ struct average_unpooling_params : public base_params { uSize unpoolSize; uSize unpoolStride; - - virtual ParamsKey GetParamsKey() const { - return base_params::GetParamsKey(); - } }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/batch_to_space/batch_to_space_kernel_base.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/batch_to_space/batch_to_space_kernel_base.h index 47aed8cd4ce812..4ad67874ddcf0a 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/batch_to_space/batch_to_space_kernel_base.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/batch_to_space/batch_to_space_kernel_base.h @@ -17,7 +17,6 @@ struct batch_to_space_params : public base_params { DimTensor block_shape; DimTensor crops_begin; DimTensor crops_end; - virtual ParamsKey GetParamsKey() const { return base_params::GetParamsKey(); } }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -42,7 +41,7 @@ class BatchToSpaceKernelBase : public KernelBaseOpenCL { struct DispatchData : public CommonDispatchData {}; protected: - virtual bool Validate(const Params&, const optional_params&) const; + bool Validate(const Params&, const optional_params&) const override; virtual JitConstants GetJitConstants(const batch_to_space_params& params) const; virtual CommonDispatchData SetDefault(const batch_to_space_params& params, const optional_params&) const; KernelsData GetCommonKernelsData(const Params& params, const optional_params&) const; diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/concatenation/concatenation_kernel_base.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/concatenation/concatenation_kernel_base.h index ea7d31bba64cea..8085f8e63625f3 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/concatenation/concatenation_kernel_base.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/concatenation/concatenation_kernel_base.h @@ -18,7 +18,7 @@ struct concatenation_params : public base_params { bool isAligned = true; size_t misalignment = 0; - virtual ParamsKey GetParamsKey() const { + ParamsKey GetParamsKey() const override { auto k = base_params::GetParamsKey(); k.EnableConcatAxis(axis); return k; @@ -32,7 +32,7 @@ struct concatenation_optional_params : optional_params { concatenation_optional_params() : optional_params(KernelType::CONCATENATION) {} bool kernelPerInput = true; - virtual ParamsKey GetSupportedKey() const { + ParamsKey GetSupportedKey() const override { ParamsKey k = optional_params::GetSupportedKey(); if (kernelPerInput) { diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/cum_sum/cum_sum_kernel_base.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/cum_sum/cum_sum_kernel_base.h index 048ad02fab5969..e659d711457f74 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/cum_sum/cum_sum_kernel_base.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/cum_sum/cum_sum_kernel_base.h @@ -17,8 +17,6 @@ struct cum_sum_params : public base_params { CumSumAxis axis; bool exclusive; bool reverse; - - virtual ParamsKey GetParamsKey() const { return base_params::GetParamsKey(); } }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/depth_to_space/depth_to_space_kernel_base.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/depth_to_space/depth_to_space_kernel_base.h index 71cc3d6571aa23..fee66457080a6b 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/depth_to_space/depth_to_space_kernel_base.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/depth_to_space/depth_to_space_kernel_base.h @@ -18,8 +18,6 @@ struct depth_to_space_params : public base_params { , mode(DepthToSpaceMode::DEPTH_FIRST) {} size_t block_size; DepthToSpaceMode mode; - - virtual ParamsKey GetParamsKey() const { return base_params::GetParamsKey(); } }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -45,7 +43,7 @@ class DepthToSpaceKernelBase : public KernelBaseOpenCL { }; protected: - virtual bool Validate(const Params&, const optional_params&) const; + bool Validate(const Params&, const optional_params&) const override; virtual JitConstants GetJitConstants(const depth_to_space_params& params) const; virtual CommonDispatchData SetDefault(const depth_to_space_params& params) const; KernelsData GetCommonKernelsData(const Params& params, const optional_params&) const; diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/eltwise/eltwise_kernel_base.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/eltwise/eltwise_kernel_base.h index ee24f5c3bca3af..1a34a0a97a9ecb 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/eltwise/eltwise_kernel_base.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/eltwise/eltwise_kernel_base.h @@ -75,7 +75,7 @@ struct eltwise_params : public base_params { bool int8_quantization = false; bool broadcast = false; - virtual ParamsKey GetParamsKey() const; + ParamsKey GetParamsKey() const override; }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/embedding_bag/embedding_bag_kernel_ref.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/embedding_bag/embedding_bag_kernel_ref.h index 96018cb19f24b7..cc229b9e05b1e8 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/embedding_bag/embedding_bag_kernel_ref.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/embedding_bag/embedding_bag_kernel_ref.h @@ -16,8 +16,6 @@ struct embedding_bag_params : public base_params { EmbeddingBagType type; int32_t default_index; - - virtual ParamsKey GetParamsKey() const { return base_params::GetParamsKey(); } }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/extract_image_patches/extract_image_patches_kernel_base.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/extract_image_patches/extract_image_patches_kernel_base.h index d348c4229d0bd3..e4fa5228643990 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/extract_image_patches/extract_image_patches_kernel_base.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/extract_image_patches/extract_image_patches_kernel_base.h @@ -20,8 +20,6 @@ struct extract_image_patches_params : public base_params { std::vector strides; std::vector rates; std::string auto_pad; - - virtual ParamsKey GetParamsKey() const { return base_params::GetParamsKey(); } }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/fully_connected/fully_connected_params.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/fully_connected/fully_connected_params.h index 1da610d593f1a7..30b9fccb30d864 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/fully_connected/fully_connected_params.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/fully_connected/fully_connected_params.h @@ -16,7 +16,7 @@ struct fully_connected_params : public weight_bias_params { QuantizationType quantization = QuantizationType::NONE; - virtual ParamsKey GetParamsKey() const { + ParamsKey GetParamsKey() const override { ParamsKey k = weight_bias_params::GetParamsKey(); k.EnableQuantization(quantization); diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/gather/gather_kernel_ref.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/gather/gather_kernel_ref.h index 623912bbdbf49f..4abcfe549e8a4c 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/gather/gather_kernel_ref.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/gather/gather_kernel_ref.h @@ -16,7 +16,6 @@ struct gather_params : public base_params { GatherAxis axis; int64_t batch_dim; bool support_neg_ind; - virtual ParamsKey GetParamsKey() const { return base_params::GetParamsKey(); } }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/gather/gather_nd_kernel_ref.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/gather/gather_nd_kernel_ref.h index ce449e229cbe0a..de1f29ca9772db 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/gather/gather_nd_kernel_ref.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/gather/gather_nd_kernel_ref.h @@ -16,8 +16,6 @@ struct gather_nd_params : public base_params { uint8_t indices_rank; uint8_t batch_dims; - - virtual ParamsKey GetParamsKey() const { return base_params::GetParamsKey(); } }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -33,7 +31,7 @@ class GatherNDKernelRef : public KernelBaseOpenCL { virtual ~GatherNDKernelRef() {} virtual JitConstants GetJitConstants(const gather_nd_params& params) const; virtual CommonDispatchData SetDefault(const gather_nd_params& params, const optional_params&) const; - KernelsData GetKernelsData(const Params& params, const optional_params& options) const; + KernelsData GetKernelsData(const Params& params, const optional_params& options) const override; ParamsKey GetSupportedKey() const override; std::vector GetSupportedFusedOps() const override { return { FusedOpType::QUANTIZE, diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/gemm/gemm_kernel_base.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/gemm/gemm_kernel_base.h index c6139766caa8a5..fcc1206f4e0dde 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/gemm/gemm_kernel_base.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/gemm/gemm_kernel_base.h @@ -21,7 +21,7 @@ struct gemm_params : public base_params { bool transpose_input1; QuantizationType quantization = QuantizationType::NONE; - virtual ParamsKey GetParamsKey() const { + ParamsKey GetParamsKey() const override { ParamsKey k = base_params::GetParamsKey(); k.EnableQuantization(quantization); return k; diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/lrn/lrn_kernel_base.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/lrn/lrn_kernel_base.h index 7fef21147b9847..6f54f9852d1d9f 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/lrn/lrn_kernel_base.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/lrn/lrn_kernel_base.h @@ -21,7 +21,7 @@ struct lrn_params : public base_params { float k = 0.f; uint32_t localSize = 0; - virtual ParamsKey GetParamsKey() const { + ParamsKey GetParamsKey() const override { ParamsKey _k = base_params::GetParamsKey(); _k.EnableLRNMode(normMode); diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/max_unpooling/max_unpooling_kernel_base.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/max_unpooling/max_unpooling_kernel_base.h index 64e638fb07c691..26d7867a3f4dfb 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/max_unpooling/max_unpooling_kernel_base.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/max_unpooling/max_unpooling_kernel_base.h @@ -13,8 +13,6 @@ namespace kernel_selector { //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// struct max_unpooling_params : public base_params { max_unpooling_params() : base_params(KernelType::MAX_UNPOOLING) {} - - virtual ParamsKey GetParamsKey() const { return base_params::GetParamsKey(); } }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/mvn/mvn_kernel_base.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/mvn/mvn_kernel_base.h index de20a0ad54f5a6..420ef7c6a1d63d 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/mvn/mvn_kernel_base.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/mvn/mvn_kernel_base.h @@ -20,7 +20,7 @@ struct mvn_params : public base_params { float epsilon = 0.0f; MVNEpsMode mvnEpsMode = MVNEpsMode::INSIDE_SQRT; - virtual ParamsKey GetParamsKey() const { + ParamsKey GetParamsKey() const override { ParamsKey k = base_params::GetParamsKey(); k.EnableMVNMode(mvnMode); diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/normalize/normalize_kernel_base.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/normalize/normalize_kernel_base.h index 5774e03f4cf823..ce560162d89d41 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/normalize/normalize_kernel_base.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/normalize/normalize_kernel_base.h @@ -18,7 +18,7 @@ struct normalize_params : public base_params { float epsilon = 1e-10f; DataTensor scaleTable; - virtual ParamsKey GetParamsKey() const { + ParamsKey GetParamsKey() const override { ParamsKey k = base_params::GetParamsKey(); k.EnableNormalizeMode(normMode); diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/permute/permute_kernel_base.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/permute/permute_kernel_base.h index cd2a2705ce503c..022c0feeb17aba 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/permute/permute_kernel_base.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/permute/permute_kernel_base.h @@ -15,7 +15,7 @@ class PermuteKernelBase : public KernelBaseOpenCL { virtual ~PermuteKernelBase() {} bool Validate(const Params& p, const optional_params& o) const override; - KernelsData GetKernelsData(const Params& params, const optional_params& options) const; + KernelsData GetKernelsData(const Params& params, const optional_params& options) const override; protected: virtual JitConstants GetJitConstants(const permute_params& params, const CommonDispatchData& dispatchData) const; virtual CommonDispatchData SetDefault(const permute_params& params) const = 0; diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/permute/permute_kernel_ref.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/permute/permute_kernel_ref.h index 097174a8da12fa..bdec3b700cc427 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/permute/permute_kernel_ref.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/permute/permute_kernel_ref.h @@ -19,7 +19,7 @@ class PermuteKernelRef : public PermuteKernelBase { virtual ~PermuteKernelRef() {} bool Validate(const Params& p, const optional_params& o) const override; - KernelsPriority GetKernelsPriority(const Params& params, const optional_params& options) const; + KernelsPriority GetKernelsPriority(const Params& params, const optional_params& options) const override; ParamsKey GetSupportedKey() const override; protected: diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/permute/permute_kernel_tile_8x8_4x4.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/permute/permute_kernel_tile_8x8_4x4.h index 201c042b606425..d70f239e06896e 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/permute/permute_kernel_tile_8x8_4x4.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/permute/permute_kernel_tile_8x8_4x4.h @@ -18,11 +18,11 @@ class PermuteKernel_tile_8x8_4x4 : public PermuteKernelBase { virtual ~PermuteKernel_tile_8x8_4x4() {} bool Validate(const Params& p, const optional_params& o) const override; - KernelsPriority GetKernelsPriority(const Params& params, const optional_params& options) const; + KernelsPriority GetKernelsPriority(const Params& params, const optional_params& options) const override; ParamsKey GetSupportedKey() const override; protected: - JitConstants GetJitConstants(const permute_params& params, const CommonDispatchData& dispatchData) const; - CommonDispatchData SetDefault(const permute_params& params) const; + JitConstants GetJitConstants(const permute_params& params, const CommonDispatchData& dispatchData) const override; + CommonDispatchData SetDefault(const permute_params& params) const override; std::vector GetSupportedFusedOps() const override { return { FusedOpType::ACTIVATION, diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/permute/permute_kernel_tile_8x8_4x4_fsv.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/permute/permute_kernel_tile_8x8_4x4_fsv.h index e2fded954f60bc..fcfe841ccb87af 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/permute/permute_kernel_tile_8x8_4x4_fsv.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/permute/permute_kernel_tile_8x8_4x4_fsv.h @@ -18,11 +18,11 @@ class PermuteKernel_tile_8x8_4x4_fsv : public PermuteKernelBase { virtual ~PermuteKernel_tile_8x8_4x4_fsv() {} bool Validate(const Params& p, const optional_params& o) const override; - KernelsPriority GetKernelsPriority(const Params& params, const optional_params& options) const; + KernelsPriority GetKernelsPriority(const Params& params, const optional_params& options) const override; ParamsKey GetSupportedKey() const override; protected: - JitConstants GetJitConstants(const permute_params& params, const CommonDispatchData& dispatchData) const; - CommonDispatchData SetDefault(const permute_params& params) const; + JitConstants GetJitConstants(const permute_params& params, const CommonDispatchData& dispatchData) const override; + CommonDispatchData SetDefault(const permute_params& params) const override; std::vector GetSupportedFusedOps() const override { return { FusedOpType::ACTIVATION, diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/permute/permute_params.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/permute/permute_params.h index b71e0021d7e54d..0ca5dfa189d039 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/permute/permute_params.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/permute/permute_params.h @@ -15,7 +15,6 @@ struct permute_params : public base_params { permute_params() : base_params(KernelType::PERMUTE) {} std::vector order; - virtual ParamsKey GetParamsKey() const { return base_params::GetParamsKey(); } }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_base.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_base.h index 150c0dd8f1effb..b8ccab7778372f 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_base.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/pooling/pooling_kernel_base.h @@ -22,7 +22,7 @@ struct pooling_params : public base_params { uSize poolStride; uSize poolPad; - virtual ParamsKey GetParamsKey() const { + ParamsKey GetParamsKey() const override { ParamsKey k = base_params::GetParamsKey(); k.EnablePoolType(poolType); diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/quantize/quantize_kernel_params.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/quantize/quantize_kernel_params.h index 685176997aaef7..cbae2f15e3f5c6 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/quantize/quantize_kernel_params.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/quantize/quantize_kernel_params.h @@ -53,7 +53,7 @@ struct quantize_params : public base_params { float out_scale; float out_shift; - virtual ParamsKey GetParamsKey() const { + ParamsKey GetParamsKey() const override { auto k = base_params::GetParamsKey(); if (packed_binary_output) k.EnableQuantizePackedBinaryOutput(); diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/reduce/reduce_kernel_base.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/reduce/reduce_kernel_base.h index 90707e3729cf97..26159fb95f26d4 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/reduce/reduce_kernel_base.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/reduce/reduce_kernel_base.h @@ -17,8 +17,6 @@ struct reduce_params : public base_params { ReduceMode reduceMode; std::vector reduceAxes; int32_t keepDims; - - virtual ParamsKey GetParamsKey() const { return base_params::GetParamsKey(); } }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/region_yolo/region_yolo_kernel_ref.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/region_yolo/region_yolo_kernel_ref.h index e23d2ccc77f424..2c08f29b864f5d 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/region_yolo/region_yolo_kernel_ref.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/region_yolo/region_yolo_kernel_ref.h @@ -21,7 +21,7 @@ struct region_yolo_params : public base_params { uint32_t mask_size; bool do_softmax; - virtual ParamsKey GetParamsKey() const { + ParamsKey GetParamsKey() const override { auto k = base_params::GetParamsKey(); return k; } diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/reorder/reorder_kernel_b_fs_yx_fsv16_fsv32_to_bfyx.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/reorder/reorder_kernel_b_fs_yx_fsv16_fsv32_to_bfyx.h index 82f51daf2ca16f..fc326b28df731c 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/reorder/reorder_kernel_b_fs_yx_fsv16_fsv32_to_bfyx.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/reorder/reorder_kernel_b_fs_yx_fsv16_fsv32_to_bfyx.h @@ -16,7 +16,7 @@ class ReorderKernel_b_fs_yx_fsv16_fsv32_to_bfyx : public ReorderKernelBase { KernelsPriority GetKernelsPriority(const Params& params, const optional_params& options) const override; ParamsKey GetSupportedKey() const override; protected: - JitConstants GetJitConstants(const reorder_params& params) const; - CommonDispatchData SetDefault(const reorder_params& params) const; + JitConstants GetJitConstants(const reorder_params& params) const override; + CommonDispatchData SetDefault(const reorder_params& params) const override; }; } // namespace kernel_selector diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/reorder/reorder_kernel_base.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/reorder/reorder_kernel_base.h index ea2b70330a8ee0..e75e85c38806e2 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/reorder/reorder_kernel_base.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/reorder/reorder_kernel_base.h @@ -26,7 +26,7 @@ struct reorder_params : public base_params { bool winograd = false; bool has_padded_output = false; - virtual ParamsKey GetParamsKey() const { + ParamsKey GetParamsKey() const override { auto k = base_params::GetParamsKey(); if (winograd) { @@ -54,7 +54,7 @@ struct reorder_weights_params : public Params { bool winograd = false; bool rotate_180 = false; - virtual ParamsKey GetParamsKey() const { + ParamsKey GetParamsKey() const override { ParamsKey k; k.EnableInputWeightsType(input.GetDType()); k.EnableOutputWeightsType(output.GetDType()); @@ -95,7 +95,7 @@ class ReorderKernelBase : public KernelBaseOpenCL { virtual JitConstants GetJitConstants(const reorder_params& params) const; virtual DispatchData SetDefault(const reorder_weights_params& params) const; virtual DispatchData SetDefault(const reorder_params& params) const; - virtual bool Validate(const Params&, const optional_params&) const { return true; } + bool Validate(const Params&, const optional_params&) const override { return true; } KernelsData GetCommonKernelsData(const reorder_weights_params& params, const optional_params&) const; KernelsData GetCommonKernelsData(const reorder_params& params, const optional_params&) const; diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/reorder/reorder_kernel_bfyx_to_blocked_format.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/reorder/reorder_kernel_bfyx_to_blocked_format.h index 1e542fec39d228..fe8eb1ccc3202b 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/reorder/reorder_kernel_bfyx_to_blocked_format.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/reorder/reorder_kernel_bfyx_to_blocked_format.h @@ -16,7 +16,7 @@ class ReorderKernel_bfyx_to_blocked_format : public ReorderKernelBase { KernelsPriority GetKernelsPriority(const Params& params, const optional_params& options) const override; ParamsKey GetSupportedKey() const override; protected: - JitConstants GetJitConstants(const reorder_params& params) const; - CommonDispatchData SetDefault(const reorder_params& params) const; + JitConstants GetJitConstants(const reorder_params& params) const override; + CommonDispatchData SetDefault(const reorder_params& params) const override; }; } // namespace kernel_selector diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/reorg_yolo/reorg_yolo_kernel_ref.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/reorg_yolo/reorg_yolo_kernel_ref.h index 8f44907909a338..a3ee80bbad2ccd 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/reorg_yolo/reorg_yolo_kernel_ref.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/reorg_yolo/reorg_yolo_kernel_ref.h @@ -16,7 +16,7 @@ struct reorg_yolo_params : public base_params { uint32_t stride; - virtual ParamsKey GetParamsKey() const { + ParamsKey GetParamsKey() const override { auto k = base_params::GetParamsKey(); return k; } diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/resample/resample_kernel_base.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/resample/resample_kernel_base.h index 4750af8c9bce1c..ea4d1f3425fd48 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/resample/resample_kernel_base.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/resample/resample_kernel_base.h @@ -27,7 +27,7 @@ struct resample_params : public base_params { using AxesAndScales = std::map; AxesAndScales axesAndScales; - virtual ParamsKey GetParamsKey() const { + ParamsKey GetParamsKey() const override { auto k = base_params::GetParamsKey(); k.EnableReampleType(resampleType); return k; diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/reshape/reshape_kernel_ref.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/reshape/reshape_kernel_ref.h index 7ea22a11bd2ad6..b4ee4c32ad0912 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/reshape/reshape_kernel_ref.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/reshape/reshape_kernel_ref.h @@ -12,8 +12,6 @@ namespace kernel_selector { //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// struct reshape_params : public base_params { reshape_params() : base_params(KernelType::RESHAPE) {} - - virtual ParamsKey GetParamsKey() const { return base_params::GetParamsKey(); } }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/reverse_sequence/reverse_sequence_kernel_ref.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/reverse_sequence/reverse_sequence_kernel_ref.h index f2267b19a2e527..33e7ff74953337 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/reverse_sequence/reverse_sequence_kernel_ref.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/reverse_sequence/reverse_sequence_kernel_ref.h @@ -16,8 +16,6 @@ struct reverse_sequence_params : public base_params { int32_t seq_axis; int32_t batch_axis; - - virtual ParamsKey GetParamsKey() const { return base_params::GetParamsKey(); } }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/roi_pooling/roi_pooling_kernel_base.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/roi_pooling/roi_pooling_kernel_base.h index 5afe1835cb65fa..5fde9128e5a972 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/roi_pooling/roi_pooling_kernel_base.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/roi_pooling/roi_pooling_kernel_base.h @@ -26,7 +26,7 @@ struct roi_pooling_params : public base_params { int part_size = 1; int group_size = 1; - virtual ParamsKey GetParamsKey() const { + ParamsKey GetParamsKey() const override { auto k = base_params::GetParamsKey(); if (position_sensitive) { k.EnablePositionSensitivePooling(); diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/scatter_update/scatter_elements_update_kernel_ref.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/scatter_update/scatter_elements_update_kernel_ref.h index 4bb42a126539a8..93b894b18cbac1 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/scatter_update/scatter_elements_update_kernel_ref.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/scatter_update/scatter_elements_update_kernel_ref.h @@ -14,8 +14,6 @@ struct scatter_elements_update_params : public base_params { scatter_elements_update_params() : base_params(KernelType::SCATTER_ELEMENTS_UPDATE), axis(ScatterUpdateAxis::BATCH) {} ScatterUpdateAxis axis; - - virtual ParamsKey GetParamsKey() const { return base_params::GetParamsKey(); } }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/scatter_update/scatter_nd_update_kernel_ref.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/scatter_update/scatter_nd_update_kernel_ref.h index 378399c0b4c1dc..c90311de4c7f06 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/scatter_update/scatter_nd_update_kernel_ref.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/scatter_update/scatter_nd_update_kernel_ref.h @@ -14,8 +14,6 @@ struct scatter_nd_update_params : public base_params { scatter_nd_update_params() : base_params(KernelType::SCATTER_ND_UPDATE), indices_rank(0) {} size_t indices_rank; - - virtual ParamsKey GetParamsKey() const { return base_params::GetParamsKey(); } }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/scatter_update/scatter_update_kernel_ref.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/scatter_update/scatter_update_kernel_ref.h index 70b9793176b1e4..69415771dc6da5 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/scatter_update/scatter_update_kernel_ref.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/scatter_update/scatter_update_kernel_ref.h @@ -14,8 +14,6 @@ struct scatter_update_params : public base_params { scatter_update_params() : base_params(KernelType::SCATTER_UPDATE), axis(ScatterUpdateAxis::BATCH) {} ScatterUpdateAxis axis; - - virtual ParamsKey GetParamsKey() const { return base_params::GetParamsKey(); } }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/select/select_kernel_base.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/select/select_kernel_base.h index 68ab0dc5034256..fcf38522780ade 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/select/select_kernel_base.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/select/select_kernel_base.h @@ -12,8 +12,6 @@ namespace kernel_selector { //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// struct select_params : public base_params { select_params() : base_params(KernelType::SELECT) {} - - virtual ParamsKey GetParamsKey() const { return base_params::GetParamsKey(); } }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/shuffle_channels/shuffle_channels_kernel_ref.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/shuffle_channels/shuffle_channels_kernel_ref.h index 62335db369a93a..95b611652a0267 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/shuffle_channels/shuffle_channels_kernel_ref.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/shuffle_channels/shuffle_channels_kernel_ref.h @@ -15,8 +15,6 @@ struct shuffle_channels_params : public base_params { int32_t group; int32_t axis; - - virtual ParamsKey GetParamsKey() const { return base_params::GetParamsKey(); } }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/softmax/softmax_kernel_base.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/softmax/softmax_kernel_base.h index 3409abbc047c5e..60398b410840c1 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/softmax/softmax_kernel_base.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/softmax/softmax_kernel_base.h @@ -16,7 +16,7 @@ struct softmax_params : public base_params { SoftmaxDim dim = SoftmaxDim::FEATURE; - virtual ParamsKey GetParamsKey() const { + ParamsKey GetParamsKey() const override { auto k = base_params::GetParamsKey(); k.EnableSoftmaxDim(dim); return k; @@ -48,7 +48,7 @@ class SoftmaxKernelBase : public KernelBaseOpenCL { }; protected: - virtual bool Validate(const Params&, const optional_params&) const; + bool Validate(const Params&, const optional_params&) const override; virtual JitConstants GetJitConstants(const softmax_params& params, DispatchData dispatchData) const; virtual DispatchData SetDefault(const softmax_params& params, const optional_params& optParams) const; KernelsData GetCommonKernelsData(const Params& params, const optional_params& optParams) const; diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/space_to_batch/space_to_batch_kernel_base.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/space_to_batch/space_to_batch_kernel_base.h index ea63e56aafe27a..1225e6a2e19e0d 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/space_to_batch/space_to_batch_kernel_base.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/space_to_batch/space_to_batch_kernel_base.h @@ -17,8 +17,6 @@ struct space_to_batch_params : public base_params { DimTensor block_shape; DimTensor pads_begin; DimTensor pads_end; - - virtual ParamsKey GetParamsKey() const { return base_params::GetParamsKey(); } }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -43,7 +41,7 @@ class SpaceToBatchKernelBase : public KernelBaseOpenCL { struct DispatchData : public CommonDispatchData {}; protected: - virtual bool Validate(const Params&, const optional_params&) const; + bool Validate(const Params&, const optional_params&) const override; virtual JitConstants GetJitConstants(const space_to_batch_params& params) const; virtual CommonDispatchData SetDefault(const space_to_batch_params& params, const optional_params&) const; KernelsData GetCommonKernelsData(const Params& params, const optional_params&) const; diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/space_to_depth/space_to_depth_kernel_ref.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/space_to_depth/space_to_depth_kernel_ref.h index cb5c0f2fd56135..a0f16175237f86 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/space_to_depth/space_to_depth_kernel_ref.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/space_to_depth/space_to_depth_kernel_ref.h @@ -17,8 +17,6 @@ struct space_to_depth_params : public base_params { SpaceToDepthMode depth_mode; size_t block_size; - - virtual ParamsKey GetParamsKey() const { return base_params::GetParamsKey(); } }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/strided_slice/strided_slice_kernel_ref.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/strided_slice/strided_slice_kernel_ref.h index b28785b14f475a..25e4b4bc3d612d 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/strided_slice/strided_slice_kernel_ref.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/strided_slice/strided_slice_kernel_ref.h @@ -20,8 +20,6 @@ struct strided_slice_params : public base_params { std::vector ellipsis_mask; std::vector new_axis_mask; std::vector shrink_axis_mask; - - virtual ParamsKey GetParamsKey() const { return base_params::GetParamsKey(); } }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/tile/tile_kernel_ref.h b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/tile/tile_kernel_ref.h index ad72633220d235..3e12a2bbeeca72 100644 --- a/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/tile/tile_kernel_ref.h +++ b/inference-engine/thirdparty/clDNN/kernel_selector/core/actual_kernels/tile/tile_kernel_ref.h @@ -12,8 +12,6 @@ namespace kernel_selector { //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// struct tile_params : public base_params { tile_params() : base_params(KernelType::TILE) {} - - virtual ParamsKey GetParamsKey() const { return base_params::GetParamsKey(); } }; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/inference-engine/thirdparty/clDNN/runtime/CMakeLists.txt b/inference-engine/thirdparty/clDNN/runtime/CMakeLists.txt index fda165b5953411..7a823a65121067 100644 --- a/inference-engine/thirdparty/clDNN/runtime/CMakeLists.txt +++ b/inference-engine/thirdparty/clDNN/runtime/CMakeLists.txt @@ -6,7 +6,6 @@ set(CLDNN_BUILD__PROJ "cldnn_runtime") set(CLDNN_BUILD__PROJ_LABEL "${CLDNN_BUILD__PROJ}") -set(CLDNN_BUILD__PROJ_OUTPUT_NAME "${CLDNN_BUILD__PROJ}${CLDNN__OUT_CPU_SUFFIX}") # ========================================= Source/Header files ======================================== @@ -48,7 +47,6 @@ add_library("${CLDNN_BUILD__PROJ}" STATIC ) set_property(TARGET "${CLDNN_BUILD__PROJ}" PROPERTY PROJECT_LABEL "${CLDNN_BUILD__PROJ_LABEL}") -set_property(TARGET "${CLDNN_BUILD__PROJ}" PROPERTY OUTPUT_NAME "${CLDNN_BUILD__PROJ_OUTPUT_NAME}") if(COMMAND add_cpplint_target) add_cpplint_target("${CLDNN_BUILD__PROJ}_cpplint" FOR_TARGETS "${CLDNN_BUILD__PROJ}") diff --git a/inference-engine/thirdparty/clDNN/src/CMakeLists.txt b/inference-engine/thirdparty/clDNN/src/CMakeLists.txt index 2dff45a2007242..52a75de3ce8427 100644 --- a/inference-engine/thirdparty/clDNN/src/CMakeLists.txt +++ b/inference-engine/thirdparty/clDNN/src/CMakeLists.txt @@ -6,7 +6,6 @@ set(CLDNN_BUILD__PROJ "${CLDNN_BUILD__PROJ__clDNN}") set(CLDNN_BUILD__PROJ_LABEL "${CLDNN_BUILD__PROJ_LABEL__clDNN}") -set(CLDNN_BUILD__PROJ_OUTPUT_NAME "${CLDNN_BUILD__PROJ_OUTPUT_NAME__clDNN}") # ========================================= Source/Header files ======================================== @@ -104,7 +103,6 @@ add_library("${CLDNN_BUILD__PROJ}" STATIC ${__CLDNN_AllSources} ) set_property(TARGET "${CLDNN_BUILD__PROJ}" PROPERTY PROJECT_LABEL "${CLDNN_BUILD__PROJ_LABEL}") -set_property(TARGET "${CLDNN_BUILD__PROJ}" PROPERTY OUTPUT_NAME "${CLDNN_BUILD__PROJ_OUTPUT_NAME}") target_link_libraries("${CLDNN_BUILD__PROJ}" PUBLIC OpenCL diff --git a/inference-engine/thirdparty/clDNN/src/impls/cpu/non_max_suppression.cpp b/inference-engine/thirdparty/clDNN/src/impls/cpu/non_max_suppression.cpp index bbba5d888cc589..66ed53df586598 100644 --- a/inference-engine/thirdparty/clDNN/src/impls/cpu/non_max_suppression.cpp +++ b/inference-engine/thirdparty/clDNN/src/impls/cpu/non_max_suppression.cpp @@ -381,7 +381,7 @@ struct non_max_suppression_impl : typed_primitive_impl { non_max_suppression_impl() : parent(kernel_selector::weights_reorder_params(), "non_max_suppression_impl") {} - virtual event::ptr execute_impl(const std::vector& event, typed_primitive_inst& instance) { + event::ptr execute_impl(const std::vector& event, typed_primitive_inst& instance) override { for (auto e : event) { e->wait(); } diff --git a/inference-engine/thirdparty/clDNN/tests/CMakeLists.txt b/inference-engine/thirdparty/clDNN/tests/CMakeLists.txt index 461f7446b099b3..9d865973a0442d 100644 --- a/inference-engine/thirdparty/clDNN/tests/CMakeLists.txt +++ b/inference-engine/thirdparty/clDNN/tests/CMakeLists.txt @@ -2,11 +2,15 @@ # SPDX-License-Identifier: Apache-2.0 # +# TODO: fix in tests +if(SUGGEST_OVERRIDE_SUPPORTED) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-suggest-override") +endif() + # ========================================= Name / Output settings ===================================== set(CLDNN_BUILD__PROJ "clDNN_unit_tests64") set(CLDNN_BUILD__PROJ_LABEL "${CLDNN_BUILD__PROJ}") -set(CLDNN_BUILD__PROJ_OUTPUT_NAME "${CLDNN_BUILD__PROJ}${CLDNN__OUT_CPU_SUFFIX}") # ========================================= Source/Header files ======================================== @@ -96,10 +100,10 @@ if(COMMAND set_ie_threading_interface_for) endif() set_property(TARGET "${CLDNN_BUILD__PROJ}" PROPERTY PROJECT_LABEL "${CLDNN_BUILD__PROJ_LABEL}") -set_property(TARGET "${CLDNN_BUILD__PROJ}" PROPERTY OUTPUT_NAME "${CLDNN_BUILD__PROJ_OUTPUT_NAME}") # Set library dependencies -target_link_libraries("${CLDNN_BUILD__PROJ}" PRIVATE "${CLDNN_BUILD__PROJ__clDNN}" OpenCL gtest gmock) +target_link_libraries("${CLDNN_BUILD__PROJ}" PRIVATE + "${CLDNN_BUILD__PROJ__clDNN}" OpenCL gtest gtest_main gmock) if(WIN32) target_link_libraries("${CLDNN_BUILD__PROJ}" PRIVATE setupapi) diff --git a/inference-engine/thirdparty/clDNN/tests/main.cpp b/inference-engine/thirdparty/clDNN/tests/main.cpp deleted file mode 100644 index 6fc0619701ff71..00000000000000 --- a/inference-engine/thirdparty/clDNN/tests/main.cpp +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (C) 2018-2021 Intel Corporation -// SPDX-License-Identifier: Apache-2.0 -// - -#include "gtest/gtest.h" - -int main( int argc, char* argv[ ] ) -{ - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} \ No newline at end of file diff --git a/inference-engine/thirdparty/clDNN/tests/module_tests/test_uqr_distribution.cpp b/inference-engine/thirdparty/clDNN/tests/module_tests/test_uqr_distribution.cpp index 1a87db1cab38b3..b878a32d4e859a 100644 --- a/inference-engine/thirdparty/clDNN/tests/module_tests/test_uqr_distribution.cpp +++ b/inference-engine/thirdparty/clDNN/tests/module_tests/test_uqr_distribution.cpp @@ -32,10 +32,6 @@ struct uniform_quantized_real_distribution_test : ::testing::Test using uqr_dist_param = typename uqr_dist::param_type; /// @brief Expected result_type of uniform_quantized_real_distribution. using expected_uqr_dist_rt = typename std::conditional::value, RealType, float>::type; - - void SetUp() override {} - - void TearDown() override {} }; using uniform_quantized_real_distribution_test_types = ::testing::Types; diff --git a/inference-engine/thirdparty/clDNN/tests/test_cases/binary_convolution_gpu_test.cpp b/inference-engine/thirdparty/clDNN/tests/test_cases/binary_convolution_gpu_test.cpp index d0b0504cb77174..84c37330b5b73d 100644 --- a/inference-engine/thirdparty/clDNN/tests/test_cases/binary_convolution_gpu_test.cpp +++ b/inference-engine/thirdparty/clDNN/tests/test_cases/binary_convolution_gpu_test.cpp @@ -170,7 +170,7 @@ void compute_ref_conv_bin(const cldnn::memory::ptr src, } class binary_convolution_test : public ::testing::TestWithParam { - void SetUp() { + void SetUp() override { std::cout << GetParam() << std::endl; ASSERT_TRUE(GetParam().isConsistent()); } diff --git a/inference-engine/thirdparty/clDNN/tests/test_cases/convolution_gpu_test.cpp b/inference-engine/thirdparty/clDNN/tests/test_cases/convolution_gpu_test.cpp index 6ea4ff706607fe..d2b37886fc99c4 100644 --- a/inference-engine/thirdparty/clDNN/tests/test_cases/convolution_gpu_test.cpp +++ b/inference-engine/thirdparty/clDNN/tests/test_cases/convolution_gpu_test.cpp @@ -8107,7 +8107,7 @@ class convolution_scale_random_test : public convolution_random_test_base; - virtual primitive_id output_primitive_id() const { + primitive_id output_primitive_id() const override { return "scale_wa_reorder"; } @@ -8454,11 +8454,11 @@ class convolution_test : public tests::generic_test { return all_test_params; } - virtual bool is_format_supported(cldnn::format format) { + bool is_format_supported(cldnn::format format) override { return ((format == cldnn::format::bfyx) || (format == cldnn::format::yxfb)); } - virtual cldnn::tensor get_expected_output_tensor() { + cldnn::tensor get_expected_output_tensor() override { auto convolution = std::static_pointer_cast(layer_params); tensor input_size = generic_params->input_layouts[0].size; tensor dilation = convolution->dilation; @@ -8477,7 +8477,7 @@ class convolution_test : public tests::generic_test { return cldnn::tensor(input_size.batch[0], output_features, output_size_x, output_size_y); } - virtual void prepare_input_for_test(std::vector& inputs) { + void prepare_input_for_test(std::vector& inputs) override { if (generic_params->data_type == data_types::f32) { prepare_input_for_test_typed(inputs); } else { @@ -8610,7 +8610,7 @@ class convolution_test : public tests::generic_test { return output; } - virtual memory::ptr generate_reference(const std::vector& inputs) { + memory::ptr generate_reference(const std::vector& inputs) override { if (generic_params->data_type == data_types::f32) { return generate_reference_typed(inputs); } else { diff --git a/inference-engine/thirdparty/clDNN/tests/test_cases/depth_concatenate_gpu_test.cpp b/inference-engine/thirdparty/clDNN/tests/test_cases/depth_concatenate_gpu_test.cpp index 19b147fbf93db4..d5d829b04c705f 100644 --- a/inference-engine/thirdparty/clDNN/tests/test_cases/depth_concatenate_gpu_test.cpp +++ b/inference-engine/thirdparty/clDNN/tests/test_cases/depth_concatenate_gpu_test.cpp @@ -1175,11 +1175,11 @@ class depth_concatenate_test : public tests::generic_test { return res; } - virtual bool is_format_supported(cldnn::format format) override { + bool is_format_supported(cldnn::format format) override { return format == cldnn::format::bfyx; } - virtual cldnn::tensor get_expected_output_tensor() override { + cldnn::tensor get_expected_output_tensor() override { cldnn::tensor::value_type features = 0; for (const auto& t : generic_params->input_layouts) { features += t.size.feature[0]; diff --git a/inference-engine/thirdparty/clDNN/tests/test_cases/pooling_gpu_test.cpp b/inference-engine/thirdparty/clDNN/tests/test_cases/pooling_gpu_test.cpp index 3169dc5467bbec..b596cb87995700 100644 --- a/inference-engine/thirdparty/clDNN/tests/test_cases/pooling_gpu_test.cpp +++ b/inference-engine/thirdparty/clDNN/tests/test_cases/pooling_gpu_test.cpp @@ -3500,7 +3500,7 @@ class pooling_test : public tests::generic_test return generic_test::generate_generic_test_params(all_generic_params); } - virtual bool is_format_supported(cldnn::format format) + bool is_format_supported(cldnn::format format) override { if ((format == cldnn::format::yxfb) || (format == cldnn::format::bfyx) || (format == cldnn::format::bfyx)) { @@ -3509,7 +3509,7 @@ class pooling_test : public tests::generic_test return false; } - virtual void prepare_input_for_test(std::vector& inputs) + void prepare_input_for_test(std::vector& inputs) override { if (generic_params->data_type == data_types::f32) { @@ -3532,7 +3532,7 @@ class pooling_test : public tests::generic_test set_values(input, input_rnd_vec); } - virtual cldnn::tensor get_expected_output_tensor() + cldnn::tensor get_expected_output_tensor() override { auto pooling = std::static_pointer_cast(layer_params); @@ -3733,7 +3733,7 @@ class pooling_test : public tests::generic_test return output; } - virtual memory::ptr generate_reference(const std::vector& inputs) + memory::ptr generate_reference(const std::vector& inputs) override { if (generic_params->data_type == data_types::f32) { diff --git a/inference-engine/thirdparty/clDNN/tests/test_cases/reorder_gpu_test.cpp b/inference-engine/thirdparty/clDNN/tests/test_cases/reorder_gpu_test.cpp index fbaa020500b54c..3070fc902863fe 100644 --- a/inference-engine/thirdparty/clDNN/tests/test_cases/reorder_gpu_test.cpp +++ b/inference-engine/thirdparty/clDNN/tests/test_cases/reorder_gpu_test.cpp @@ -2315,7 +2315,7 @@ class reorder_test : public tests::generic_test return all_test_params; } - virtual bool is_format_supported(cldnn::format format) + bool is_format_supported(cldnn::format format) override { return ( (format == cldnn::format::yxfb) || (format == cldnn::format::byxf) || @@ -2348,7 +2348,7 @@ class reorder_test : public tests::generic_test return output; } - virtual memory::ptr generate_reference(const std::vector& inputs) + memory::ptr generate_reference(const std::vector& inputs) override { if (generic_params->data_type == data_types::f32) { diff --git a/inference-engine/thirdparty/clDNN/tests/test_cases/softmax_gpu_test.cpp b/inference-engine/thirdparty/clDNN/tests/test_cases/softmax_gpu_test.cpp index 40ca8c5a9a06bd..1cf9f40ad8a00a 100644 --- a/inference-engine/thirdparty/clDNN/tests/test_cases/softmax_gpu_test.cpp +++ b/inference-engine/thirdparty/clDNN/tests/test_cases/softmax_gpu_test.cpp @@ -846,7 +846,7 @@ class softmax_test : public tests::generic_test { } - virtual void SetUp() override + void SetUp() override { max_ulps_diff_allowed = 6; } @@ -872,7 +872,7 @@ class softmax_test : public tests::generic_test return generic_test::generate_generic_test_params(all_generic_params); } - virtual bool is_format_supported(cldnn::format format) override + bool is_format_supported(cldnn::format format) override { return format == cldnn::format::yxfb || diff --git a/model-optimizer/unit_tests/mock_mo_frontend/mock_mo_ngraph_frontend/CMakeLists.txt b/model-optimizer/unit_tests/mock_mo_frontend/mock_mo_ngraph_frontend/CMakeLists.txt index 139e6bac64a50d..96c60d92ed8771 100644 --- a/model-optimizer/unit_tests/mock_mo_frontend/mock_mo_ngraph_frontend/CMakeLists.txt +++ b/model-optimizer/unit_tests/mock_mo_frontend/mock_mo_ngraph_frontend/CMakeLists.txt @@ -15,7 +15,6 @@ add_library(${TARGET_FE_NAME} SHARED ${LIBRARY_SRC} ${LIBRARY_HEADERS}) target_include_directories(${TARGET_FE_NAME} PRIVATE ".") -target_include_directories(${TARGET_FE_NAME} PRIVATE ${FRONTEND_INCLUDE_PATH} ${NGRAPH_INCLUDE_PATH}) target_link_libraries(${TARGET_FE_NAME} PRIVATE frontend_manager) target_link_libraries(${TARGET_FE_NAME} PUBLIC ngraph PRIVATE ngraph::builder) diff --git a/ngraph/CMakeLists.txt b/ngraph/CMakeLists.txt index ede1e561ed2fb3..6ef6b3cdeb6b05 100644 --- a/ngraph/CMakeLists.txt +++ b/ngraph/CMakeLists.txt @@ -2,153 +2,35 @@ # SPDX-License-Identifier: Apache-2.0 # +if(ENABLE_LTO) + set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ON) +endif() + set(NGRAPH_INCLUDE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/core/include ) -set(FRONTEND_INCLUDE_PATH - ${CMAKE_CURRENT_SOURCE_DIR}/frontend/frontend_manager/include -) - -# Will be used by frontends to construct frontend-specific source location paths -set(FRONTEND_BASE_PATH - ${CMAKE_CURRENT_SOURCE_DIR}/frontend -) - project (ngraph) -option(NGRAPH_UNIT_TEST_ENABLE "Control the building of unit tests" ON) -option(NGRAPH_UNIT_TEST_BACKENDS_ENABLE "Control the building of unit tests using backends" ON) -option(NGRAPH_DEBUG_ENABLE "Enable output for NGRAPH_DEBUG statements" OFF) -option(NGRAPH_ONNX_IMPORT_ENABLE "Enable ONNX importer" OFF) -option(NGRAPH_PDPD_FRONTEND_ENABLE "Enable PaddlePaddle FrontEnd" OFF) -option(NGRAPH_USE_PROTOBUF_LITE "Compiles and links with protobuf-lite" OFF) - -if (NGRAPH_ONNX_IMPORT_ENABLE OR NGRAPH_PDPD_FRONTEND_ENABLE) - option(NGRAPH_USE_SYSTEM_PROTOBUF "Use system provided Protobuf shared object" OFF) -endif() - -message(STATUS "NGRAPH_DEBUG_ENABLE: ${NGRAPH_DEBUG_ENABLE}") -message(STATUS "NGRAPH_ONNX_IMPORT_ENABLE: ${NGRAPH_ONNX_IMPORT_ENABLE}") -message(STATUS "NGRAPH_PDPD_FRONTEND_ENABLE: ${NGRAPH_PDPD_FRONTEND_ENABLE}") -message(STATUS "NGRAPH_USE_PROTOBUF_LITE: ${NGRAPH_USE_PROTOBUF_LITE}") -message(STATUS "NGRAPH_UNIT_TEST_ENABLE: ${NGRAPH_UNIT_TEST_ENABLE}") -message(STATUS "NGRAPH_UNIT_TEST_BACKENDS_ENABLE: ${NGRAPH_UNIT_TEST_BACKENDS_ENABLE}") - #----------------------------------------------------------------------------------------------- # Installation logic... #----------------------------------------------------------------------------------------------- -if (LINUX) - include(GNUInstallDirs) -else() - set(CMAKE_INSTALL_BINDIR "bin" CACHE STRING "User executables (bin)") - set(CMAKE_INSTALL_LIBDIR "lib" CACHE STRING "Object code libraries (lib)") - set(CMAKE_INSTALL_INCLUDEDIR "include" CACHE STRING "C header files (include)") -endif() - -# Destinations -set(NGRAPH_INSTALL_LIB "deployment_tools/ngraph/${CMAKE_INSTALL_LIBDIR}") -set(NGRAPH_INSTALL_INCLUDE "deployment_tools/ngraph/${CMAKE_INSTALL_INCLUDEDIR}") -set(NGRAPH_INSTALL_BIN "deployment_tools/ngraph/${CMAKE_INSTALL_BINDIR}") - -#----------------------------------------------------------------------------------------------- -# Compile Flags for nGraph... -#----------------------------------------------------------------------------------------------- - -if (WIN32) - string(REPLACE "/W3" "/W0" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") -endif() +set(NGRAPH_INSTALL_LIB "deployment_tools/ngraph/lib") +set(NGRAPH_INSTALL_INCLUDE "deployment_tools/ngraph/include") +set(NGRAPH_TARGETS_FILE "${CMAKE_CURRENT_BINARY_DIR}/ngraphTargets.cmake") add_definitions(-DPROJECT_ROOT_DIR="${CMAKE_CURRENT_SOURCE_DIR}") -#----------------------------------------------------------------------------------------------- -# Print Global Options -#----------------------------------------------------------------------------------------------- -message(STATUS "Compile Flags: ${CMAKE_CXX_FLAGS}") -message(STATUS "Shared Link Flags: ${CMAKE_SHARED_LINKER_FLAGS}") -message(STATUS "CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE}") -message(STATUS "CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG}") - #----------------------------------------------------------------------------------------------- # External projects install directory #----------------------------------------------------------------------------------------------- -# Build destination directory for nGraph binaries and tools. - -if(NOT DEFINED EXTERNAL_PROJECTS_ROOT) - set(EXTERNAL_PROJECTS_ROOT ${CMAKE_CURRENT_BINARY_DIR}) -endif() - add_subdirectory(core) -# -# Export targets -# - -set(NGRAPH_TARGETS_FILE "${CMAKE_CURRENT_BINARY_DIR}/ngraphTargets.cmake") -export(TARGETS ngraph NAMESPACE ngraph:: FILE "${NGRAPH_TARGETS_FILE}") - -if(BUILD_SHARED_LIBS) - install(EXPORT ngraphTargets - FILE ngraphTargets.cmake - NAMESPACE ngraph:: - DESTINATION "deployment_tools/ngraph/cmake" - COMPONENT ngraph_dev) -endif() - -configure_package_config_file(${OpenVINO_SOURCE_DIR}/cmake/templates/ngraphConfig.cmake.in - ${CMAKE_CURRENT_BINARY_DIR}/ngraphConfig.cmake - INSTALL_DESTINATION cmake) - -write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/ngraphConfigVersion.cmake - VERSION ${IE_VERSION_MAJOR}.${IE_VERSION_MINOR}.${IE_VERSION_PATCH} - COMPATIBILITY SameMajorVersion) - -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ngraphConfig.cmake - ${CMAKE_CURRENT_BINARY_DIR}/ngraphConfigVersion.cmake - DESTINATION "deployment_tools/ngraph/cmake" - COMPONENT ngraph_dev) - -if (NGRAPH_ONNX_IMPORT_ENABLE OR NGRAPH_PDPD_FRONTEND_ENABLE) - if (MSVC) - # When we build dll libraries. These flags make sure onnx and protobuf build with /MD, not /MT. - # These two options can't be mixed, because they requires link two imcompatiable runtime. - set(protobuf_WITH_ZLIB OFF CACHE BOOL "" FORCE) - - if(NOT DEFINED ONNX_USE_MSVC_STATIC_RUNTIME) - set(ONNX_USE_MSVC_STATIC_RUNTIME OFF) - endif() - if(NOT DEFINED protobuf_MSVC_STATIC_RUNTIME) - set(protobuf_MSVC_STATIC_RUNTIME OFF CACHE BOOL "Link protobuf to static runtime libraries" FORCE) - endif() - endif() - - set(BEFORE_ONNX_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS}) - set(BUILD_SHARED_LIBS OFF) - - if (NOT NGRAPH_USE_SYSTEM_PROTOBUF) - add_subdirectory(${CMAKE_SOURCE_DIR}/thirdparty/protobuf ${CMAKE_BINARY_DIR}/_deps/protobuf) - else() - find_package(Protobuf REQUIRED) - endif() - - if (NGRAPH_ONNX_IMPORT_ENABLE) - # target onnx_proto will be shared lib, onnx static - add_subdirectory(${CMAKE_SOURCE_DIR}/thirdparty/onnx ${CMAKE_BINARY_DIR}/_deps/onnx) - if (TARGET ext_protobuf) - add_dependencies(onnx ext_protobuf) - endif() - endif() - - set(BUILD_SHARED_LIBS ${BEFORE_ONNX_BUILD_SHARED_LIBS}) - unset(BEFORE_ONNX_BUILD_SHARED_LIBS) -endif() - add_subdirectory(frontend) - add_subdirectory(test) -if (ENABLE_PYTHON) +if(ENABLE_PYTHON) add_subdirectory(python) endif() diff --git a/ngraph/core/CMakeLists.txt b/ngraph/core/CMakeLists.txt index 76ef988300479b..c6ee2a2a2709de 100644 --- a/ngraph/core/CMakeLists.txt +++ b/ngraph/core/CMakeLists.txt @@ -75,27 +75,46 @@ target_include_directories(ngraph PUBLIC $& m, const ngraph::recurrent_graph_rewrite_callback& callback); - virtual bool run_on_function(std::shared_ptr f); + bool run_on_function(std::shared_ptr f) override; private: size_t m_num_iters; diff --git a/ngraph/core/reference/CMakeLists.txt b/ngraph/core/reference/CMakeLists.txt index ef4a764ab3ba43..99c82bf32bbb93 100644 --- a/ngraph/core/reference/CMakeLists.txt +++ b/ngraph/core/reference/CMakeLists.txt @@ -25,12 +25,16 @@ if(COMMAND ie_faster_build) ) endif() +if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + target_compile_options(${TARGET_NAME} PUBLIC /wd4146) +endif() + target_compile_definitions(${TARGET_NAME} PRIVATE XBYAK_NO_OP_NAMES XBYAK64) # Defines macro in C++ to load backend plugin target_include_directories(${TARGET_NAME} PUBLIC ${REF_IMPL_INCLUDE_DIR} ${NGRAPH_INCLUDE_PATH}) -target_link_libraries(${TARGET_NAME} PRIVATE xbyak) +link_system_libraries(${TARGET_NAME} PRIVATE xbyak) add_clang_format_target(${TARGET_NAME}_clang FOR_TARGETS ${TARGET_NAME}) diff --git a/ngraph/frontend/onnx/onnx_common/CMakeLists.txt b/ngraph/frontend/onnx/onnx_common/CMakeLists.txt index f1046b3ab0d433..ef1a534140048a 100644 --- a/ngraph/frontend/onnx/onnx_common/CMakeLists.txt +++ b/ngraph/frontend/onnx/onnx_common/CMakeLists.txt @@ -29,7 +29,7 @@ target_include_directories(${TARGET_NAME} PUBLIC $) target_link_libraries(${TARGET_NAME} PRIVATE ngraph) -target_link_libraries(${TARGET_NAME} PUBLIC onnx_proto onnx ${Protobuf_LIBRARIES}) +link_system_libraries(${TARGET_NAME} PUBLIC onnx_proto onnx ${Protobuf_LIBRARIES}) target_include_directories(${TARGET_NAME} PRIVATE ${ONNX_COMMON_SRC_DIR}) diff --git a/ngraph/frontend/paddlepaddle/CMakeLists.txt b/ngraph/frontend/paddlepaddle/CMakeLists.txt index bef18337ae2171..fb7fa5dadbe97a 100644 --- a/ngraph/frontend/paddlepaddle/CMakeLists.txt +++ b/ngraph/frontend/paddlepaddle/CMakeLists.txt @@ -63,16 +63,18 @@ target_include_directories(${TARGET_NAME} $ $ PRIVATE - ${Protobuf_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}) +target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${Protobuf_INCLUDE_DIRS} + ${CMAKE_CURRENT_BINARY_DIR}) + if(COMMAND ie_add_vs_version_file) ie_add_vs_version_file(NAME ${TARGET_NAME} FILEDESCRIPTION "FrontEnd to load and convert PaddlePaddle file format") endif() -target_link_libraries(${TARGET_NAME} PRIVATE ${Protobuf_LIBRARIES}) +link_system_libraries(${TARGET_NAME} PRIVATE ${Protobuf_LIBRARIES}) target_link_libraries(${TARGET_NAME} PUBLIC frontend_manager PRIVATE ngraph::builder) diff --git a/ngraph/python/CMakeLists.txt b/ngraph/python/CMakeLists.txt index 2eb4b03a2e58b8..b2380350a91b75 100644 --- a/ngraph/python/CMakeLists.txt +++ b/ngraph/python/CMakeLists.txt @@ -11,10 +11,6 @@ if(NOT DEFINED OpenVINO_SOURCE_DIR) find_package(ngraph REQUIRED) endif() -if(ngraph_FOUND) - message("ngraph version = {${ngraph_VERSION}}") -endif() - add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/pybind11 EXCLUDE_FROM_ALL) # PYTHON_VERSION_MAJOR and PYTHON_VERSION_MINOR are defined inside pybind11 @@ -28,7 +24,7 @@ if(OpenVINO_SOURCE_DIR) else() set(PYTHON_BRIDGE_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/python_api/${PYTHON_VERSION}/) endif() - + set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PYTHON_BRIDGE_OUTPUT_DIRECTORY}) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PYTHON_BRIDGE_OUTPUT_DIRECTORY}) set(CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY ${PYTHON_BRIDGE_OUTPUT_DIRECTORY}) @@ -72,7 +68,8 @@ endif() if(NGRAPH_UNIT_TEST_ENABLE) add_subdirectory(tests/mock/mock_py_ngraph_frontend) add_dependencies(_${PROJECT_NAME} mock_py_ngraph_frontend) - set_target_properties(mock_py_ngraph_frontend PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_DIRECTORY_BIN} + set_target_properties(mock_py_ngraph_frontend PROPERTIES + LIBRARY_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_DIRECTORY_BIN} ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_DIRECTORY_BIN} COMPILE_PDB_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_DIRECTORY_BIN} PDB_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_DIRECTORY_BIN}) diff --git a/ngraph/python/tests/mock/mock_py_ngraph_frontend/CMakeLists.txt b/ngraph/python/tests/mock/mock_py_ngraph_frontend/CMakeLists.txt index d39827b0f18830..cbae0eafd0659d 100644 --- a/ngraph/python/tests/mock/mock_py_ngraph_frontend/CMakeLists.txt +++ b/ngraph/python/tests/mock/mock_py_ngraph_frontend/CMakeLists.txt @@ -13,10 +13,8 @@ source_group("include" FILES ${LIBRARY_HEADERS}) # Create shared library add_library(${TARGET_FE_NAME} SHARED ${LIBRARY_SRC} ${LIBRARY_HEADERS}) -target_include_directories(${TARGET_FE_NAME} PRIVATE ".") +target_include_directories(${TARGET_FE_NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) -target_include_directories(${TARGET_FE_NAME} PRIVATE ${FRONTEND_INCLUDE_PATH} ${NGRAPH_INCLUDE_PATH}) -target_link_libraries(${TARGET_FE_NAME} PRIVATE frontend_manager) -target_link_libraries(${TARGET_FE_NAME} PUBLIC ngraph PRIVATE ngraph::builder) +target_link_libraries(${TARGET_FE_NAME} PUBLIC ngraph::frontend_manager) add_clang_format_target(${TARGET_FE_NAME}_clang FOR_TARGETS ${TARGET_FE_NAME}) diff --git a/ngraph/python/tests/mock/mock_py_ngraph_frontend/mock_py_frontend.cpp b/ngraph/python/tests/mock/mock_py_ngraph_frontend/mock_py_frontend.cpp index 22a6e23a2b0a36..e060da7563cdff 100644 --- a/ngraph/python/tests/mock/mock_py_ngraph_frontend/mock_py_frontend.cpp +++ b/ngraph/python/tests/mock/mock_py_ngraph_frontend/mock_py_frontend.cpp @@ -5,7 +5,6 @@ #include "mock_py_frontend.hpp" #include "frontend_manager/frontend_manager.hpp" #include "frontend_manager/frontend_manager_defs.hpp" -#include "ngraph/visibility.hpp" using namespace ngraph; using namespace ngraph::frontend; diff --git a/ngraph/python/tests/mock/pyngraph_fe_mock_api/CMakeLists.txt b/ngraph/python/tests/mock/pyngraph_fe_mock_api/CMakeLists.txt index 7d2e4a3077acc0..a371a491dc2b0e 100644 --- a/ngraph/python/tests/mock/pyngraph_fe_mock_api/CMakeLists.txt +++ b/ngraph/python/tests/mock/pyngraph_fe_mock_api/CMakeLists.txt @@ -11,9 +11,6 @@ source_group("src" FILES ${PYBIND_FE_SRC}) pybind11_add_module(${PYBIND_FE_NAME} MODULE ${PYBIND_FE_SRC}) -target_link_libraries(${PYBIND_FE_NAME} PRIVATE ngraph::ngraph ngraph::frontend_manager) target_link_libraries(${PYBIND_FE_NAME} PRIVATE ${TARGET_FE_NAME}) -add_dependencies(${PYBIND_FE_NAME} ${TARGET_FE_NAME}) - add_clang_format_target(${PYBIND_FE_NAME}_clang FOR_TARGETS ${PYBIND_FE_NAME}) diff --git a/ngraph/test/CMakeLists.txt b/ngraph/test/CMakeLists.txt index cc265ed2456cf1..63fa6d2fb0a9d9 100644 --- a/ngraph/test/CMakeLists.txt +++ b/ngraph/test/CMakeLists.txt @@ -592,6 +592,10 @@ endif() target_link_libraries(unit-test PRIVATE ngraph_test_util ngraph::builder + ${CMAKE_DL_LIBS} + ie_backend + interpreter_backend + Threads::Threads openvino::conditional_compilation) # Protobuf-lite does not support parsing files from prototxt format @@ -611,42 +615,21 @@ if (NGRAPH_ONNX_IMPORT_ENABLE AND NOT NGRAPH_USE_PROTOBUF_LITE) target_include_directories(unit-test PRIVATE ${ONNX_IMPORTER_SRC_DIR}/src) endif() -if(NOT WIN32) - target_link_libraries(unit-test PRIVATE pthread) -endif() -target_link_libraries(unit-test PRIVATE ${CMAKE_DL_LIBS}) - -if (NOT CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - target_compile_options(unit-test PRIVATE -Wno-missing-braces) -endif() - -if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "^(Apple)?Clang$") +if (CMAKE_CXX_COMPILER_ID MATCHES "^(Apple)?Clang$") target_compile_options(unit-test PRIVATE -Wno-undef -Wno-reserved-id-macro) endif() -# So many type_prop tests these days that we need to set /bigobj flag for MSVC. -# We should probably split up type_prop.cpp. -if (MSVC) - target_compile_options(unit-test PRIVATE "/bigobj") -endif() - -target_link_libraries(unit-test PRIVATE ie_backend) - if (NGRAPH_ONNX_IMPORT_ENABLE) target_link_libraries(unit-test PRIVATE onnx_importer) endif() -target_link_libraries(unit-test PRIVATE interpreter_backend) - install(TARGETS unit-test RUNTIME DESTINATION tests COMPONENT tests EXCLUDE_FROM_ALL) ############ FRONTEND ############ -target_include_directories(unit-test PRIVATE ${FRONTEND_INCLUDE_PATH}) -target_link_libraries(unit-test PRIVATE frontend_manager) -target_link_libraries(unit-test PRIVATE cnpy) +target_link_libraries(unit-test PRIVATE frontend_manager cnpy) add_subdirectory(frontend) ### END FRONTEND ### diff --git a/ngraph/test/onnx/onnx_import_rnn.in.cpp b/ngraph/test/onnx/onnx_import_rnn.in.cpp index 7d81f799ca4922..a985cc95fc334e 100644 --- a/ngraph/test/onnx/onnx_import_rnn.in.cpp +++ b/ngraph/test/onnx/onnx_import_rnn.in.cpp @@ -701,7 +701,7 @@ class GRUSequenceOp : public testing::Test }; protected: - virtual void SetUp() override {} + void SetUp() override {} }; NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_defaults_fwd_const) @@ -1688,7 +1688,7 @@ class RNNSequenceOp : public testing::Test }; protected: - virtual void SetUp() override {} + void SetUp() override {} }; NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_defaults_fwd_const) diff --git a/ngraph/test/runtime/dynamic/dynamic_backend.hpp b/ngraph/test/runtime/dynamic/dynamic_backend.hpp index 102e38230f3128..e76fbde6d434fa 100644 --- a/ngraph/test/runtime/dynamic/dynamic_backend.hpp +++ b/ngraph/test/runtime/dynamic/dynamic_backend.hpp @@ -85,8 +85,8 @@ class ngraph::runtime::dynamic::DynamicExecutable : public ngraph::runtime::Exec DynamicExecutable(std::shared_ptr wrapped_function, std::shared_ptr wrapped_backend, bool enable_performance_collection = false); - virtual bool call(const std::vector>& outputs, - const std::vector>& inputs) override; + bool call(const std::vector>& outputs, + const std::vector>& inputs) override; private: std::shared_ptr m_wrapped_function; diff --git a/ngraph/test/runtime/ie/ie_executable.hpp b/ngraph/test/runtime/ie/ie_executable.hpp index c71102ed4314f0..b7936c278a6dbd 100644 --- a/ngraph/test/runtime/ie/ie_executable.hpp +++ b/ngraph/test/runtime/ie/ie_executable.hpp @@ -25,7 +25,7 @@ namespace ngraph IE_Executable(std::shared_ptr func, std::string device); virtual ~IE_Executable() {} bool call(const std::vector>& outputs, - const std::vector>& inputs) final; + const std::vector>& inputs) override final; private: InferenceEngine::CNNNetwork m_network; diff --git a/ngraph/test/util.cpp b/ngraph/test/util.cpp index b6ce08d0a9b92f..f1384d010722c2 100644 --- a/ngraph/test/util.cpp +++ b/ngraph/test/util.cpp @@ -170,7 +170,7 @@ class CloneTest : public ::testing::Test std::shared_ptr func = make_shared(AplusBtimesC, ParameterVector{A, B, C}, "f"); - void SetUp() + void SetUp() override { nodes.push_back(AplusBtimesC); nodes.push_back(AplusB); diff --git a/ngraph/test/util/test_control.hpp b/ngraph/test/util/test_control.hpp index 0c10e117840abd..f78287902cf27a 100644 --- a/ngraph/test/util/test_control.hpp +++ b/ngraph/test/util/test_control.hpp @@ -29,7 +29,7 @@ namespace ngraph NGRAPH_GTEST_TEST_CLASS_NAME_(backend_name, test_case_name, test_name)() {} \ \ private: \ - virtual void TestBody(); \ + void TestBody() override; \ static ::testing::TestInfo* const test_info_ GTEST_ATTRIBUTE_UNUSED_; \ GTEST_DISALLOW_COPY_AND_ASSIGN_(NGRAPH_GTEST_TEST_CLASS_NAME_(backend_name, \ test_case_name, \ @@ -97,7 +97,7 @@ namespace ngraph { \ public: \ NGRAPH_GTEST_TEST_CLASS_NAME_(backend_name, test_case_name, test_name)() {} \ - virtual void TestBody(); \ + void TestBody() override; \ \ private: \ static int AddToRegistry() \ diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index bda132a4a5179e..0f976b6741895f 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -2,6 +2,10 @@ # SPDX-License-Identifier: Apache-2.0 # +if(SUGGEST_OVERRIDE_SUPPORTED) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-suggest-override") +endif() + if(ENABLE_LTO) set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ON) endif() @@ -116,6 +120,31 @@ if(NGRAPH_UNIT_TEST_ENABLE OR ENABLE_TESTS) add_gtest_libraries() endif() +# +# Protobuf +# + +if(NGRAPH_PDPD_FRONTEND_ENABLE OR NGRAPH_ONNX_IMPORT_ENABLE) + if(NGRAPH_USE_SYSTEM_PROTOBUF) + find_package(Protobuf REQUIRED) + else() + add_subdirectory(protobuf) + endif() + + # forward variables used in the other places + set(SYSTEM_PROTOC ${SYSTEM_PROTOC} PARENT_SCOPE) + set(Protobuf_LIBRARIES ${Protobuf_LIBRARIES} PARENT_SCOPE) + set(Protobuf_INCLUDE_DIRS ${Protobuf_INCLUDE_DIRS} PARENT_SCOPE) +endif() + +# +# ONNX +# + +if(NGRAPH_ONNX_IMPORT_ENABLE) + add_subdirectory(onnx) +endif() + # # Install # diff --git a/thirdparty/onnx/CMakeLists.txt b/thirdparty/onnx/CMakeLists.txt index 244b165f752b33..67ea852f1551c7 100644 --- a/thirdparty/onnx/CMakeLists.txt +++ b/thirdparty/onnx/CMakeLists.txt @@ -9,6 +9,11 @@ set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE OFF) #------------------------------------------------------------------------------ set(NGRAPH_ONNX_NAMESPACE ngraph_onnx) +set(BUILD_SHARED_LIBS OFF) + +if(NOT DEFINED ONNX_USE_MSVC_STATIC_RUNTIME) + set(ONNX_USE_MSVC_STATIC_RUNTIME OFF) +endif() macro(onnx_set_target_properties) target_include_directories(onnx SYSTEM PRIVATE "${Protobuf_INCLUDE_DIRS}") @@ -24,10 +29,10 @@ macro(onnx_set_target_properties) target_compile_definitions(onnx PUBLIC ONNX_BUILD_SHARED_LIBS) endmacro() -set(ONNX_USE_PROTOBUF_SHARED_LIBS ${BUILD_SHARED_LIBS} CACHE BOOL "Use dynamic protobuf by ONNX library") +set(ONNX_USE_PROTOBUF_SHARED_LIBS ${BUILD_SHARED_LIBS} CACHE BOOL "Use dynamic protobuf by ONNX library" FORCE) set(ONNX_NAMESPACE ${NGRAPH_ONNX_NAMESPACE}) -set(ONNX_USE_LITE_PROTO ${NGRAPH_USE_PROTOBUF_LITE} CACHE BOOL "Use protobuf lite for ONNX library") -set(ONNX_ML ON CACHE BOOL "Use ONNX ML") +set(ONNX_USE_LITE_PROTO ${NGRAPH_USE_PROTOBUF_LITE} CACHE BOOL "Use protobuf lite for ONNX library" FORCE) +set(ONNX_ML ON CACHE BOOL "Use ONNX ML" FORCE) if(CMAKE_CROSSCOMPILING) set(ONNX_CUSTOM_PROTOC_EXECUTABLE ${SYSTEM_PROTOC}) endif() diff --git a/thirdparty/protobuf/CMakeLists.txt b/thirdparty/protobuf/CMakeLists.txt index 0503e094b92498..ac9101030224b2 100644 --- a/thirdparty/protobuf/CMakeLists.txt +++ b/thirdparty/protobuf/CMakeLists.txt @@ -7,9 +7,24 @@ #------------------------------------------------------------------------------ set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE OFF) +set(BUILD_SHARED_LIBS OFF) -if (MSVC) - set(protobuf_MSVC_STATIC_RUNTIME OFF CACHE BOOL "") +if(SUGGEST_OVERRIDE_SUPPORTED) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-suggest-override") +endif() + +if(CMAKE_CXX_COMPILER_ID MATCHES "^(Apple)?Clang$") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-inconsistent-missing-override") +endif() + +set(protobuf_BUILD_TESTS OFF CACHE BOOL "Build tests") + +# When we build dll libraries. These flags make sure onnx and protobuf build with /MD, not /MT. +# These two options can't be mixed, because they requires link two imcompatiable runtime. +set(protobuf_WITH_ZLIB OFF CACHE BOOL "Build with zlib support") + +if(NOT DEFINED protobuf_MSVC_STATIC_RUNTIME) + set(protobuf_MSVC_STATIC_RUNTIME OFF CACHE BOOL "Link protobuf to static runtime libraries" FORCE) endif() if(CMAKE_CROSSCOMPILING) @@ -19,8 +34,7 @@ if(CMAKE_CROSSCOMPILING) execute_process( COMMAND ${SYSTEM_PROTOC} --version OUTPUT_VARIABLE PROTOC_VERSION - OUTPUT_STRIP_TRAILING_WHITESPACE - ) + OUTPUT_STRIP_TRAILING_WHITESPACE) string(REPLACE " " ";" PROTOC_VERSION ${PROTOC_VERSION}) list(GET PROTOC_VERSION -1 PROTOC_VERSION) @@ -33,7 +47,7 @@ if(CMAKE_CROSSCOMPILING) set(protobuf_BUILD_PROTOC_BINARIES OFF CACHE BOOL "Build libprotoc and protoc compiler" FORCE) endif() -set(protobuf_BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libs") +set(protobuf_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS} CACHE BOOL "Build shared libs" FORCE) set(protobuf_BUILD_TESTS OFF CACHE BOOL "Build tests") set(protobuf_WITH_ZLIB OFF CACHE BOOL "Build with zlib support") @@ -51,20 +65,17 @@ endif() if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "^(Apple)?Clang$") set(_proto_libs ${Protobuf_LIBRARIES}) if(TARGET libprotoc) + list(APPEND _proto_libs libprotoc) target_compile_options(libprotoc PRIVATE -Wno-all -Wno-unused-variable) - - # required for protoc compiler - set_target_properties(libprotoc PROPERTIES - CXX_VISIBILITY_PRESET default - C_VISIBILITY_PRESET default - VISIBILITY_INLINES_HIDDEN OFF) endif() + set_target_properties(${_proto_libs} PROPERTIES + CXX_VISIBILITY_PRESET default + C_VISIBILITY_PRESET default + VISIBILITY_INLINES_HIDDEN OFF) foreach(target libprotobuf libprotobuf-lite) - if(TARGET ${target}) - target_compile_options(${target} - PRIVATE -Wno-all -Wno-unused-variable -Wno-inconsistent-missing-override - PUBLIC -Wno-undef) - endif() + target_compile_options(${target} + PRIVATE -Wno-all -Wno-unused-variable + PUBLIC -Wno-undef) endforeach() endif()