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

perf(mgb/compile): improve compile time for megbrain

GitOrigin-RevId: 12d7467c8bccc07731646ff307dba71ea983d88f
上级 d3247bee
...@@ -97,6 +97,11 @@ option(MGE_WITH_LARGE_ARCHIVE "Enable big archive link support" OFF) ...@@ -97,6 +97,11 @@ option(MGE_WITH_LARGE_ARCHIVE "Enable big archive link support" OFF)
option(MGE_BUILD_WITH_ASAN "Enable build with ASAN, need compiler support" OFF) option(MGE_BUILD_WITH_ASAN "Enable build with ASAN, need compiler support" OFF)
option(MGE_WITH_CUSTOM_OP "Build with Custom op" OFF) option(MGE_WITH_CUSTOM_OP "Build with Custom op" OFF)
option(MGE_SYNC_THIRD_PARTY "help sync third_party submodule" OFF) option(MGE_SYNC_THIRD_PARTY "help sync third_party submodule" OFF)
option(MGE_PROFILE_COMPILE_TIME "help profile compile time per file" OFF)
if(MGE_PROFILE_COMPILE_TIME)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "cmake -E time")
endif()
# TODO: add windows support # TODO: add windows support
cmake_dependent_option(MGE_WITH_CUPTI "Build with CUPTI" ON cmake_dependent_option(MGE_WITH_CUPTI "Build with CUPTI" ON
......
...@@ -188,8 +188,21 @@ if(MGE_WITH_CUDA) ...@@ -188,8 +188,21 @@ if(MGE_WITH_CUDA)
gen_cutlass_kimpl(dwconv2d_dgrad tensorop884 CUTLASS_SOURCES) gen_cutlass_kimpl(dwconv2d_dgrad tensorop884 CUTLASS_SOURCES)
gen_cutlass_kimpl(dwconv2d_wgrad simt CUTLASS_SOURCES) gen_cutlass_kimpl(dwconv2d_wgrad simt CUTLASS_SOURCES)
gen_cutlass_kimpl(dwconv2d_wgrad tensorop884 CUTLASS_SOURCES) gen_cutlass_kimpl(dwconv2d_wgrad tensorop884 CUTLASS_SOURCES)
list(APPEND SOURCES ${CUTLASS_SOURCES}) # Compile the following opr first
list(APPEND SOURCES ${CUSOURCES}) file(
GLOB_RECURSE
PRIORITY_DIRS
cuda/type_cvt/*cu
cuda/conv_bias/*cu
cuda/reduce/*cu
cuda/relayout/*cu
cuda/relayout_format/*cu
cuda/powc/*cu
cuda/warp_perspective/*cu)
list(PREPEND PRIORITY_DIRS ${CUTLASS_SOURCES})
list(PREPEND CUSOURCES ${PRIORITY_DIRS})
list(REMOVE_DUPLICATES CUSOURCES)
list(PREPEND SOURCES ${CUSOURCES})
endif() endif()
if(MGE_WITH_ATLAS) if(MGE_WITH_ATLAS)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册