Skip to content

Commit

Permalink
Merge pull request opencv#17049 from ilya-lavrenov:il/nn-builder
Browse files Browse the repository at this point in the history
  • Loading branch information
alalek committed Apr 14, 2020
2 parents 675342e + 91b0100 commit b3514a5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion modules/dnn/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,13 @@ endif()

set(dnn_runtime_libs "")
if(INF_ENGINE_TARGET)
ocv_option(OPENCV_DNN_IE_NN_BUILDER_2019 "Build with Inference Engine NN Builder API support" ON) # future: NOT HAVE_NGRAPH
set(use_nn_builder OFF)
if(TARGET inference_engine_nn_builder OR # custom imported target
TARGET IE::inference_engine_nn_builder OR # default imported target via InferenceEngineConfig.cmake
INF_ENGINE_RELEASE VERSION_LESS "2020000000") # compatibility with older versions on IE
set(use_nn_builder ON)
endif()
ocv_option(OPENCV_DNN_IE_NN_BUILDER_2019 "Build with Inference Engine NN Builder API support" ${use_nn_builder}) # future: NOT HAVE_NGRAPH
if(OPENCV_DNN_IE_NN_BUILDER_2019)
message(STATUS "DNN: Enabling Inference Engine NN Builder API support")
add_definitions(-DHAVE_DNN_IE_NN_BUILDER_2019=1)
Expand Down
2 changes: 2 additions & 0 deletions modules/dnn/src/op_inf_engine.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@

#include <inference_engine.hpp>

#ifdef HAVE_DNN_IE_NN_BUILDER_2019
#include <ie_builders.hpp>
#endif

#if defined(__GNUC__) && INF_ENGINE_VER_MAJOR_LT(INF_ENGINE_RELEASE_2020_1)
#pragma GCC visibility pop
Expand Down

0 comments on commit b3514a5

Please sign in to comment.