Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MegEngine 天元
MegEngine
提交
26e473e7
MegEngine
项目概览
MegEngine 天元
/
MegEngine
1 年多 前同步成功
通知
403
Star
4705
Fork
582
代码
文件
提交
分支
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看板
提交
26e473e7
编写于
9月 18, 2020
作者:
M
Megvii Engine Team
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(whl/linux): reduce external megengine whl package size
GitOrigin-RevId: 3528af8baeab4ed47eee04107665610e9ababdc9
上级
c076202f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
15 addition
and
2 deletion
+15
-2
CMakeLists.txt
CMakeLists.txt
+2
-0
imperative/CMakeLists.txt
imperative/CMakeLists.txt
+12
-1
src/CMakeLists.txt
src/CMakeLists.txt
+1
-1
未找到文件。
CMakeLists.txt
浏览文件 @
26e473e7
...
...
@@ -53,9 +53,11 @@ option(MGE_WITH_DISTRIBUTED "Build with distributed support" ON)
option
(
MGE_BUILD_IMPERATIVE_RT
"Build _imperative_rt Python Module "
ON
)
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 legacy Python Module."
OFF
)
option
(
MGE_WITH_MKLDNN
"Enable Intel MKL_DNN support,"
ON
)
option
(
MGE_WITH_ROCM
"Enable ROCM support"
OFF
)
if
(
NOT
${
MGE_BIN_REDUCE
}
STREQUAL
""
)
message
(
"build with BIN REDUCE"
)
if
(
MGE_WITH_MINIMUM_SIZE
)
...
...
imperative/CMakeLists.txt
浏览文件 @
26e473e7
...
...
@@ -60,7 +60,18 @@ elseif (MSVC OR WIN32)
message
(
"-- CMAKE_MSVC_RUNTIME_LIBRARY:
${
CMAKE_MSVC_RUNTIME_LIBRARY
}
"
)
set_target_properties
(
${
MODULE_NAME
}
PROPERTIES MSVC_RUNTIME_LIBRARY
"
${
CMAKE_MSVC_RUNTIME_LIBRARY
}
"
)
else
()
target_link_libraries
(
${
MODULE_NAME
}
PRIVATE megengine_export -Wl,--version-script=
${
VERSION_SCRIPT
}
)
if
(
MGE_WITH_PYTHON_MODULE
)
# use to fix runtime crash when build both mgb(MGE_WITH_PYTHON_MODULE) and imperative(MGE_BUILD_IMPERATIVE_RT)
target_link_libraries
(
${
MODULE_NAME
}
PRIVATE megengine_export -Wl,--version-script=
${
VERSION_SCRIPT
}
)
else
()
# use to reduce whl size by depend on megbrain/dnn directly, caused by cmake create two cuda fatbin
# elf section on both megengine_export and target which depend on megengine_export
target_link_libraries
(
${
MODULE_NAME
}
PRIVATE megbrain megdnn -Wl,--version-script=
${
VERSION_SCRIPT
}
)
if
(
MGE_WITH_DISTRIBUTED
)
message
(
"-- Imperative configured to link megray"
)
target_link_libraries
(
${
MODULE_NAME
}
PRIVATE megray
)
endif
()
endif
()
endif
()
target_include_directories
(
${
MODULE_NAME
}
PUBLIC src/include PRIVATE
${
PYTHON_INCLUDE_DIRS
}
${
NUMPY_INCLUDE_DIR
}
)
...
...
src/CMakeLists.txt
浏览文件 @
26e473e7
...
...
@@ -189,7 +189,7 @@ if(MGE_BUILD_IMPERATIVE_RT
add_library
(
megengine_export SHARED
)
target_link_libraries
(
megengine_export PUBLIC megbrain megdnn
)
if
(
MGE_WITH_DISTRIBUTED
)
message
(
"megengine_export configured to link megray"
)
message
(
"
--
megengine_export configured to link megray"
)
target_link_libraries
(
megengine_export PUBLIC megray
)
endif
()
endif
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录