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.

lite_build_config.h 710 B

1234567891011121314151617181920212223242526272829303132
  1. /**
  2. * \file lite/build_config/lite_build_config.h
  3. *
  4. * This file is part of MegEngine, a deep learning framework developed by
  5. * Megvii.
  6. *
  7. * \copyright Copyright (c) 2020-2021 Megvii Inc. All rights reserved.
  8. */
  9. #ifndef _HEADER_LITE_BUILD_CONFIG
  10. #define _HEADER_LITE_BUILD_CONFIG
  11. #ifndef LITE_ENABLE_LOGGING
  12. #define LITE_ENABLE_LOGGING 1
  13. #endif
  14. #ifndef LITE_ENABLE_EXCEPTION
  15. #if __cpp_exceptions || __EXCEPTIONS || \
  16. (defined(_MSC_VER) && defined(_CPPUNWIND))
  17. #define LITE_ENABLE_EXCEPTION 1
  18. #else
  19. #define LITE_ENABLE_EXCEPTION 0
  20. #endif
  21. #endif
  22. #ifndef LITE_WITH_CUDA
  23. #define LITE_WITH_CUDA 0
  24. #endif
  25. #ifndef LITE_ASSERT_LOC
  26. #define LITE_ASSERT_LOC 1
  27. #endif
  28. #endif // _HEADER_LITE_BUILD_CONFIG

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