You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

CMakeLists.txt 1.6 kB

1234567891011121314151617181920212223242526272829303132333435
  1. cmake_minimum_required(VERSION 3.14)
  2. find_package(Git QUIET)
  3. if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
  4. option(GIT_SUBMODULE "Check submodules during build" ON)
  5. if(GIT_SUBMODULE)
  6. message(STATUS "Updating submodules")
  7. execute_process(COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive
  8. WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
  9. RESULT_VARIABLE GIT_SUBMOD_RESULT)
  10. if(NOT GIT_SUBMOD_RESULT EQUAL "0")
  11. message(FATAL_ERROR "git submodule update failed with ${GIT_SUBMOD_RESULT}, please checkout submodules.")
  12. endif()
  13. endif()
  14. elseif(NOT EXISTS "${PROJECT_SOURCE_DIR}/third_party/securec/src")
  15. message(FATAL_ERROR "git command not found or not in a git repository, third_party/securec/src not exists.")
  16. else()
  17. message(WARNING "git command not found or not in a git repository, submodules not updated.")
  18. endif()
  19. if(NOT CMAKE_BUILD_TYPE)
  20. set(CMAKE_BUILD_TYPE "Release")
  21. endif()
  22. set(CMAKE_C_FLAGS_DEBUG "$ENV{CFLAGS} -fPIC -O0 -Wall -fvisibility=hidden -Wno-deprecated-declarations -g2 -ggdb -fno-inline-functions -fno-omit-frame-pointer -D_LIBCPP_INLINE_VISIBILITY='' -D'_LIBCPP_EXTERN_TEMPLATE(...)='")
  23. set(CMAKE_C_FLAGS_RELEASE "$ENV{CFLAGS} -fPIC -O3 -Wall -fvisibility=hidden -Wno-deprecated-declarations")
  24. set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
  25. #add flags
  26. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I/usr/local/include -Werror")
  27. include_directories(./third_party/securec/include)
  28. aux_source_directory(./third_party/securec/src SECUREC_SRCS)
  29. add_library(securec ${SECUREC_SRCS})

MindInsight为MindSpore提供了简单易用的调优调试能力。在训练过程中,可以将标量、张量、图像、计算图、模型超参、训练耗时等数据记录到文件中,通过MindInsight可视化页面进行查看及分析。