File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
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
- if (NOT WITH_GPU )
28
- 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 )
29
30
execute_process (COMMAND git --git-dir=${CUB_SOURCE_DIR}/.git
30
31
--work-tree=${CUB_SOURCE_DIR} checkout ${CUB_TAG} )
31
- else ()
32
32
# cub 2.1.0 is not compatible with current thrust version
33
33
add_definitions (-DTHRUST_IGNORE_CUB_VERSION_CHECK )
34
34
if (${CMAKE_CUDA_COMPILER_VERSION} EQUAL 11.8 )
35
35
set (cub_patches "${PADDLE_SOURCE_DIR} /patches/cub" )
36
36
message (STATUS "Add cub patches: ${cub_patches} " )
37
37
include_directories (${cub_patches} )
38
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