2020-04-13 15:30:25 +08:00
|
|
|
# include dependency
|
|
|
|
include(CMakePackageConfigHelpers)
|
|
|
|
include(GNUInstallDirs)
|
|
|
|
|
|
|
|
# set package information
|
|
|
|
set(CPACK_PACKAGE_NAME ${PROJECT_NAME})
|
|
|
|
set(CPACK_GENERATOR "External")
|
2021-04-06 21:25:33 +08:00
|
|
|
set(CPACK_CMAKE_GENERATOR "Ninja")
|
2020-04-13 15:30:25 +08:00
|
|
|
set(CPACK_EXTERNAL_PACKAGE_SCRIPT ${CMAKE_SOURCE_DIR}/cmake/package_script.cmake)
|
|
|
|
set(CPACK_EXTERNAL_ENABLE_STAGING true)
|
|
|
|
set(CPACK_TEMPORARY_PACKAGE_FILE_NAME ${CMAKE_SOURCE_DIR}/build/package/mindspore)
|
|
|
|
set(CPACK_TEMPORARY_INSTALL_DIRECTORY ${CMAKE_SOURCE_DIR}/build/package/mindspore)
|
2021-01-23 20:20:31 +08:00
|
|
|
if(ENABLE_GE)
|
2020-04-13 15:30:25 +08:00
|
|
|
set(CPACK_MS_BACKEND "ge")
|
2021-03-23 20:01:58 +08:00
|
|
|
set(CPACK_MS_TARGET "ascend or cpu")
|
2020-04-13 15:30:25 +08:00
|
|
|
set(CPACK_MS_PACKAGE_NAME "mindspore")
|
2021-01-23 20:20:31 +08:00
|
|
|
elseif(ENABLE_GPU)
|
2020-04-13 15:30:25 +08:00
|
|
|
set(CPACK_MS_BACKEND "ms")
|
2021-03-23 20:01:58 +08:00
|
|
|
set(CPACK_MS_TARGET "gpu or cpu")
|
2020-04-13 15:30:25 +08:00
|
|
|
set(CPACK_MS_PACKAGE_NAME "mindspore-gpu")
|
2021-01-23 20:20:31 +08:00
|
|
|
elseif(ENABLE_D)
|
2020-04-13 15:30:25 +08:00
|
|
|
set(CPACK_MS_BACKEND "ms")
|
2021-03-23 20:01:58 +08:00
|
|
|
set(CPACK_MS_TARGET "ascend or cpu")
|
2020-04-13 15:30:25 +08:00
|
|
|
set(CPACK_MS_PACKAGE_NAME "mindspore-ascend")
|
2021-01-23 20:20:31 +08:00
|
|
|
elseif(ENABLE_CPU)
|
2020-04-13 15:30:25 +08:00
|
|
|
set(CPACK_MS_BACKEND "ms")
|
2020-09-03 10:01:39 +08:00
|
|
|
set(CPACK_MS_TARGET "cpu")
|
2020-04-13 15:30:25 +08:00
|
|
|
set(CPACK_MS_PACKAGE_NAME "mindspore")
|
2021-01-23 20:20:31 +08:00
|
|
|
elseif(ENABLE_ACL)
|
2020-12-15 21:47:16 +08:00
|
|
|
set(CPACK_MS_BACKEND "debug")
|
2021-03-23 20:01:58 +08:00
|
|
|
set(CPACK_MS_TARGET "ascend or gpu or cpu")
|
2020-12-15 21:47:16 +08:00
|
|
|
set(CPACK_MS_PACKAGE_NAME "mindspore-ascend")
|
2021-01-23 20:20:31 +08:00
|
|
|
else()
|
2020-04-13 15:30:25 +08:00
|
|
|
set(CPACK_MS_BACKEND "debug")
|
2021-03-23 20:01:58 +08:00
|
|
|
set(CPACK_MS_TARGET "ascend or gpu or cpu")
|
2020-04-13 15:30:25 +08:00
|
|
|
set(CPACK_MS_PACKAGE_NAME "mindspore")
|
2021-01-23 20:20:31 +08:00
|
|
|
endif()
|
2020-04-13 15:30:25 +08:00
|
|
|
include(CPack)
|
|
|
|
|
|
|
|
# set install path
|
|
|
|
set(INSTALL_LIB_DIR ${CMAKE_INSTALL_LIBDIR} CACHE PATH "Installation directory for libraries")
|
|
|
|
set(INSTALL_PY_DIR ".")
|
|
|
|
set(INSTALL_BASE_DIR ".")
|
2020-08-21 00:27:39 +08:00
|
|
|
set(INSTALL_BIN_DIR "bin")
|
2020-12-08 23:37:12 +08:00
|
|
|
set(INSTALL_CFG_DIR "config")
|
2020-04-13 15:30:25 +08:00
|
|
|
|
2021-01-23 20:20:31 +08:00
|
|
|
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
|
2020-04-16 21:44:20 +08:00
|
|
|
set(INSTALL_LIB_DIR ".")
|
|
|
|
set(onednn_LIBPATH ${onednn_LIBPATH}/../bin/)
|
|
|
|
set(glog_LIBPATH ${glog_LIBPATH}/../bin/)
|
|
|
|
set(opencv_LIBPATH ${opencv_LIBPATH}/../bin/)
|
|
|
|
set(jpeg_turbo_LIBPATH ${jpeg_turbo_LIBPATH}/../bin/)
|
2020-04-17 16:05:21 +08:00
|
|
|
set(sqlite_LIBPATH ${sqlite_LIBPATH}/../bin/)
|
2020-05-09 15:38:47 +08:00
|
|
|
set(tinyxml2_LIBPATH ${tinyxml2_LIBPATH}/../bin/)
|
2020-07-15 10:09:02 +08:00
|
|
|
set(sentencepiece_LIBPATH ${sentencepiece_LIBPATH}/../bin/)
|
2021-01-23 20:20:31 +08:00
|
|
|
else()
|
2020-04-16 21:44:20 +08:00
|
|
|
set(INSTALL_LIB_DIR "lib")
|
2021-01-23 20:20:31 +08:00
|
|
|
endif()
|
2020-04-16 21:44:20 +08:00
|
|
|
|
2020-04-13 15:30:25 +08:00
|
|
|
# set package files
|
|
|
|
install(
|
|
|
|
TARGETS _c_expression
|
|
|
|
DESTINATION ${INSTALL_BASE_DIR}
|
|
|
|
COMPONENT mindspore
|
|
|
|
)
|
|
|
|
|
2021-04-02 02:24:05 +08:00
|
|
|
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
|
|
|
|
message("offline debugger does not support windows system temporarily")
|
|
|
|
else()
|
|
|
|
install(
|
|
|
|
TARGETS _mindspore_offline_debug
|
|
|
|
DESTINATION ${INSTALL_BASE_DIR}
|
|
|
|
COMPONENT mindspore
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2020-09-18 14:09:16 +08:00
|
|
|
install(
|
|
|
|
TARGETS mindspore_shared_lib
|
2021-01-26 17:06:34 +08:00
|
|
|
DESTINATION ${INSTALL_LIB_DIR}
|
2020-09-18 14:09:16 +08:00
|
|
|
COMPONENT mindspore
|
|
|
|
)
|
|
|
|
|
2020-08-11 12:40:23 +08:00
|
|
|
install(
|
2020-10-15 10:53:47 +08:00
|
|
|
TARGETS mindspore_gvar
|
|
|
|
DESTINATION ${INSTALL_LIB_DIR}
|
|
|
|
COMPONENT mindspore
|
2020-08-11 12:40:23 +08:00
|
|
|
)
|
|
|
|
|
2021-01-23 20:20:31 +08:00
|
|
|
if(USE_GLOG)
|
2021-03-07 17:06:18 +08:00
|
|
|
file(GLOB_RECURSE GLOG_LIB_LIST ${glog_LIBPATH}/libmindspore_glog*)
|
2020-04-13 15:30:25 +08:00
|
|
|
install(
|
|
|
|
FILES ${GLOG_LIB_LIST}
|
|
|
|
DESTINATION ${INSTALL_LIB_DIR}
|
|
|
|
COMPONENT mindspore
|
|
|
|
)
|
2021-01-23 20:20:31 +08:00
|
|
|
endif()
|
2020-04-13 15:30:25 +08:00
|
|
|
|
2020-10-11 19:09:44 +08:00
|
|
|
file(GLOB_RECURSE LIBEVENT_LIB_LIST
|
2020-11-24 21:04:04 +08:00
|
|
|
${libevent_LIBPATH}/libevent*${CMAKE_SHARED_LIBRARY_SUFFIX}*
|
|
|
|
${libevent_LIBPATH}/libevent_pthreads*${CMAKE_SHARED_LIBRARY_SUFFIX}*
|
2020-10-11 19:09:44 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
install(
|
|
|
|
FILES ${LIBEVENT_LIB_LIST}
|
|
|
|
DESTINATION ${INSTALL_LIB_DIR}
|
|
|
|
COMPONENT mindspore
|
|
|
|
)
|
2020-11-24 21:04:04 +08:00
|
|
|
|
2021-01-23 20:20:31 +08:00
|
|
|
if(ENABLE_MINDDATA)
|
2020-04-13 15:30:25 +08:00
|
|
|
install(
|
|
|
|
TARGETS _c_dataengine _c_mindrecord
|
|
|
|
DESTINATION ${INSTALL_BASE_DIR}
|
|
|
|
COMPONENT mindspore
|
|
|
|
)
|
2021-01-23 20:20:31 +08:00
|
|
|
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
2020-08-21 00:27:39 +08:00
|
|
|
install(
|
|
|
|
TARGETS cache_admin cache_server
|
|
|
|
OPTIONAL
|
|
|
|
DESTINATION ${INSTALL_BIN_DIR}
|
|
|
|
COMPONENT mindspore
|
|
|
|
)
|
|
|
|
endif()
|
2020-04-13 15:30:25 +08:00
|
|
|
file(GLOB_RECURSE OPENCV_LIB_LIST
|
|
|
|
${opencv_LIBPATH}/libopencv_core*
|
|
|
|
${opencv_LIBPATH}/libopencv_imgcodecs*
|
|
|
|
${opencv_LIBPATH}/libopencv_imgproc*
|
|
|
|
)
|
|
|
|
install(
|
|
|
|
FILES ${OPENCV_LIB_LIST}
|
|
|
|
DESTINATION ${INSTALL_LIB_DIR}
|
|
|
|
COMPONENT mindspore
|
|
|
|
)
|
2020-12-15 21:47:16 +08:00
|
|
|
file(GLOB_RECURSE TINYXML2_LIB_LIST ${tinyxml2_LIBPATH}/libtinyxml2*)
|
2020-05-09 15:38:47 +08:00
|
|
|
install(
|
2020-12-15 21:47:16 +08:00
|
|
|
FILES ${TINYXML2_LIB_LIST}
|
2020-05-09 15:38:47 +08:00
|
|
|
DESTINATION ${INSTALL_LIB_DIR}
|
|
|
|
COMPONENT mindspore
|
|
|
|
)
|
2020-07-15 10:09:02 +08:00
|
|
|
file(GLOB_RECURSE SENTENCEPIECE_LIB_LIST
|
|
|
|
${sentencepiece_LIBPATH}/libsentencepiece*
|
|
|
|
)
|
|
|
|
install(
|
|
|
|
FILES ${SENTENCEPIECE_LIB_LIST}
|
|
|
|
DESTINATION ${INSTALL_LIB_DIR}
|
|
|
|
COMPONENT mindspore
|
|
|
|
)
|
2021-01-23 20:20:31 +08:00
|
|
|
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
|
2020-05-05 16:51:05 +08:00
|
|
|
message("icu4c does not support windows system temporarily")
|
|
|
|
else()
|
|
|
|
file(GLOB_RECURSE ICU4C_LIB_LIST
|
|
|
|
${icu4c_LIBPATH}/libicuuc*
|
|
|
|
${icu4c_LIBPATH}/libicudata*
|
|
|
|
${icu4c_LIBPATH}/libicui18n*
|
|
|
|
)
|
|
|
|
install(
|
|
|
|
FILES ${ICU4C_LIB_LIST}
|
|
|
|
DESTINATION ${INSTALL_LIB_DIR}
|
|
|
|
COMPONENT mindspore
|
|
|
|
)
|
|
|
|
endif()
|
2021-01-23 20:20:31 +08:00
|
|
|
endif()
|
2020-04-13 15:30:25 +08:00
|
|
|
|
2021-01-23 20:20:31 +08:00
|
|
|
if(ENABLE_CPU)
|
|
|
|
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
2020-04-13 15:30:25 +08:00
|
|
|
file(GLOB_RECURSE DNNL_LIB_LIST ${onednn_LIBPATH}/libdnnl${CMAKE_SHARED_LIBRARY_SUFFIX}*)
|
2021-01-23 20:20:31 +08:00
|
|
|
elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
2020-04-13 15:30:25 +08:00
|
|
|
file(GLOB_RECURSE DNNL_LIB_LIST ${onednn_LIBPATH}/libdnnl*${CMAKE_SHARED_LIBRARY_SUFFIX}*)
|
2021-01-23 20:20:31 +08:00
|
|
|
elseif(CMAKE_SYSTEM_NAME MATCHES "Windows")
|
2020-04-16 21:44:20 +08:00
|
|
|
file(GLOB_RECURSE DNNL_LIB_LIST ${onednn_LIBPATH}/dnnl.dll)
|
2021-01-23 20:20:31 +08:00
|
|
|
endif()
|
2020-04-13 15:30:25 +08:00
|
|
|
install(
|
|
|
|
FILES ${DNNL_LIB_LIST}
|
|
|
|
DESTINATION ${INSTALL_LIB_DIR}
|
|
|
|
COMPONENT mindspore
|
|
|
|
)
|
2021-04-12 00:31:58 +08:00
|
|
|
install(
|
|
|
|
TARGETS nnacl
|
|
|
|
DESTINATION ${INSTALL_LIB_DIR}
|
|
|
|
COMPONENT mindspore
|
|
|
|
)
|
2021-01-23 20:20:31 +08:00
|
|
|
endif()
|
2020-04-13 15:30:25 +08:00
|
|
|
|
2021-01-23 20:20:31 +08:00
|
|
|
if(ENABLE_MPI)
|
|
|
|
if(ENABLE_GPU)
|
2020-08-05 22:07:45 +08:00
|
|
|
install(
|
|
|
|
TARGETS _ms_mpi
|
|
|
|
DESTINATION ${INSTALL_BASE_DIR}
|
|
|
|
COMPONENT mindspore
|
|
|
|
)
|
2021-01-23 20:20:31 +08:00
|
|
|
endif()
|
|
|
|
if(ENABLE_CPU)
|
2020-08-05 22:07:45 +08:00
|
|
|
install(
|
|
|
|
TARGETS mpi_adapter
|
|
|
|
DESTINATION ${INSTALL_LIB_DIR}
|
|
|
|
COMPONENT mindspore
|
|
|
|
)
|
2021-01-23 20:20:31 +08:00
|
|
|
endif()
|
|
|
|
endif()
|
2020-06-04 17:20:47 +08:00
|
|
|
|
2021-01-23 20:20:31 +08:00
|
|
|
if(ENABLE_GPU)
|
|
|
|
if(ENABLE_MPI)
|
2020-04-16 09:22:47 +08:00
|
|
|
install(
|
|
|
|
TARGETS gpu_collective
|
|
|
|
DESTINATION ${INSTALL_LIB_DIR}
|
|
|
|
COMPONENT mindspore
|
|
|
|
)
|
2021-01-23 20:20:31 +08:00
|
|
|
endif()
|
2020-04-16 09:22:47 +08:00
|
|
|
install(
|
|
|
|
TARGETS gpu_queue
|
|
|
|
DESTINATION ${INSTALL_LIB_DIR}
|
|
|
|
COMPONENT mindspore
|
|
|
|
)
|
2021-01-23 20:20:31 +08:00
|
|
|
endif()
|
2020-04-13 15:30:25 +08:00
|
|
|
|
2021-04-26 14:36:19 +08:00
|
|
|
if(ENABLE_CPU AND NOT WIN32)
|
2020-11-04 15:36:39 +08:00
|
|
|
install(
|
|
|
|
TARGETS ps_cache
|
|
|
|
DESTINATION ${INSTALL_LIB_DIR}
|
|
|
|
COMPONENT mindspore
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2021-01-23 20:20:31 +08:00
|
|
|
if(ENABLE_TESTCASES)
|
2020-08-18 19:31:57 +08:00
|
|
|
file(GLOB_RECURSE LIBEVENT_LIB_LIST
|
|
|
|
${libevent_LIBPATH}/libevent*
|
|
|
|
${libevent_LIBPATH}/libevent_pthreads*
|
|
|
|
)
|
2021-01-23 20:20:31 +08:00
|
|
|
endif()
|
2020-08-18 19:31:57 +08:00
|
|
|
|
2021-01-23 20:20:31 +08:00
|
|
|
if(NOT ENABLE_GE)
|
|
|
|
if(ENABLE_D OR ENABLE_ACL)
|
|
|
|
if(DEFINED ENV{ASCEND_CUSTOM_PATH})
|
2020-04-13 15:30:25 +08:00
|
|
|
set(ASCEND_PATH $ENV{ASCEND_CUSTOM_PATH})
|
2021-01-23 20:20:31 +08:00
|
|
|
else()
|
2020-04-13 15:30:25 +08:00
|
|
|
set(ASCEND_PATH /usr/local/Ascend)
|
2021-01-23 20:20:31 +08:00
|
|
|
endif()
|
2020-04-13 15:30:25 +08:00
|
|
|
set(ASCEND_DRIVER_PATH ${ASCEND_PATH}/driver/lib64/common)
|
|
|
|
|
|
|
|
install(
|
2020-12-09 15:00:38 +08:00
|
|
|
FILES ${CMAKE_SOURCE_DIR}/build/graphengine/c_sec/lib/libc_sec.so
|
2020-10-15 10:53:47 +08:00
|
|
|
DESTINATION ${INSTALL_LIB_DIR}
|
|
|
|
COMPONENT mindspore
|
|
|
|
)
|
2020-09-18 14:09:16 +08:00
|
|
|
|
2021-01-23 20:20:31 +08:00
|
|
|
if(ENABLE_D)
|
2020-09-18 14:09:16 +08:00
|
|
|
install(
|
2020-12-03 09:29:32 +08:00
|
|
|
TARGETS ms_profile
|
2020-09-18 14:09:16 +08:00
|
|
|
DESTINATION ${INSTALL_LIB_DIR}
|
|
|
|
COMPONENT mindspore
|
|
|
|
)
|
2021-05-10 21:48:41 +08:00
|
|
|
|
|
|
|
install(
|
|
|
|
TARGETS hccl_plugin
|
|
|
|
DESTINATION ${INSTALL_LIB_DIR}
|
|
|
|
COMPONENT mindspore
|
|
|
|
)
|
|
|
|
|
2020-09-18 14:09:16 +08:00
|
|
|
install(
|
|
|
|
FILES
|
2020-12-09 15:00:38 +08:00
|
|
|
${CMAKE_BINARY_DIR}/graphengine/metadef/graph/libgraph.so
|
|
|
|
${CMAKE_BINARY_DIR}/graphengine/ge/common/libge_common.so
|
2020-09-18 14:09:16 +08:00
|
|
|
DESTINATION ${INSTALL_LIB_DIR}
|
|
|
|
COMPONENT mindspore
|
|
|
|
)
|
2021-01-23 20:20:31 +08:00
|
|
|
endif()
|
|
|
|
elseif(ENABLE_TESTCASES)
|
2020-04-13 15:30:25 +08:00
|
|
|
install(
|
|
|
|
FILES
|
2020-12-09 15:00:38 +08:00
|
|
|
${CMAKE_BINARY_DIR}/graphengine/metadef/graph/libgraph.so
|
|
|
|
${CMAKE_SOURCE_DIR}/build/graphengine/c_sec/lib/libc_sec.so
|
2020-08-18 19:31:57 +08:00
|
|
|
${LIBEVENT_LIB_LIST}
|
2020-04-13 15:30:25 +08:00
|
|
|
DESTINATION ${INSTALL_LIB_DIR}
|
|
|
|
COMPONENT mindspore
|
|
|
|
)
|
2021-01-23 20:20:31 +08:00
|
|
|
endif()
|
|
|
|
endif()
|
2020-04-13 15:30:25 +08:00
|
|
|
|
2021-04-08 12:04:45 +08:00
|
|
|
if(MS_BUILD_GRPC)
|
2021-04-22 19:41:57 +08:00
|
|
|
install(FILES ${grpc_LIBPATH}/libmindspore_grpc++.so.1.27.3
|
|
|
|
DESTINATION ${INSTALL_LIB_DIR} RENAME libmindspore_grpc++.so.1 COMPONENT mindspore)
|
|
|
|
install(FILES ${grpc_LIBPATH}/libmindspore_grpc.so.9.0.0
|
|
|
|
DESTINATION ${INSTALL_LIB_DIR} RENAME libmindspore_grpc.so.9 COMPONENT mindspore)
|
|
|
|
install(FILES ${grpc_LIBPATH}/libmindspore_gpr.so.9.0.0
|
|
|
|
DESTINATION ${INSTALL_LIB_DIR} RENAME libmindspore_gpr.so.9 COMPONENT mindspore)
|
|
|
|
install(FILES ${grpc_LIBPATH}/libmindspore_upb.so.9.0.0
|
|
|
|
DESTINATION ${INSTALL_LIB_DIR} RENAME libmindspore_upb.so.9 COMPONENT mindspore)
|
|
|
|
install(FILES ${grpc_LIBPATH}/libmindspore_address_sorting.so.9.0.0
|
|
|
|
DESTINATION ${INSTALL_LIB_DIR} RENAME libmindspore_address_sorting.so.9 COMPONENT mindspore)
|
2021-04-08 12:04:45 +08:00
|
|
|
endif()
|
|
|
|
|
2021-01-23 20:20:31 +08:00
|
|
|
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
|
2020-04-16 21:44:20 +08:00
|
|
|
get_filename_component(CXX_DIR ${CMAKE_CXX_COMPILER} PATH)
|
|
|
|
file(GLOB CXX_LIB_LIST ${CXX_DIR}/*.dll)
|
2020-04-26 11:02:20 +08:00
|
|
|
|
|
|
|
string(REPLACE "\\" "/" SystemRoot $ENV{SystemRoot})
|
|
|
|
file(GLOB VC_LIB_LIST ${SystemRoot}/System32/msvcp140.dll ${SystemRoot}/System32/vcomp140.dll)
|
|
|
|
|
2020-04-16 21:44:20 +08:00
|
|
|
file(GLOB JPEG_LIB_LIST ${jpeg_turbo_LIBPATH}/*.dll)
|
|
|
|
file(GLOB SQLITE_LIB_LIST ${sqlite_LIBPATH}/*.dll)
|
|
|
|
install(
|
2020-04-23 11:11:54 +08:00
|
|
|
FILES ${CXX_LIB_LIST} ${JPEG_LIB_LIST} ${SQLITE_LIB_LIST} ${VC_LIB_LIST}
|
2020-04-16 21:44:20 +08:00
|
|
|
DESTINATION ${INSTALL_LIB_DIR}
|
|
|
|
COMPONENT mindspore
|
|
|
|
)
|
2021-01-23 20:20:31 +08:00
|
|
|
endif()
|
2020-04-16 21:44:20 +08:00
|
|
|
|
2020-04-13 15:30:25 +08:00
|
|
|
# set python files
|
|
|
|
file(GLOB MS_PY_LIST ${CMAKE_SOURCE_DIR}/mindspore/*.py)
|
|
|
|
install(
|
|
|
|
FILES ${MS_PY_LIST}
|
|
|
|
DESTINATION ${INSTALL_PY_DIR}
|
|
|
|
COMPONENT mindspore
|
|
|
|
)
|
|
|
|
|
|
|
|
install(
|
|
|
|
DIRECTORY
|
|
|
|
${CMAKE_SOURCE_DIR}/mindspore/nn
|
|
|
|
${CMAKE_SOURCE_DIR}/mindspore/_extends
|
|
|
|
${CMAKE_SOURCE_DIR}/mindspore/parallel
|
|
|
|
${CMAKE_SOURCE_DIR}/mindspore/mindrecord
|
2020-12-15 10:39:15 +08:00
|
|
|
${CMAKE_SOURCE_DIR}/mindspore/numpy
|
2020-04-13 15:30:25 +08:00
|
|
|
${CMAKE_SOURCE_DIR}/mindspore/train
|
|
|
|
${CMAKE_SOURCE_DIR}/mindspore/common
|
|
|
|
${CMAKE_SOURCE_DIR}/mindspore/ops
|
|
|
|
${CMAKE_SOURCE_DIR}/mindspore/communication
|
2020-07-15 11:24:15 +08:00
|
|
|
${CMAKE_SOURCE_DIR}/mindspore/profiler
|
2020-10-26 15:18:56 +08:00
|
|
|
${CMAKE_SOURCE_DIR}/mindspore/explainer
|
2020-10-15 21:36:23 +08:00
|
|
|
${CMAKE_SOURCE_DIR}/mindspore/compression
|
2020-04-13 15:30:25 +08:00
|
|
|
DESTINATION ${INSTALL_PY_DIR}
|
|
|
|
COMPONENT mindspore
|
|
|
|
)
|
|
|
|
|
2021-01-23 20:20:31 +08:00
|
|
|
if((ENABLE_D OR ENABLE_GPU) AND ENABLE_AKG)
|
2020-06-04 09:59:26 +08:00
|
|
|
set (AKG_PATH ${CMAKE_SOURCE_DIR}/build/mindspore/akg)
|
2021-03-15 11:43:54 +08:00
|
|
|
file(REMOVE_RECURSE ${AKG_PATH}/_akg)
|
|
|
|
file(MAKE_DIRECTORY ${AKG_PATH}/_akg)
|
|
|
|
file(TOUCH ${AKG_PATH}/_akg/__init__.py)
|
|
|
|
install(DIRECTORY "${AKG_PATH}/akg" DESTINATION "${AKG_PATH}/_akg")
|
2020-06-04 09:59:26 +08:00
|
|
|
install(
|
|
|
|
DIRECTORY
|
2021-03-15 11:43:54 +08:00
|
|
|
${AKG_PATH}/_akg
|
|
|
|
DESTINATION ${INSTALL_PY_DIR}/
|
2020-06-04 09:59:26 +08:00
|
|
|
COMPONENT mindspore
|
|
|
|
)
|
2021-01-23 20:20:31 +08:00
|
|
|
endif()
|
2020-06-04 09:59:26 +08:00
|
|
|
|
2021-01-23 20:20:31 +08:00
|
|
|
if(EXISTS ${CMAKE_SOURCE_DIR}/mindspore/dataset)
|
2020-04-13 15:30:25 +08:00
|
|
|
install(
|
|
|
|
DIRECTORY ${CMAKE_SOURCE_DIR}/mindspore/dataset
|
|
|
|
DESTINATION ${INSTALL_PY_DIR}
|
|
|
|
COMPONENT mindspore
|
|
|
|
)
|
2021-01-23 20:20:31 +08:00
|
|
|
endif()
|
2020-07-15 14:27:14 +08:00
|
|
|
|
2021-04-02 02:24:05 +08:00
|
|
|
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
|
|
|
|
message("offline debugger does not support windows system temporarily")
|
|
|
|
else()
|
|
|
|
if(EXISTS ${CMAKE_SOURCE_DIR}/mindspore/offline_debug)
|
|
|
|
install(
|
|
|
|
DIRECTORY ${CMAKE_SOURCE_DIR}/mindspore/offline_debug
|
|
|
|
DESTINATION ${INSTALL_PY_DIR}
|
|
|
|
COMPONENT mindspore
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2020-09-18 14:09:16 +08:00
|
|
|
## Public header files
|
|
|
|
install(
|
|
|
|
DIRECTORY ${CMAKE_SOURCE_DIR}/include
|
|
|
|
DESTINATION ${INSTALL_BASE_DIR}
|
|
|
|
COMPONENT mindspore
|
|
|
|
)
|
|
|
|
|
2020-12-12 15:18:45 +08:00
|
|
|
## Public header files for minddata
|
|
|
|
install(
|
2021-05-10 11:12:00 +08:00
|
|
|
FILES ${CMAKE_SOURCE_DIR}/mindspore/ccsrc/minddata/dataset/include/dataset/config.h
|
|
|
|
${CMAKE_SOURCE_DIR}/mindspore/ccsrc/minddata/dataset/include/dataset/constants.h
|
|
|
|
${CMAKE_SOURCE_DIR}/mindspore/ccsrc/minddata/dataset/include/dataset/execute.h
|
|
|
|
${CMAKE_SOURCE_DIR}/mindspore/ccsrc/minddata/dataset/include/dataset/text.h
|
2021-04-17 15:44:57 +08:00
|
|
|
${CMAKE_SOURCE_DIR}/mindspore/ccsrc/minddata/dataset/include/dataset/transforms.h
|
|
|
|
${CMAKE_SOURCE_DIR}/mindspore/ccsrc/minddata/dataset/include/dataset/vision.h
|
|
|
|
${CMAKE_SOURCE_DIR}/mindspore/ccsrc/minddata/dataset/include/dataset/vision_lite.h
|
|
|
|
${CMAKE_SOURCE_DIR}/mindspore/ccsrc/minddata/dataset/include/dataset/vision_ascend.h
|
|
|
|
DESTINATION ${INSTALL_BASE_DIR}/include/dataset
|
2020-12-12 15:18:45 +08:00
|
|
|
COMPONENT mindspore
|
|
|
|
)
|
|
|
|
|
2020-12-08 23:37:12 +08:00
|
|
|
## config files
|
|
|
|
install(
|
|
|
|
FILES ${CMAKE_SOURCE_DIR}/config/op_info.config
|
|
|
|
DESTINATION ${INSTALL_CFG_DIR}
|
|
|
|
COMPONENT mindspore
|
|
|
|
)
|
|
|
|
|