Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MegEngine 天元
MegEngine
提交
165798bf
MegEngine
项目概览
MegEngine 天元
/
MegEngine
1 年多 前同步成功
通知
404
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看板
提交
165798bf
编写于
9月 22, 2020
作者:
M
Megvii Engine Team
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(mge/build): move version.ld to src under project source root
GitOrigin-RevId: 04f39943c4cbe0cc116ef5d68c47c6a114d799ee
上级
92afcf3e
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
6 addition
and
5 deletion
+6
-5
CMakeLists.txt
CMakeLists.txt
+2
-0
imperative/CMakeLists.txt
imperative/CMakeLists.txt
+3
-4
src/CMakeLists.txt
src/CMakeLists.txt
+1
-1
src/version.ld
src/version.ld
+0
-0
未找到文件。
CMakeLists.txt
浏览文件 @
165798bf
...
@@ -710,6 +710,8 @@ endif()
...
@@ -710,6 +710,8 @@ endif()
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
MARCH
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
MARCH
}
"
)
set
(
MGE_VERSION_SCRIPT
${
PROJECT_SOURCE_DIR
}
/src/version.ld CACHE INTERNAL
"Path to linker version script"
)
# Write out megbrain_build_config.h
# Write out megbrain_build_config.h
# It defines macros needed by both megbrain and dnn
# It defines macros needed by both megbrain and dnn
configure_file
(
src/megbrain_build_config.h.in
${
CMAKE_CURRENT_BINARY_DIR
}
/genfiles/megbrain_build_config.h
)
configure_file
(
src/megbrain_build_config.h.in
${
CMAKE_CURRENT_BINARY_DIR
}
/genfiles/megbrain_build_config.h
)
...
...
imperative/CMakeLists.txt
浏览文件 @
165798bf
...
@@ -47,8 +47,7 @@ add_custom_target(gen_opr_py DEPENDS ${GEN_OPS_FILE})
...
@@ -47,8 +47,7 @@ add_custom_target(gen_opr_py DEPENDS ${GEN_OPS_FILE})
##################### end of opdef generation #########################
##################### end of opdef generation #########################
set
(
VERSION_SCRIPT
${
CMAKE_CURRENT_SOURCE_DIR
}
/src/version.ld
)
add_custom_target
(
_version_ld SOURCES
${
MGE_VERSION_SCRIPT
}
)
add_custom_target
(
_version_ld SOURCES
${
VERSION_SCRIPT
}
)
add_subdirectory
(
${
PROJECT_SOURCE_DIR
}
/third_party/pybind11
${
PROJECT_BINARY_DIR
}
/third_party/pybind11
)
add_subdirectory
(
${
PROJECT_SOURCE_DIR
}
/third_party/pybind11
${
PROJECT_BINARY_DIR
}
/third_party/pybind11
)
pybind11_add_module
(
${
MODULE_NAME
}
NO_EXTRAS
${
SRCS
}
)
pybind11_add_module
(
${
MODULE_NAME
}
NO_EXTRAS
${
SRCS
}
)
...
@@ -62,11 +61,11 @@ elseif (MSVC OR WIN32)
...
@@ -62,11 +61,11 @@ elseif (MSVC OR WIN32)
else
()
else
()
if
(
MGE_WITH_PYTHON_MODULE
)
if
(
MGE_WITH_PYTHON_MODULE
)
# use to fix runtime crash when build both mgb(MGE_WITH_PYTHON_MODULE) and imperative(MGE_BUILD_IMPERATIVE_RT)
# 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
}
)
target_link_libraries
(
${
MODULE_NAME
}
PRIVATE megengine_export -Wl,--version-script=
${
MGE_
VERSION_SCRIPT
}
)
else
()
else
()
# use to reduce whl size by depend on megbrain/dnn directly, caused by cmake create two cuda fatbin
# 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
# 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
}
)
target_link_libraries
(
${
MODULE_NAME
}
PRIVATE megbrain megdnn -Wl,--version-script=
${
MGE_
VERSION_SCRIPT
}
)
if
(
MGE_WITH_DISTRIBUTED
)
if
(
MGE_WITH_DISTRIBUTED
)
message
(
"-- Imperative configured to link megray"
)
message
(
"-- Imperative configured to link megray"
)
target_link_libraries
(
${
MODULE_NAME
}
PRIVATE megray
)
target_link_libraries
(
${
MODULE_NAME
}
PRIVATE megray
)
...
...
src/CMakeLists.txt
浏览文件 @
165798bf
...
@@ -181,7 +181,7 @@ if(ANDROID)
...
@@ -181,7 +181,7 @@ if(ANDROID)
target_link_libraries
(
megbrain PUBLIC log
)
target_link_libraries
(
megbrain PUBLIC log
)
endif
()
endif
()
set
(
_VER_FILE
${
PROJECT_SOURCE_DIR
}
/
imperative/
src/version.ld
)
set
(
_VER_FILE
${
PROJECT_SOURCE_DIR
}
/src/version.ld
)
if
(
MGE_BUILD_IMPERATIVE_RT
if
(
MGE_BUILD_IMPERATIVE_RT
)
)
...
...
imperative/
src/version.ld
→
src/version.ld
浏览文件 @
165798bf
文件已移动
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录