未验证 提交 83520fd2 编写于 作者: S Sing_chan 提交者: GitHub

cherry pick 43934 and not format (#43935)

上级 35abeda7
...@@ -21,7 +21,15 @@ set(CUB_PATH "${THIRD_PARTY_PATH}/cub" CACHE STRING "A path setting for e ...@@ -21,7 +21,15 @@ set(CUB_PATH "${THIRD_PARTY_PATH}/cub" CACHE STRING "A path setting for e
set(CUB_PREFIX_DIR ${CUB_PATH}) set(CUB_PREFIX_DIR ${CUB_PATH})
set(CUB_REPOSITORY ${GIT_URL}/NVlabs/cub.git) set(CUB_REPOSITORY ${GIT_URL}/NVlabs/cub.git)
set(CUB_TAG 1.8.0)
if(WIN32 AND ${CMAKE_CUDA_COMPILER_VERSION} GREATER_EQUAL 11.6)
# cuda_11.6.2_511.65‘s own cub is 1.15.0, which will cause compiling error in windows.
set(CUB_TAG 1.16.0)
# cub 1.16.0 is not compitable with current thrust version
add_definitions(-DTHRUST_IGNORE_CUB_VERSION_CHECK)
else()
set(CUB_TAG 1.8.0)
endif()
SET(CUB_INCLUDE_DIR ${CUB_PREFIX_DIR}/src/extern_cub) SET(CUB_INCLUDE_DIR ${CUB_PREFIX_DIR}/src/extern_cub)
message("CUB_INCLUDE_DIR is ${CUB_INCLUDE_DIR}") message("CUB_INCLUDE_DIR is ${CUB_INCLUDE_DIR}")
......
...@@ -257,7 +257,8 @@ if(WITH_ONNXRUNTIME) ...@@ -257,7 +257,8 @@ if(WITH_ONNXRUNTIME)
endif() endif()
if(WITH_GPU) if(WITH_GPU)
if (${CMAKE_CUDA_COMPILER_VERSION} LESS 11.0) if (${CMAKE_CUDA_COMPILER_VERSION} LESS 11.0 OR ${CMAKE_CUDA_COMPILER_VERSION}
GREATER_EQUAL 11.6)
include(external/cub) # download cub include(external/cub) # download cub
list(APPEND third_party_deps extern_cub) list(APPEND third_party_deps extern_cub)
endif() endif()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册