forked from mindspore-Ecosystem/mindspore
!6854 [MD][lite]Build minddata wthe mindspore-lite
Merge pull request !6854 from xulei/lite_test0905
This commit is contained in:
commit
27bbe35707
2
build.sh
2
build.sh
|
@ -91,7 +91,7 @@ checkopts()
|
|||
ENABLE_DUMP2PROTO="on"
|
||||
ENABLE_DUMP_IR="on"
|
||||
COMPILE_MINDDATA="on"
|
||||
COMPILE_MINDDATA_LITE="off"
|
||||
COMPILE_MINDDATA_LITE="lite_cv"
|
||||
ENABLE_MPI="off"
|
||||
CUDA_VERSION="10.1"
|
||||
COMPILE_LITE="off"
|
||||
|
|
|
@ -7,6 +7,11 @@ set(OPENCV_DIR ${MAIN_DIR}-${COMPONENT_NAME}/third_party/opencv)
|
|||
set(PROTOBF_DIR ${MAIN_DIR}-${COMPONENT_NAME}/third_party/protobuf)
|
||||
set(FLATBF_DIR ${MAIN_DIR}-${COMPONENT_NAME}/third_party/flatbuffers)
|
||||
|
||||
set(MIND_DATA_INC_DIR ${MAIN_DIR}-${COMPONENT_NAME}/minddata/include)
|
||||
set(MIND_DATA_LIB_DIR ${MAIN_DIR}-${COMPONENT_NAME}/minddata/lib)
|
||||
set(MIND_DATA_LIB_DIR_RUN_X86 ${MAIN_DIR}-${RUN_X86_COMPONENT_NAME}/minddata/lib)
|
||||
set(MIND_DATA_INC_DIR_RUN_X86 ${MAIN_DIR}-${RUN_X86_COMPONENT_NAME}/minddata/include)
|
||||
|
||||
set(LIB_DIR_RUN_X86 ${MAIN_DIR}-${RUN_X86_COMPONENT_NAME}/lib)
|
||||
set(INC_DIR_RUN_X86 ${MAIN_DIR}-${RUN_X86_COMPONENT_NAME}/include)
|
||||
set(TURBO_DIR_RUN_X86 ${MAIN_DIR}-${RUN_X86_COMPONENT_NAME}/third_party/libjpeg-turbo)
|
||||
|
@ -42,13 +47,15 @@ endif ()
|
|||
|
||||
|
||||
if (BUILD_MINDDATA STREQUAL "lite_cv")
|
||||
install(DIRECTORY ${TOP_DIR}/mindspore/ccsrc/minddata/dataset/kernels/image/lite_cv DESTINATION ${INC_DIR} COMPONENT ${COMPONENT_NAME} FILES_MATCHING PATTERN "*.h")
|
||||
if (PLATFORM_ARM64)
|
||||
install(FILES ${TOP_DIR}/mindspore/lite/build/minddata/libminddata-lite.so DESTINATION ${LIB_DIR} COMPONENT ${COMPONENT_NAME})
|
||||
if (PLATFORM_ARM64)
|
||||
install(DIRECTORY ${TOP_DIR}/mindspore/ccsrc/minddata/dataset/kernels/image/lite_cv DESTINATION ${MIND_DATA_INC_DIR} COMPONENT ${COMPONENT_NAME} FILES_MATCHING PATTERN "*.h")
|
||||
install(FILES ${TOP_DIR}/mindspore/lite/build/minddata/libminddata-lite.so DESTINATION ${MIND_DATA_LIB_DIR} COMPONENT ${COMPONENT_NAME})
|
||||
elseif (PLATFORM_ARM32)
|
||||
install(FILES ${TOP_DIR}/mindspore/lite/build/minddata/libminddata-lite.so DESTINATION ${LIB_DIR} COMPONENT ${COMPONENT_NAME})
|
||||
install(DIRECTORY ${TOP_DIR}/mindspore/ccsrc/minddata/dataset/kernels/image/lite_cv DESTINATION ${MIND_DATA_INC_DIR} COMPONENT ${COMPONENT_NAME} FILES_MATCHING PATTERN "*.h")
|
||||
install(FILES ${TOP_DIR}/mindspore/lite/build/minddata/libminddata-lite.so DESTINATION ${MIND_DATA_LIB_DIR} COMPONENT ${COMPONENT_NAME})
|
||||
else ()
|
||||
install(FILES ${TOP_DIR}/mindspore/lite/build/minddata/libminddata-lite.so DESTINATION ${LIB_DIR_RUN_X86} COMPONENT ${RUN_X86_COMPONENT_NAME})
|
||||
install(DIRECTORY ${TOP_DIR}/mindspore/ccsrc/minddata/dataset/kernels/image/lite_cv DESTINATION ${MIND_DATA_INC_DIR_RUN_X86} COMPONENT ${COMPONENT_NAME} FILES_MATCHING PATTERN "*.h")
|
||||
install(FILES ${TOP_DIR}/mindspore/lite/build/minddata/libminddata-lite.so DESTINATION ${MIND_DATA_LIB_DIR_RUN_X86} COMPONENT ${RUN_X86_COMPONENT_NAME})
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ option(BUILD_CONVERTER "if build converter" on)
|
|||
option(ENABLE_FP16 "if build fp16 ops" off)
|
||||
option(SUPPORT_GPU "if support gpu" off)
|
||||
option(OFFLINE_COMPILE "if offline compile OpenCL kernel" off)
|
||||
set(BUILD_MINDDATA "off" CACHE STRING "off, lite, lite_cv or full")
|
||||
set(BUILD_MINDDATA "lite_cv" CACHE STRING "off, lite, lite_cv or full")
|
||||
option(BUILD_MINDDATA_EXAMPLE "" on)
|
||||
option(ENABLE_VERBOSE "" off)
|
||||
add_compile_definitions(NO_DLIB)
|
||||
|
@ -212,15 +212,6 @@ if (BUILD_MINDDATA STREQUAL "lite" OR BUILD_MINDDATA STREQUAL "full")
|
|||
endif ()
|
||||
|
||||
if (BUILD_MINDDATA STREQUAL "lite_cv")
|
||||
if (PLATFORM_ARM64)
|
||||
set(COMPONENT_NAME minddata-arm64-${PROCESS_UNIT})
|
||||
elseif (PLATFORM_ARM32)
|
||||
set(COMPONENT_NAME minddata-arm32-${PROCESS_UNIT})
|
||||
elseif (WIN32)
|
||||
set(COMPONENT_NAME minddata-win-${PROCESS_UNIT})
|
||||
else ()
|
||||
set(COMPONENT_NAME minddata-ubuntu-${PROCESS_UNIT})
|
||||
endif()
|
||||
add_compile_definitions(ENABLE_ANDROID)
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/minddata)
|
||||
endif ()
|
||||
|
|
Loading…
Reference in New Issue