Removed NGRAPH_IE_ENABLE flag because it is always ON if unit tests are enabled (#2003)
This commit is contained in:
@@ -67,7 +67,6 @@ RUN cmake .. \
|
||||
-DENABLE_PYTHON=ON \
|
||||
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
|
||||
-DNGRAPH_ONNX_IMPORT_ENABLE=ON \
|
||||
-DNGRAPH_IE_ENABLE=ON \
|
||||
-DNGRAPH_INTERPRETER_ENABLE=ON \
|
||||
-DNGRAPH_DEBUG_ENABLE=OFF \
|
||||
-DNGRAPH_DYNAMIC_COMPONENTS_ENABLE=ON \
|
||||
|
||||
@@ -69,10 +69,8 @@ function(build_ngraph)
|
||||
|
||||
if(ENABLE_TESTS AND NOT ANDROID)
|
||||
ngraph_set(NGRAPH_UNIT_TEST_ENABLE TRUE)
|
||||
ngraph_set(NGRAPH_IE_ENABLE TRUE)
|
||||
else()
|
||||
ngraph_set(NGRAPH_UNIT_TEST_ENABLE FALSE)
|
||||
ngraph_set(NGRAPH_IE_ENABLE FALSE)
|
||||
endif()
|
||||
|
||||
if(NOT ANDROID)
|
||||
|
||||
@@ -119,7 +119,6 @@ option(NGRAPH_ONNX_IMPORT_ENABLE "Enable ONNX importer" FALSE)
|
||||
option(NGRAPH_CODE_COVERAGE_ENABLE "Enable code coverage data collection" FALSE)
|
||||
option(NGRAPH_LIB_VERSIONING_ENABLE "Enable shared library versioning" FALSE)
|
||||
option(NGRAPH_PYTHON_BUILD_ENABLE "Enable build nGraph python package wheel" FALSE)
|
||||
option(NGRAPH_IE_ENABLE "Enable the Inference Engine backend" FALSE)
|
||||
option(NGRAPH_DYNAMIC_COMPONENTS_ENABLE "Enable dynamic loading of components" TRUE)
|
||||
option(NGRAPH_EXPORT_TARGETS_ENABLE "Enable exporting nGraph cmake export targets" TRUE)
|
||||
option(NGRAPH_WARNINGS_AS_ERRORS "Make all nGraph compile-time warnings into errors" FALSE)
|
||||
@@ -156,7 +155,6 @@ NORMALIZE_BOOL(NGRAPH_ONNX_IMPORT_ENABLE)
|
||||
NORMALIZE_BOOL(NGRAPH_CODE_COVERAGE_ENABLE)
|
||||
NORMALIZE_BOOL(NGRAPH_LIB_VERSIONING_ENABLE)
|
||||
NORMALIZE_BOOL(NGRAPH_PYTHON_BUILD_ENABLE)
|
||||
NORMALIZE_BOOL(NGRAPH_IE_ENABLE)
|
||||
|
||||
NORMALIZE_BOOL(NGRAPH_DYNAMIC_COMPONENTS_ENABLE)
|
||||
NORMALIZE_BOOL(NGRAPH_EXPORT_TARGETS_ENABLE)
|
||||
@@ -172,7 +170,6 @@ message(STATUS "NGRAPH_DEBUG_ENABLE: ${NGRAPH_DEBUG_ENABLE}")
|
||||
message(STATUS "NGRAPH_DEPRECATED_ENABLE: ${NGRAPH_DEPRECATED_ENABLE}")
|
||||
message(STATUS "NGRAPH_DYNAMIC_COMPONENTS_ENABLE: ${NGRAPH_DYNAMIC_COMPONENTS_ENABLE}")
|
||||
message(STATUS "NGRAPH_EXPORT_TARGETS_ENABLE: ${NGRAPH_EXPORT_TARGETS_ENABLE}")
|
||||
message(STATUS "NGRAPH_IE_ENABLE: ${NGRAPH_IE_ENABLE}")
|
||||
message(STATUS "NGRAPH_IE_STATIC_LIB_ENABLE: ${NGRAPH_IE_STATIC_LIB_ENABLE}")
|
||||
message(STATUS "NGRAPH_INTERPRETER_ENABLE: ${NGRAPH_INTERPRETER_ENABLE}")
|
||||
message(STATUS "NGRAPH_LIB_VERSIONING_ENABLE: ${NGRAPH_LIB_VERSIONING_ENABLE}")
|
||||
@@ -341,10 +338,6 @@ if(WIN32)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS")
|
||||
endif()
|
||||
|
||||
if (NGRAPH_IE_ENABLE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNGRAPH_IE_ENABLE")
|
||||
endif()
|
||||
|
||||
if (NGRAPH_DYNAMIC_COMPONENTS_ENABLE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNGRAPH_DYNAMIC_COMPONENTS_ENABLE")
|
||||
endif()
|
||||
|
||||
@@ -214,15 +214,13 @@ endforeach()
|
||||
set_source_files_properties(includes.cpp PROPERTIES COMPILE_DEFINITIONS
|
||||
NGRAPH_INCLUDES="${PROJECT_SOURCE_DIR}/src/ngraph")
|
||||
|
||||
if (NGRAPH_IE_ENABLE)
|
||||
if (ENABLE_MKL_DNN)
|
||||
message(STATUS "NGRAPH_TESTS: IE:CPU enabled")
|
||||
set(ACTIVE_BACKEND_LIST ${ACTIVE_BACKEND_LIST} "IE:CPU")
|
||||
endif()
|
||||
if (ENABLE_CLDNN)
|
||||
message(STATUS "NGRAPH_TESTS: IE:GPU enabled")
|
||||
set(ACTIVE_BACKEND_LIST ${ACTIVE_BACKEND_LIST} "IE:GPU")
|
||||
endif()
|
||||
if (ENABLE_MKL_DNN)
|
||||
message(STATUS "NGRAPH_TESTS: IE:CPU enabled")
|
||||
set(ACTIVE_BACKEND_LIST ${ACTIVE_BACKEND_LIST} "IE:CPU")
|
||||
endif()
|
||||
if (ENABLE_CLDNN)
|
||||
message(STATUS "NGRAPH_TESTS: IE:GPU enabled")
|
||||
set(ACTIVE_BACKEND_LIST ${ACTIVE_BACKEND_LIST} "IE:GPU")
|
||||
endif()
|
||||
|
||||
if (NGRAPH_INTERPRETER_ENABLE)
|
||||
@@ -428,33 +426,9 @@ if (NGRAPH_ONNX_IMPORT_ENABLE)
|
||||
target_link_libraries(unit-test PRIVATE onnx_importer)
|
||||
endif()
|
||||
|
||||
if (NGRAPH_IE_ENABLE)
|
||||
target_link_libraries(unit-test PRIVATE ie_backend)
|
||||
endif()
|
||||
target_link_libraries(unit-test PRIVATE ie_backend)
|
||||
|
||||
if (NGRAPH_INTERPRETER_ENABLE)
|
||||
target_compile_definitions(unit-test PRIVATE NGRAPH_INTERPRETER_ENABLE)
|
||||
target_link_libraries(unit-test PRIVATE interpreter_backend)
|
||||
endif()
|
||||
|
||||
if (NOT NGRAPH_IE_ENABLE)
|
||||
# If all the runtime libraries are installed into one location, that will make life easier.
|
||||
if (MSVC)
|
||||
add_custom_target(unit-test-check
|
||||
COMMAND set "PATH=${EXTERNAL_PROJECTS_ROOT}/src/ngraph/Release;${EXTERNAL_PROJECTS_ROOT}/mkldnn/lib/;${EXTERNAL_PROJECTS_ROOT}/mkl/src/ext_mkl/lib/;${EXTERNAL_PROJECTS_ROOT}/ext_tbb-prefix/src/ext_tbb/tbb2019_20181203oss/bin/intel64/vc14;%PATH%"
|
||||
COMMAND ${PROJECT_BINARY_DIR}/test/unit-test \${ARGS}
|
||||
DEPENDS unit-test
|
||||
)
|
||||
else()
|
||||
add_custom_target(unit-test-check
|
||||
COMMAND ${PROJECT_BINARY_DIR}/test/unit-test --cpath ${EXTERNAL_PROJECTS_ROOT}/src/ngraph/ \${ARGS}
|
||||
DEPENDS unit-test
|
||||
)
|
||||
endif()
|
||||
|
||||
add_custom_target(check
|
||||
DEPENDS
|
||||
style-check
|
||||
unit-test-check
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -66,7 +66,4 @@ target_compile_definitions(ngraph_backend PRIVATE BACKEND_DLL_EXPORTS)
|
||||
target_include_directories(ngraph_backend PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
add_subdirectory(interpreter)
|
||||
|
||||
if (NGRAPH_IE_ENABLE)
|
||||
add_subdirectory(ie)
|
||||
endif()
|
||||
add_subdirectory(ie)
|
||||
|
||||
Reference in New Issue
Block a user