提交 ed92b9c1 编写于 作者: M Megvii Engine Team

fix(cmake): fix compilation options for benchmark in cmake

GitOrigin-RevId: d763fd32622b0ee9267ae04c637ff83639d90bb1
上级 a49d5bf9
...@@ -88,6 +88,7 @@ option(MGE_ENABLE_LOGGING "Build with logging" ON) ...@@ -88,6 +88,7 @@ option(MGE_ENABLE_LOGGING "Build with logging" ON)
option(MGE_DEBUG_UTIL "Enable debug utility" ON) option(MGE_DEBUG_UTIL "Enable debug utility" ON)
option(MGE_ENABLE_EXCEPTIONS "Build with exceptions" ON) option(MGE_ENABLE_EXCEPTIONS "Build with exceptions" ON)
option(MGE_WITH_TEST "Enable test for MegEngine." OFF) option(MGE_WITH_TEST "Enable test for MegEngine." OFF)
option(MGE_WITH_BENCHMARK "Enable DNN BENCHMARK" OFF)
option(MGE_WITH_DISTRIBUTED "Build with distributed support" ON) option(MGE_WITH_DISTRIBUTED "Build with distributed support" ON)
option(MGE_BUILD_IMPERATIVE_RT "Build _imperative_rt Python Module " ON) option(MGE_BUILD_IMPERATIVE_RT "Build _imperative_rt Python Module " ON)
option(MGE_INFERENCE_ONLY "Build inference only library." OFF) option(MGE_INFERENCE_ONLY "Build inference only library." OFF)
...@@ -1123,6 +1124,11 @@ if(MGE_WITH_TEST) ...@@ -1123,6 +1124,11 @@ if(MGE_WITH_TEST)
set(MEGDNN_ENABLE_MULTI_THREADS 1) set(MEGDNN_ENABLE_MULTI_THREADS 1)
endif() endif()
# benchmark
if(MGE_WITH_BENCHMARK)
set(MEGDNN_WITH_BENCHMARK ${MGE_WITH_BENCHMARK})
endif()
# CUDA # CUDA
set(MGB_CUDA ${MGE_WITH_CUDA}) set(MGB_CUDA ${MGE_WITH_CUDA})
set(MEGDNN_WITH_CUDA ${MGE_WITH_CUDA}) set(MEGDNN_WITH_CUDA ${MGE_WITH_CUDA})
......
...@@ -257,4 +257,8 @@ ...@@ -257,4 +257,8 @@
#define MGE_WIN_DECLSPEC_DATA #define MGE_WIN_DECLSPEC_DATA
#endif #endif
#ifndef MEGDNN_WITH_BENCHMARK
#define MEGDNN_WITH_BENCHMARK 0
#endif
#endif // _HEADER_MGB_BUILD_CONFIG #endif // _HEADER_MGB_BUILD_CONFIG
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册