File tree 2 files changed +11
-2
lines changed
2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,15 @@ set(CUB_PATH "${THIRD_PARTY_PATH}/cub" CACHE STRING "A path setting for e
21
21
set (CUB_PREFIX_DIR ${CUB_PATH} )
22
22
23
23
set (CUB_REPOSITORY ${GIT_URL} /NVlabs/cub.git)
24
- set (CUB_TAG 1.8.0)
24
+
25
+ if (WIN32 AND ${CMAKE_CUDA_COMPILER_VERSION} GREATER_EQUAL 11.6)
26
+ # cuda_11.6.2_511.65‘s own cub is 1.15.0, which will cause compiling error in windows.
27
+ set (CUB_TAG 1.16.0)
28
+ # cub 1.16.0 is not compitable with current thrust version
29
+ add_definitions (-DTHRUST_IGNORE_CUB_VERSION_CHECK)
30
+ else ()
31
+ set (CUB_TAG 1.8.0)
32
+ endif ()
25
33
26
34
SET (CUB_INCLUDE_DIR ${CUB_PREFIX_DIR} /src/extern_cub)
27
35
message ("CUB_INCLUDE_DIR is ${CUB_INCLUDE_DIR} " )
Original file line number Diff line number Diff line change @@ -257,7 +257,8 @@ if(WITH_ONNXRUNTIME)
257
257
endif ()
258
258
259
259
if (WITH_GPU)
260
- if (${CMAKE_CUDA_COMPILER_VERSION} LESS 11.0)
260
+ if (${CMAKE_CUDA_COMPILER_VERSION} LESS 11.0 OR ${CMAKE_CUDA_COMPILER_VERSION}
261
+ GREATER_EQUAL 11.6)
261
262
include (external/cub) # download cub
262
263
list (APPEND third_party_deps extern_cub)
263
264
endif ()
You can’t perform that action at this time.
0 commit comments