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.

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

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