Skip to content

Commit

Permalink
Remove unnecessary dependency for CUDA 11.x
Browse files Browse the repository at this point in the history
According to https://github.com/NVIDIA/cub, the CUB is included in the CUDA Toolkit since 11.0 EA; As a result, there is no need to depend on a third-party CUB for CUDA 11.x.

Signed-off-by: Jun Tseng <6501202@qq.com>
  • Loading branch information
tsengjun authored and rajeevsrao committed Sep 22, 2021
1 parent 32c64a3 commit e0af53f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ endif()
set(DEFAULT_CUDA_VERSION 11.3.1)
set(DEFAULT_CUDNN_VERSION 8.2)
set(DEFAULT_PROTOBUF_VERSION 3.0.0)
set(DEFAULT_CUB_VERSION 1.8.0)

# Dependency Version Resolution
set_ifndef(CUDA_VERSION ${DEFAULT_CUDA_VERSION})
Expand All @@ -100,7 +99,9 @@ if (BUILD_PLUGINS OR BUILD_PARSERS)
include(third_party/protobuf.cmake)
endif()
if(NOT CUB_ROOT_DIR)
if (CUDA_VERSION VERSION_LESS 11.0)
set(CUB_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/cub CACHE STRING "directory of CUB installation")
endif()
endif()

## find_package(CUDA) is broken for cross-compilation. Enable CUDA language instead.
Expand Down

0 comments on commit e0af53f

Please sign in to comment.