Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MegEngine 天元
MegEngine
提交
bc2dfcbb
MegEngine
项目概览
MegEngine 天元
/
MegEngine
1 年多 前同步成功
通知
410
Star
4707
Fork
583
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
MegEngine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
bc2dfcbb
编写于
8月 22, 2020
作者:
M
Megvii Engine Team
提交者:
Xinran Xu
8月 25, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor(cmake): clear cmakelist file may caused by some commit conflict fix error
GitOrigin-RevId: ac5acfdf4c8935f2a97554193bffe6fb6b7b9d43
上级
a1e67207
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
11 addition
and
23 deletion
+11
-23
CMakeLists.txt
CMakeLists.txt
+11
-23
未找到文件。
CMakeLists.txt
浏览文件 @
bc2dfcbb
...
...
@@ -39,6 +39,17 @@ option(MGE_WITH_TRT "Build MegEngine with TensorRT." ON)
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
)
option
(
MGE_ENABLE_RTTI
"Build with RTTI"
ON
)
option
(
MGE_ENABLE_LOGGING
"Build with logging"
ON
)
option
(
MGE_DEBUG_UTIL
"Enable debug utility"
ON
)
option
(
MGE_ENABLE_EXCEPTIONS
"Build with exceptions"
ON
)
option
(
MGE_WITH_TEST
"Enable test for MegEngine."
OFF
)
option
(
MGE_WITH_DISTRIBUTED
"Build with distributed support"
ON
)
option
(
MGE_BUILD_IMPERATIVE_RT
"Build _imperative_rt.so instead of _mgb.so "
OFF
)
option
(
MGE_BUILD_SDK
"Build load_and_run"
ON
)
option
(
MGE_INFERENCE_ONLY
"Build inference only library."
OFF
)
option
(
MGE_WITH_PYTHON_MODULE
"Build MegEngine Python Module."
ON
)
option
(
MGE_WITH_MKLDNN
"Enable Intel MKL_DNN support,"
ON
)
if
(
APPLE
)
set
(
BUILD_SHARED_LIBS OFF
)
...
...
@@ -167,15 +178,6 @@ if(CXX_SUPPORT_GOLD AND NOT ANDROID AND NOT APPLE AND NOT MSVC AND NOT WIN32)
set
(
CMAKE_EXE_LINKER_FLAGS
"
${
CMAKE_EXE_LINKER_FLAGS
}
${
MGE_COMMON_LINKER_FLAGS
}
"
)
endif
()
option
(
MGE_WITH_JIT
"Build MegEngine with JIT."
ON
)
option
(
MGE_WITH_HALIDE
"Build MegEngine with Halide JIT"
ON
)
option
(
MGE_DISABLE_FLOAT16
"Disable MegEngine float16 support."
OFF
)
option
(
MGE_WITH_CUDA
"Enable MegEngine CUDA support."
ON
)
option
(
MGE_CUDA_USE_STATIC
"Enable MegEngine CUDA static linking."
ON
)
option
(
MGE_WITH_TRT
"Build MegEngine with TensorRT."
ON
)
option
(
MGE_USE_SYSTEM_LIB
"Build MegEngine with system libraries."
OFF
)
option
(
MGB_WITH_FLATBUFFERS
"Build MegBrain with FlatBuffers serialization support."
ON
)
if
(
NOT MGE_WITH_JIT
)
if
(
MGE_WITH_HALIDE
)
message
(
WARNING
"MGE_WITH_HALIDE is set to OFF with MGE_WITH_JIT disabled"
)
...
...
@@ -221,10 +223,6 @@ if(NOT CMAKE_CUDA_HOST_COMPILER)
set
(
CMAKE_CUDA_HOST_COMPILER $
(
CMAKE_CXX_COMPILER
))
endif
()
option
(
MGE_ENABLE_RTTI
"Build with RTTI"
ON
)
option
(
MGE_ENABLE_LOGGING
"Build with logging"
ON
)
option
(
MGE_DEBUG_UTIL
"Enable debug utility"
ON
)
if
(
NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE
)
message
(
STATUS
"Setting build type to 'RelWithDebInfo' as none was specified."
)
set
(
CMAKE_BUILD_TYPE RelWithDebInfo
)
...
...
@@ -234,25 +232,19 @@ if(NOT MGE_ENABLE_RTTI)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-fno-rtti"
)
endif
()
option
(
MGE_ENABLE_EXCEPTIONS
"Build with exceptions"
ON
)
if
(
NOT MGE_ENABLE_EXCEPTIONS
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-fno-exception"
)
endif
()
option
(
MGE_WITH_TEST
"Enable test for MegEngine."
OFF
)
if
(
MGE_WITH_TEST
)
include
(
cmake/gtest.cmake
)
endif
()
option
(
MGE_WITH_DISTRIBUTED
"Build with distributed support"
ON
)
option
(
MGE_BUILD_IMPERATIVE_RT
"Build _imperative_rt.so instead of _mgb.so "
OFF
)
if
(
MGE_BUILD_IMPERATIVE_RT
)
add_compile_definitions
(
MGB_ENABLE_IMPERATIVE_RUNTIME
)
set
(
CMAKE_CXX_STANDARD 17
)
endif
()
option
(
MGE_BUILD_SDK
"Build load_and_run"
ON
)
if
(
MGE_BUILD_IMPERATIVE_RT
)
set
(
MGE_BUILD_SDK OFF
)
endif
()
...
...
@@ -262,8 +254,6 @@ if(NOT MGE_WITH_CUDA)
set
(
MGE_WITH_DISTRIBUTED OFF
)
endif
()
option
(
MGE_INFERENCE_ONLY
"Build inference only library."
OFF
)
option
(
MGE_WITH_PYTHON_MODULE
"Build MegEngine Python Module."
ON
)
if
(
MGE_INFERENCE_ONLY
)
message
(
"-- Disable distributed support for inference only build."
)
set
(
MGE_WITH_DISTRIBUTED OFF
)
...
...
@@ -438,8 +428,6 @@ if(${MGE_ARCH} STREQUAL "x86_64" OR ${MGE_ARCH} STREQUAL "i386")
endif
()
endif
()
option
(
MGE_WITH_MKLDNN
"Enable Intel MKL_DNN support,"
ON
)
# MKLDNN build
if
(
MGE_WITH_MKLDNN AND
${
MGE_ARCH
}
STREQUAL
"x86_64"
)
include
(
cmake/MKL_DNN.cmake
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录