Added suggest-override flag (#6631)

This commit is contained in:
Ilya Lavrenov
2021-07-16 18:55:05 +03:00
committed by GitHub
parent 22fddb4315
commit bc36425381
147 changed files with 406 additions and 548 deletions

View File

@@ -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 ###

View File

@@ -701,7 +701,7 @@ public:
};
protected:
virtual void SetUp() override {}
void SetUp() override {}
};
NGRAPH_TEST_F(${BACKEND_NAME}, GRUSequenceOp, onnx_model_gru_defaults_fwd_const)
@@ -1688,7 +1688,7 @@ public:
};
protected:
virtual void SetUp() override {}
void SetUp() override {}
};
NGRAPH_TEST_F(${BACKEND_NAME}, RNNSequenceOp, onnx_model_rnn_defaults_fwd_const)

View File

@@ -85,8 +85,8 @@ public:
DynamicExecutable(std::shared_ptr<Function> wrapped_function,
std::shared_ptr<ngraph::runtime::Backend> wrapped_backend,
bool enable_performance_collection = false);
virtual bool call(const std::vector<std::shared_ptr<runtime::Tensor>>& outputs,
const std::vector<std::shared_ptr<runtime::Tensor>>& inputs) override;
bool call(const std::vector<std::shared_ptr<runtime::Tensor>>& outputs,
const std::vector<std::shared_ptr<runtime::Tensor>>& inputs) override;
private:
std::shared_ptr<ngraph::Function> m_wrapped_function;

View File

@@ -25,7 +25,7 @@ namespace ngraph
IE_Executable(std::shared_ptr<Function> func, std::string device);
virtual ~IE_Executable() {}
bool call(const std::vector<std::shared_ptr<runtime::Tensor>>& outputs,
const std::vector<std::shared_ptr<runtime::Tensor>>& inputs) final;
const std::vector<std::shared_ptr<runtime::Tensor>>& inputs) override final;
private:
InferenceEngine::CNNNetwork m_network;

View File

@@ -170,7 +170,7 @@ public:
std::shared_ptr<Function> func =
make_shared<Function>(AplusBtimesC, ParameterVector{A, B, C}, "f");
void SetUp()
void SetUp() override
{
nodes.push_back(AplusBtimesC);
nodes.push_back(AplusB);

View File

@@ -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() \