File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -24,18 +24,20 @@ set(CUB_PREFIX_DIR ${CUB_PATH})
24
24
25
25
set (CUB_SOURCE_DIR ${PADDLE_SOURCE_DIR} /third_party/cub )
26
26
27
- # cub 2.1.0 is not compatible with current thrust version
28
- add_definitions (-DTHRUST_IGNORE_CUB_VERSION_CHECK )
29
- if (${CMAKE_CUDA_COMPILER_VERSION} EQUAL 11.8 )
30
- set (cub_patches "${PADDLE_SOURCE_DIR} /patches/cub" )
31
- message (STATUS "Add cub patches: ${cub_patches} " )
32
- include_directories (${cub_patches} )
33
- endif ()
34
-
35
- if (NOT WITH_GPU )
36
- set (CUB_TAG 1.8.0 )
27
+ if (${CMAKE_CUDA_COMPILER_VERSION} GREATER_EQUAL 11.6 )
28
+ # cuda_11.6/11.7/11.8‘s own cub is 1.15.0, which will cause compiling error in windows.
29
+ set (CUB_TAG 2.1.0 )
37
30
execute_process (COMMAND git --git-dir=${CUB_SOURCE_DIR}/.git
38
31
--work-tree=${CUB_SOURCE_DIR} checkout ${CUB_TAG} )
32
+ # cub 2.1.0 is not compatible with current thrust version
33
+ add_definitions (-DTHRUST_IGNORE_CUB_VERSION_CHECK )
34
+ if (${CMAKE_CUDA_COMPILER_VERSION} EQUAL 11.8 )
35
+ set (cub_patches "${PADDLE_SOURCE_DIR} /patches/cub" )
36
+ message (STATUS "Add cub patches: ${cub_patches} " )
37
+ include_directories (${cub_patches} )
38
+ endif ()
39
+ else ()
40
+ set (CUB_TAG 1.8.0 )
39
41
endif ()
40
42
41
43
set (CUB_INCLUDE_DIR ${CUB_SOURCE_DIR} )
You can’t perform that action at this time.
0 commit comments