Added apiValidator checks for frontends (#8655)

This commit is contained in:
Ilya Lavrenov 2021-11-17 23:19:15 +03:00 committed by GitHub
parent 83b8099363
commit df30694699
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 48 additions and 85 deletions

View File

@ -44,21 +44,14 @@ source_group("include" FILES ${PUBLIC_HEADERS})
add_library(ngraph ${LIBRARY_SRC} ${PUBLIC_HEADERS} ${IE_SHARED_SRCS})
if(COMMAND ie_faster_build)
ie_faster_build(ngraph
UNITY
PCH PRIVATE "src/precomp.hpp"
)
endif()
ie_faster_build(ngraph
UNITY
PCH PRIVATE "src/precomp.hpp")
if(COMMAND ie_add_api_validator_post_build_step)
ie_add_api_validator_post_build_step(TARGET ngraph)
endif()
ie_add_api_validator_post_build_step(TARGET ngraph)
if(COMMAND ie_add_vs_version_file)
ie_add_vs_version_file(NAME ngraph
FILEDESCRIPTION "nGraph library")
endif()
ie_add_vs_version_file(NAME ngraph
FILEDESCRIPTION "nGraph library")
addVersionDefines(src/version.cpp CI_BUILD_NUMBER)

View File

@ -18,12 +18,9 @@ source_group("include" FILES ${PUBLIC_HEADERS})
# Create static library
add_library(${TARGET_NAME} STATIC ${LIBRARY_SRC} ${PUBLIC_HEADERS})
if(COMMAND ie_faster_build)
ie_faster_build(${TARGET_NAME}
UNITY
PCH PRIVATE "src/precomp.hpp"
)
endif()
ie_faster_build(${TARGET_NAME}
UNITY
PCH PRIVATE "src/precomp.hpp")
target_include_directories(${TARGET_NAME} PUBLIC
$<BUILD_INTERFACE:${BUILDER_INCLUDE_DIR}>

View File

@ -18,12 +18,9 @@ source_group("include" FILES ${PUBLIC_HEADERS})
# Create static library
add_library(${TARGET_NAME} STATIC ${LIBRARY_SRC} ${PUBLIC_HEADERS})
if(COMMAND ie_faster_build)
ie_faster_build(${TARGET_NAME}
UNITY
PCH PRIVATE "src/precomp.hpp"
)
endif()
ie_faster_build(${TARGET_NAME}
UNITY
PCH PRIVATE "src/precomp.hpp")
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
target_compile_options(${TARGET_NAME} PUBLIC /wd4146)

View File

@ -41,10 +41,9 @@ ov_ncc_naming_style(FOR_TARGET ${TARGET_NAME}
ADDITIONAL_INCLUDE_DIRECTORIES
$<TARGET_PROPERTY:ngraph,INTERFACE_INCLUDE_DIRECTORIES>)
if(COMMAND ie_add_vs_version_file)
ie_add_vs_version_file(NAME ${TARGET_NAME}
FILEDESCRIPTION "Manager of OpenVINO nGraph Frontends")
endif()
ie_add_vs_version_file(NAME ${TARGET_NAME}
FILEDESCRIPTION "Manager of OpenVINO Frontends")
ie_add_api_validator_post_build_step(TARGET ${TARGET_NAME})
# create static library if needed

View File

@ -38,10 +38,10 @@ target_include_directories(${TARGET_NAME}
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${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 IR file format")
endif()
ie_add_vs_version_file(NAME ${TARGET_NAME}
FILEDESCRIPTION "FrontEnd to load and convert OpenVINO IR file format")
ie_add_api_validator_post_build_step(TARGET ${TARGET_NAME})
target_link_libraries(${TARGET_NAME} PRIVATE frontend_manager::static
ngraph::builder inference_engine_transformations

View File

@ -39,10 +39,10 @@ ov_ncc_naming_style(FOR_TARGET ${TARGET_NAME}
ADDITIONAL_INCLUDE_DIRECTORIES
$<TARGET_PROPERTY:frontend_manager::static,INTERFACE_INCLUDE_DIRECTORIES>)
if(COMMAND ie_add_vs_version_file)
ie_add_vs_version_file(NAME ${TARGET_NAME}
FILEDESCRIPTION "nGraph ONNX frontend library")
endif()
ie_add_vs_version_file(NAME ${TARGET_NAME}
FILEDESCRIPTION "nGraph ONNX frontend library")
ie_add_api_validator_post_build_step(TARGET ${TARGET_NAME})
target_link_libraries(${TARGET_NAME} PUBLIC ngraph PRIVATE frontend_manager ngraph::builder openvino::util onnx_common inference_engine_transformations)

View File

@ -69,10 +69,10 @@ target_include_directories(${TARGET_NAME}
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()
ie_add_vs_version_file(NAME ${TARGET_NAME}
FILEDESCRIPTION "FrontEnd to load and convert PaddlePaddle file format")
ie_add_api_validator_post_build_step(TARGET ${TARGET_NAME})
link_system_libraries(${TARGET_NAME} PRIVATE ${Protobuf_LITE_LIBRARIES})

View File

@ -69,10 +69,10 @@ target_include_directories(${TARGET_NAME}
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 TensorFlow file format")
endif()
ie_add_vs_version_file(NAME ${TARGET_NAME}
FILEDESCRIPTION "FrontEnd to load and convert TensorFlow file format")
ie_add_api_validator_post_build_step(TARGET ${TARGET_NAME})
link_system_libraries(${TARGET_NAME} PRIVATE ${Protobuf_LITE_LIBRARIES})

View File

@ -6,9 +6,7 @@ file(GLOB_RECURSE ENGINES_UTIL_SRC "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" "${CMAKE_
add_library(engines_test_util STATIC ${ENGINES_UTIL_SRC})
if(COMMAND ie_faster_build)
ie_faster_build(engines_test_util UNITY)
endif()
ie_faster_build(engines_test_util UNITY)
target_include_directories(engines_test_util PRIVATE $<TARGET_PROPERTY:inference_engine,INTERFACE_INCLUDE_DIRECTORIES>)
target_link_libraries(engines_test_util PUBLIC ngraph ngraph_backend inference_engine gtest gmock ngraph_test_util)

View File

@ -6,9 +6,7 @@ file(GLOB_RECURSE ONNX_UTIL_SRC "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" "${CMAKE_CUR
add_library(onnx_test_util STATIC ${ONNX_UTIL_SRC})
if(COMMAND ie_faster_build)
ie_faster_build(onnx_test_util UNITY)
endif()
ie_faster_build(onnx_test_util UNITY)
target_link_libraries(onnx_test_util PRIVATE onnx_common)
target_include_directories(onnx_test_util PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

View File

@ -22,16 +22,12 @@ set (SRC
add_library(ngraph_backend SHARED ${SRC})
if(COMMAND ie_faster_build)
ie_faster_build(ngraph_backend
UNITY
)
endif()
ie_faster_build(ngraph_backend UNITY)
if(COMMAND ie_add_vs_version_file)
ie_add_vs_version_file(NAME ngraph_backend
FILEDESCRIPTION "nGraph backend library")
endif()
ie_add_vs_version_file(NAME ngraph_backend
FILEDESCRIPTION "nGraph backend library")
ie_add_api_validator_post_build_step(TARGET ngraph_backend)
target_compile_definitions(ngraph_backend
PRIVATE

View File

@ -14,16 +14,12 @@ set(SRC
add_library(ie_backend SHARED ${SRC})
if(COMMAND ie_faster_build)
ie_faster_build(ie_backend
UNITY
)
endif()
ie_faster_build(ie_backend UNITY)
if(COMMAND ie_add_vs_version_file)
ie_add_vs_version_file(NAME ie_backend
FILEDESCRIPTION "nGraph IE backend library")
endif()
ie_add_vs_version_file(NAME ie_backend
FILEDESCRIPTION "nGraph IE backend library")
ie_add_api_validator_post_build_step(TARGET ie_backend)
add_dependencies(ie_backend inference_engine)
target_link_libraries(ie_backend PUBLIC ngraph_backend inference_engine)

View File

@ -4,21 +4,12 @@
add_library(interpreter_backend SHARED int_backend.cpp int_executable.cpp evaluates_map.cpp)
if(COMMAND ie_faster_build)
ie_faster_build(interpreter_backend
UNITY
)
endif()
ie_faster_build(interpreter_backend UNITY)
if(COMMAND ie_add_vs_version_file)
ie_add_vs_version_file(NAME interpreter_backend
FILEDESCRIPTION "nGraph interpreter backend library")
endif()
ie_add_vs_version_file(NAME interpreter_backend
FILEDESCRIPTION "nGraph interpreter backend library")
if(COMMAND ie_add_vs_version_file)
ie_add_vs_version_file(NAME interpreter_backend
FILEDESCRIPTION "nGraph interpreter backend library")
endif()
ie_add_api_validator_post_build_step(TARGET interpreter_backend)
target_compile_definitions(interpreter_backend PRIVATE INTERPRETER_BACKEND_EXPORTS)
target_link_libraries(interpreter_backend PUBLIC ngraph_backend PRIVATE ngraph_reference)

View File

@ -6,9 +6,7 @@ file(GLOB_RECURSE UTIL_SRC "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" "${CMAKE_CURRENT_
add_library(ngraph_test_util STATIC ${UTIL_SRC})
if(COMMAND ie_faster_build)
ie_faster_build(ngraph_test_util UNITY)
endif()
ie_faster_build(ngraph_test_util UNITY)
target_link_libraries(ngraph_test_util PUBLIC ngraph gtest gmock)
target_include_directories(ngraph_test_util PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})