提交 0f9dec68 编写于 作者: M Megvii Engine Team

feat(mge/imperative): name so lib

GitOrigin-RevId: ccfdfaf59fb56db4337cc0987046eccec69e7118
上级 618faf64
......@@ -236,14 +236,14 @@ if(MGE_WITH_TEST)
endif()
option(MGE_WITH_DISTRIBUTED "Build with distributed support" ON)
option(MGE_BUILD_XXX "Build _xxx.so instead of mgb.so " OFF)
if(MGE_BUILD_XXX)
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_XXX)
if(MGE_BUILD_IMPERATIVE_RT)
set(MGE_BUILD_SDK OFF)
endif()
......@@ -561,7 +561,7 @@ endif()
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MARCH}")
set(MGB_ENABLE_IMPERATIVE ${MGE_BUILD_XXX})
set(MGB_ENABLE_IMPERATIVE ${MGE_BUILD_IMPERATIVE_RT})
# Write out megbrain_build_config.h
# 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)
......@@ -611,7 +611,7 @@ if(MGE_BUILD_SDK)
endif()
if(MGE_WITH_PYTHON_MODULE)
if(MGE_BUILD_XXX)
if(MGE_BUILD_IMPERATIVE_RT)
add_subdirectory(imperative)
else()
add_subdirectory(python_module)
......@@ -619,7 +619,7 @@ if(MGE_WITH_PYTHON_MODULE)
endif()
if(MGE_WITH_TEST AND MGE_ENABLE_RTTI)
if(NOT MGE_BUILD_XXX)
if(NOT MGE_BUILD_IMPERATIVE_RT)
add_subdirectory(test)
endif()
endif()
......@@ -645,7 +645,7 @@ if(TARGET mgb)
DEPENDS mgb
VERBATIM
)
elseif(TARGET _xxx)
elseif(TARGET _imperative_rt)
add_custom_target(
develop
COMMAND ${CMAKE_COMMAND} -E create_symlink
......@@ -657,7 +657,7 @@ elseif(TARGET _xxx)
COMMAND ${CMAKE_COMMAND} -E create_symlink
${CMAKE_CURRENT_BINARY_DIR}/imperative/python/${PACKAGE_NAME}/core/ops/_internal/param_defs.py
${CMAKE_CURRENT_SOURCE_DIR}/imperative/python/${PACKAGE_NAME}/core/ops/_internal/param_defs.py
DEPENDS _xxx
DEPENDS _imperative_rt
VERBATIM
)
endif()
......
......@@ -59,7 +59,7 @@ install(TARGETS opr_param_defs EXPORT ${MGE_EXPORT_TARGETS})
if(MGE_WITH_TEST)
if(NOT MGE_BUILD_XXX)
if(NOT MGE_BUILD_IMPERATIVE_RT)
add_subdirectory(test)
endif()
endif()
......
......@@ -359,14 +359,14 @@ class PyWriter(IndentWriterBase):
else:
self._write(
'def _as_dtype_num(dtype):\n'
' import megengine.core._xxx.utils as m\n'
' import megengine.core._imperative_rt.utils as m\n'
' return m._get_dtype_num(dtype)\n'
'\n'
)
self._write(
'def _as_serialized_dtype(dtype):\n'
' import megengine.core._xxx.utils as m\n'
' import megengine.core._imperative_rt.utils as m\n'
' return m._get_serialized_dtype(dtype)\n'
'\n'
)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册