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

feat(mge/imperative): name so lib

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