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 611 B

12345678910111213141516
  1. include_directories(src)
  2. file (GLOB_RECURSE SOURCES src/*.cpp main.cpp)
  3. add_executable (load_and_run ${SOURCES})
  4. if (WIN32)
  5. # Windows does not support implicitly importing data members from DLL.
  6. target_link_libraries(load_and_run megbrain megdnn)
  7. else()
  8. target_link_libraries (load_and_run megengine)
  9. endif()
  10. install (TARGETS load_and_run EXPORT ${MGE_EXPORT_TARGETS} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
  11. if(MGE_WITH_TEST)
  12. add_executable(json_loader_test test/json_loader_test.cpp src/json_loader.h src/json_loader.cpp)
  13. target_link_libraries (json_loader_test megengine)
  14. endif()

MegEngine 安装包中集成了使用 GPU 运行代码所需的 CUDA 环境,不用区分 CPU 和 GPU 版。 如果想要运行 GPU 程序,请确保机器本身配有 GPU 硬件设备并安装好驱动。 如果你想体验在云端 GPU 算力平台进行深度学习开发的感觉,欢迎访问 MegStudio 平台