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.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. cc_library(
  2. name = "mgblar",
  3. copts = ["-std=c++14"],
  4. srcs = [
  5. "src/infile_persistent_cache.cpp",
  6. "src/mgblar.cpp",
  7. "src/json_loader.cpp",
  8. ],
  9. hdrs = [
  10. "src/infile_persistent_cache.h",
  11. "src/mgblar.h",
  12. "src/json_loader.h",
  13. "src/npy.h",
  14. ],
  15. features = if_opt([
  16. "no_exceptions",
  17. "no_rtti",
  18. ]),
  19. includes = ["src"],
  20. defines = ["MGB_ENABLE_FASTRUN=1"],
  21. deps = ["//brain/megbrain:sdk-test"],
  22. )
  23. cc_megvii_binary(
  24. name = "load_and_run",
  25. copts = ["-std=c++14"],
  26. srcs = ["main.cpp"],
  27. features = if_opt([
  28. "no_exceptions",
  29. "no_rtti",
  30. ]),
  31. internal_deps = [":mgblar"],
  32. visibility = ["//visibility:public"],
  33. )
  34. cc_megvii_shared_object(
  35. name = "load_and_run_shared",
  36. copts = ["-std=c++14"],
  37. srcs = ["main.cpp"],
  38. features = if_opt([
  39. "no_exceptions",
  40. "no_rtti",
  41. ]),
  42. internal_deps = [":mgblar"],
  43. syms = ["main"],
  44. )
  45. cc_megvii_binary(
  46. name = "json_loader_test",
  47. copts = ["-std=c++14"],
  48. srcs = ["test/json_loader_test.cpp"],
  49. internal_deps = [":mgblar"],
  50. )
  51. cc_library(
  52. name = "megbrain_ios_lar_lib",
  53. srcs = [
  54. "src/infile_persistent_cache.cpp",
  55. "src/mgblar.cpp",
  56. ],
  57. hdrs = [
  58. "src/infile_persistent_cache.h",
  59. "src/mgblar.h",
  60. ],
  61. copts = ["-DMGB_NO_MAIN=1"],
  62. features = if_opt([
  63. "no_exceptions",
  64. "no_rtti",
  65. ]),
  66. deps = ["//brain/megbrain:sdk-test"],
  67. )
  68. cc_megvii_static_library(
  69. name = "megbrain_ios_lar",
  70. deps = [":megbrain_ios_lar_lib"],
  71. )

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