|
|
|
@@ -9,6 +9,7 @@ option(MS_VERSION_MAJOR "major version" 0) |
|
|
|
option(MS_VERSION_MINOR "minor version" 7) |
|
|
|
option(MS_VERSION_REVISION "revision version" 0) |
|
|
|
option(CMAKE_BUILD_TYPE "build type" Release) |
|
|
|
option(COMPILE_LITE "compile for lite" on) |
|
|
|
option(SUPPORT_TRAIN "if build for on-device train" off) |
|
|
|
option(PLATFORM_ARM64 "if build device for arm64" off) |
|
|
|
option(PLATFORM_ARM32 "if build device for arm32" off) |
|
|
|
@@ -26,7 +27,7 @@ option(BUILD_MINDDATA_EXAMPLE "" on) |
|
|
|
option(ENABLE_VERBOSE "" off) |
|
|
|
option(ENABLE_SSE "if x86_64 support SSE instruction set" off) |
|
|
|
option(ENABLE_AVX "if x86_64 support SSE instruction set" off) |
|
|
|
#option(ENABLE_MINDRT "if support mindrt" on) |
|
|
|
option(ENABLE_MINDRT "if support mindrt" on) |
|
|
|
|
|
|
|
set(DIR_PREFIX mindspore-lite) |
|
|
|
set(MS_VERSION ${MS_VERSION_MAJOR}.${MS_VERSION_MINOR}.${MS_VERSION_REVISION}) |
|
|
|
@@ -137,9 +138,8 @@ if(ENABLE_CONVERTER OR BUILD_MINDDATA STREQUAL "full" OR BUILD_MINDDATA STREQUAL |
|
|
|
include(${TOP_DIR}/cmake/external_libs/json.cmake) |
|
|
|
endif() |
|
|
|
|
|
|
|
set(ENABLE_MINDRT "off") |
|
|
|
if(PLATFORM_ARM AND NOT SUPPORT_TRAIN) |
|
|
|
set(ENABLE_MINDRT "on") |
|
|
|
if(SUPPORT_TRAIN OR WIN32) |
|
|
|
set(ENABLE_MINDRT "off") |
|
|
|
endif() |
|
|
|
|
|
|
|
file(GLOB FBS_FILES ${CMAKE_CURRENT_SOURCE_DIR}/schema/*.fbs) |
|
|
|
@@ -207,12 +207,7 @@ if(WIN32) |
|
|
|
add_compile_definitions(LITE_EXPORTS) |
|
|
|
add_compile_definitions(BUILDING_DLL) |
|
|
|
endif() |
|
|
|
|
|
|
|
if(ENABLE_MINDRT) |
|
|
|
include_directories(${CORE_DIR}/mindrt/include) |
|
|
|
add_compile_definitions(ENABLE_MINDRT) |
|
|
|
add_subdirectory(${CORE_DIR}/mindrt mindspore_mindrt) |
|
|
|
endif() |
|
|
|
add_subdirectory(${CORE_DIR}/mindrt mindspore_mindrt) |
|
|
|
|
|
|
|
if(ENABLE_CONVERTER) |
|
|
|
if(PLATFORM_ARM) |
|
|
|
@@ -225,6 +220,11 @@ if(ENABLE_CONVERTER) |
|
|
|
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/micro/coder) |
|
|
|
endif() |
|
|
|
|
|
|
|
if(ENABLE_MINDRT) |
|
|
|
include_directories(${CORE_DIR}/mindrt/include) |
|
|
|
add_compile_definitions(ENABLE_MINDRT) |
|
|
|
endif() |
|
|
|
|
|
|
|
if(PLATFORM_ARM32 OR PLATFORM_ARM64) |
|
|
|
if(NOT DEFINED ENV{ANDROID_NDK}) |
|
|
|
message(FATAL_ERROR "env ANDROID_NDK should be set for ARM compile") |
|
|
|
|