|
|
@@ -40,6 +40,11 @@ option(MGE_USE_SYSTEM_LIB "Build MegEngine with system libraries." OFF) |
|
|
|
option(MGB_WITH_FLATBUFFERS "Build MegBrain with FlatBuffers serialization support." ON) |
|
|
|
option(BUILD_SHARED_LIBS "Build shared libraries" ON) |
|
|
|
|
|
|
|
if (APPLE) |
|
|
|
set (BUILD_SHARED_LIBS OFF) |
|
|
|
message("build static for xcode framework require") |
|
|
|
endif() |
|
|
|
|
|
|
|
if (MGE_USE_SYSTEM_LIB) |
|
|
|
set (MGE_CUDA_USE_STATIC OFF) |
|
|
|
endif() |
|
|
@@ -245,8 +250,6 @@ if(MGE_INFERENCE_ONLY) |
|
|
|
set(MGE_WITH_DISTRIBUTED OFF) |
|
|
|
message("-- Disable python module for inference only build.") |
|
|
|
set(MGE_WITH_PYTHON_MODULE OFF) |
|
|
|
message("-- Disable tests for inference only build.") |
|
|
|
set(MGE_WITH_TEST OFF) |
|
|
|
endif() |
|
|
|
|
|
|
|
if(MGE_WITH_DISTRIBUTED) |
|
|
@@ -469,7 +472,7 @@ endif() |
|
|
|
set(MGB_ENABLE_TENSOR_RT ${MGE_WITH_TRT}) |
|
|
|
|
|
|
|
# Inference only |
|
|
|
if(MGE_INFERENCE_ONLY) |
|
|
|
if(MGE_INFERENCE_ONLY AND NOT MGE_WITH_TEST) |
|
|
|
set(MGB_ENABLE_GRAD 0) |
|
|
|
set(MGB_BUILD_SLIM_SERVING 1) |
|
|
|
else() |
|
|
|