forked from mindspore-Ecosystem/mindspore
cmakelist bugfix
This commit is contained in:
parent
4b27d85b28
commit
f9e197f49c
|
@ -1,8 +1,8 @@
|
|||
if(BUILD_LITE)
|
||||
if(MSVC)
|
||||
set(flatbuffers_CXXFLAGS "${CMAKE_CXX_FLAGS}")
|
||||
set(flatbuffers_CFLAGS "${CMAKE_C_FLAGS}")
|
||||
set(flatbuffers_LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
|
||||
set(glog_CXXFLAGS "${CMAKE_CXX_FLAGS}")
|
||||
set(glog_CFLAGS "${CMAKE_C_FLAGS}")
|
||||
set(glog_LDFLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
|
||||
else()
|
||||
set(glog_CXXFLAGS "-D_FORTIFY_SOURCE=2 -O2 ${SECURE_CXX_FLAGS} -Dgoogle=mindspore_private")
|
||||
set(glog_CFLAGS "-D_FORTIFY_SOURCE=2 -O2 ${SECURE_C_FLAGS}")
|
||||
|
|
|
@ -86,6 +86,18 @@ if(DEFINED ENV{MSLITE_ENABLE_TRAIN})
|
|||
set(MSLITE_ENABLE_TRAIN $ENV{MSLITE_ENABLE_TRAIN})
|
||||
endif()
|
||||
|
||||
if(DEFINED ENV{MSLITE_ENABLE_SERVER_INFERENCE})
|
||||
set(MSLITE_ENABLE_SERVER_INFERENCE $ENV{MSLITE_ENABLE_SERVER_INFERENCE})
|
||||
endif()
|
||||
if(MSLITE_ENABLE_SERVER_INFERENCE)
|
||||
set(MSLITE_ENABLE_DYNAMIC_THREAD_DISTRIBUTE on)
|
||||
set(MSLITE_ENABLE_BFC_MEMORY on)
|
||||
set(MSLITE_ENABLE_PARALLEL_INFERENCE on)
|
||||
set(MSLITE_ENABLE_SHARING_MODEL_WEIGHT on)
|
||||
set(MSLITE_ENABLE_RUNTIME_GLOG on)
|
||||
set(MSLITE_ENABLE_AVX512 on)
|
||||
add_compile_definitions(SERVER_INFERENCE)
|
||||
endif()
|
||||
if(DEFINED ENV{MSLITE_ENABLE_SSE})
|
||||
set(MSLITE_ENABLE_SSE $ENV{MSLITE_ENABLE_SSE})
|
||||
endif()
|
||||
|
@ -165,10 +177,6 @@ if(DEFINED ENV{MSLITE_ENABLE_COVERAGE})
|
|||
set(MSLITE_ENABLE_COVERAGE $ENV{MSLITE_ENABLE_COVERAGE})
|
||||
endif()
|
||||
|
||||
if(DEFINED ENV{MSLITE_ENABLE_SERVER_INFERENCE})
|
||||
set(MSLITE_ENABLE_SERVER_INFERENCE $ENV{MSLITE_ENABLE_SERVER_INFERENCE})
|
||||
endif()
|
||||
|
||||
if(DEFINED ENV{MSLITE_ENABLE_SERVING})
|
||||
set(MSLITE_ENABLE_SERVING $ENV{MSLITE_ENABLE_SERVING})
|
||||
endif()
|
||||
|
@ -263,16 +271,6 @@ else()
|
|||
set(MSLITE_ENABLE_NPU off)
|
||||
endif()
|
||||
|
||||
if(MSLITE_ENABLE_SERVER_INFERENCE)
|
||||
set(MSLITE_ENABLE_DYNAMIC_THREAD_DISTRIBUTE on)
|
||||
set(MSLITE_ENABLE_BFC_MEMORY on)
|
||||
set(MSLITE_ENABLE_PARALLEL_INFERENCE on)
|
||||
set(MSLITE_ENABLE_SHARING_MODEL_WEIGHT on)
|
||||
set(MSLITE_ENABLE_RUNTIME_GLOG on)
|
||||
set(MSLITE_ENABLE_AVX512 on)
|
||||
add_compile_definitions(SERVER_INFERENCE)
|
||||
endif()
|
||||
|
||||
if(DEFINED ENV{MSLITE_ENABLE_RUNTIME_GLOG})
|
||||
set(MSLITE_ENABLE_RUNTIME_GLOG $ENV{MSLITE_ENABLE_RUNTIME_GLOG})
|
||||
endif()
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
namespace mindspore {
|
||||
namespace OpenGL {
|
||||
#if defined(GPU_OPENCL) && defined(__ANDROID__)
|
||||
#if defined(GPU_OPENCL) && defined(__ANDROID__) && defined(ENABLE_ARM64)
|
||||
const char *g_glsl_host_to_device_2d =
|
||||
"#version 320 es\n"
|
||||
"#define PRECISION highp\n"
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include "src/common/log_adapter.h"
|
||||
#include "nnacl/op_base.h"
|
||||
|
||||
#if defined(GPU_OPENCL) && defined(__ANDROID__)
|
||||
#if defined(GPU_OPENCL) && defined(__ANDROID__) && defined(ENABLE_ARM64)
|
||||
#include "EGL/egl.h"
|
||||
#include "GLES3/gl3.h"
|
||||
#include "GLES3/gl32.h"
|
||||
|
|
Loading…
Reference in New Issue