From e334783026f81982063bbbcbfc7dfd1647ce6a88 Mon Sep 17 00:00:00 2001 From: myshevts Date: Mon, 22 Nov 2021 16:12:41 +0300 Subject: [PATCH] ENABLE_BATCH --- cmake/features.cmake | 2 ++ inference-engine/ie_bridges/c/tests/CMakeLists.txt | 4 ++++ inference-engine/src/CMakeLists.txt | 5 ++++- .../tests/functional/inference_engine/CMakeLists.txt | 4 ++++ inference-engine/tests/functional/plugin/gpu/CMakeLists.txt | 2 +- .../tests/functional/plugin/shared/CMakeLists.txt | 5 +++++ .../tests_deprecated/behavior/shared_tests/CMakeLists.txt | 5 +++++ .../tests_deprecated/functional/shared_tests/CMakeLists.txt | 4 ++++ 8 files changed, 29 insertions(+), 2 deletions(-) diff --git a/cmake/features.cmake b/cmake/features.cmake index b7c152a0561..0c030b55ddd 100644 --- a/cmake/features.cmake +++ b/cmake/features.cmake @@ -110,6 +110,8 @@ ie_option (ENABLE_GAPI_PREPROCESSING "Enables G-API preprocessing" ON) ie_option (ENABLE_MULTI "Enables Multi Device Plugin" ON) +ie_option (ENABLE_BATCH "Enables Auto-Batching Plugin" ON) + ie_option (ENABLE_HETERO "Enables Hetero Device Plugin" ON) ie_option (ENABLE_TEMPLATE "Enable template plugin" ON) diff --git a/inference-engine/ie_bridges/c/tests/CMakeLists.txt b/inference-engine/ie_bridges/c/tests/CMakeLists.txt index 97d213be740..fdaaefab188 100644 --- a/inference-engine/ie_bridges/c/tests/CMakeLists.txt +++ b/inference-engine/ie_bridges/c/tests/CMakeLists.txt @@ -26,6 +26,10 @@ if(ENABLE_MULTI) add_dependencies(${TARGET_NAME} MultiDevicePlugin) endif() +if(ENABLE_BATCH) + add_dependencies(${TARGET_NAME} AutoBatchPlugin) +endif() + if(ENABLE_MKL_DNN) add_dependencies(${TARGET_NAME} MKLDNNPlugin) endif() diff --git a/inference-engine/src/CMakeLists.txt b/inference-engine/src/CMakeLists.txt index a62cbbfc687..2731b049a6f 100644 --- a/inference-engine/src/CMakeLists.txt +++ b/inference-engine/src/CMakeLists.txt @@ -38,7 +38,10 @@ endif() if(ENABLE_MULTI) add_subdirectory(multi_device) endif() -add_subdirectory(auto_batch) + +if(ENABLE_BATCH) + add_subdirectory(auto_batch) +endif() add_subdirectory(inference_engine) diff --git a/inference-engine/tests/functional/inference_engine/CMakeLists.txt b/inference-engine/tests/functional/inference_engine/CMakeLists.txt index b1ff44c46af..8c5a3176080 100644 --- a/inference-engine/tests/functional/inference_engine/CMakeLists.txt +++ b/inference-engine/tests/functional/inference_engine/CMakeLists.txt @@ -48,6 +48,10 @@ if(ENABLE_MULTI) list(APPEND DEPENDENCIES MultiDevicePlugin) endif() +if(ENABLE_BATCH) + list(APPEND DEPENDENCIES AutoBatchPlugin) +endif() + if (NOT NGRAPH_ONNX_FRONTEND_ENABLE) list(APPEND EXCLUDED_SOURCE_PATHS "${CMAKE_CURRENT_SOURCE_DIR}/onnx_reader") endif() diff --git a/inference-engine/tests/functional/plugin/gpu/CMakeLists.txt b/inference-engine/tests/functional/plugin/gpu/CMakeLists.txt index 8ce5bfd7aac..b0ae9365a27 100644 --- a/inference-engine/tests/functional/plugin/gpu/CMakeLists.txt +++ b/inference-engine/tests/functional/plugin/gpu/CMakeLists.txt @@ -12,7 +12,7 @@ addIeTargetTest( INCLUDES ${CMAKE_CURRENT_SOURCE_DIR} DEPENDENCIES - clDNNPlugin AutoBatchPlugin + clDNNPlugin LINK_LIBRARIES funcSharedTests OpenCL diff --git a/inference-engine/tests/functional/plugin/shared/CMakeLists.txt b/inference-engine/tests/functional/plugin/shared/CMakeLists.txt index 825c0f66a2c..0b44bfe870c 100644 --- a/inference-engine/tests/functional/plugin/shared/CMakeLists.txt +++ b/inference-engine/tests/functional/plugin/shared/CMakeLists.txt @@ -16,6 +16,11 @@ if(ENABLE_MULTI) list(APPEND DEPENDENCIES MultiDevicePlugin) endif() +if(ENABLE_BATCH) + list(APPEND DEPENDENCIES AutoBatchPlugin) +endif() + + # remove once CVS-69781 is fixed if(NGRAPH_IR_FRONTEND_ENABLE) list(APPEND DEPENDENCIES ir_ov_frontend) diff --git a/inference-engine/tests_deprecated/behavior/shared_tests/CMakeLists.txt b/inference-engine/tests_deprecated/behavior/shared_tests/CMakeLists.txt index b66da71d4bd..763ac69341c 100644 --- a/inference-engine/tests_deprecated/behavior/shared_tests/CMakeLists.txt +++ b/inference-engine/tests_deprecated/behavior/shared_tests/CMakeLists.txt @@ -14,6 +14,11 @@ if(ENABLE_MULTI) add_dependencies(${TARGET_NAME} MultiDevicePlugin) endif() +if(ENABLE_BATCH) + add_dependencies(${TARGET_NAME} AutoBatchPlugin) +endif() + + target_include_directories(${TARGET_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/plugin_tests") target_link_libraries(${TARGET_NAME} PUBLIC diff --git a/inference-engine/tests_deprecated/functional/shared_tests/CMakeLists.txt b/inference-engine/tests_deprecated/functional/shared_tests/CMakeLists.txt index 4584a6810c2..98a91873b8a 100644 --- a/inference-engine/tests_deprecated/functional/shared_tests/CMakeLists.txt +++ b/inference-engine/tests_deprecated/functional/shared_tests/CMakeLists.txt @@ -25,6 +25,10 @@ if(ENABLE_MULTI) add_dependencies(${TARGET_NAME} MultiDevicePlugin) endif() +if(ENABLE_BATCH) + add_dependencies(${TARGET_NAME} AutoBatchPlugin) +endif() + set_ie_threading_interface_for(${TARGET_NAME}) ie_faster_build(${TARGET_NAME}