Skip to content

Commit c5c8f64

Browse files
authored
Remove the cub submodule. (dmlc#8888)
XGBoost now uses CTK-11.8 for binary packages, there's no need to maintain a cub submodule anymore.
1 parent 5feee8d commit c5c8f64

File tree

7 files changed

+4
-23
lines changed

7 files changed

+4
-23
lines changed

.gitmodules

-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
path = dmlc-core
33
url = https://github.com/dmlc/dmlc-core
44
branch = main
5-
[submodule "cub"]
6-
path = cub
7-
url = https://github.com/NVlabs/cub
85
[submodule "gputreeshap"]
96
path = gputreeshap
107
url = https://github.com/rapidsai/gputreeshap.git

CMakeLists.txt

-8
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ option(HIDE_CXX_SYMBOLS "Build shared library and hide all C++ symbols" OFF)
5151
option(USE_CUDA "Build with GPU acceleration" OFF)
5252
option(USE_NCCL "Build with NCCL to enable distributed GPU support." OFF)
5353
option(BUILD_WITH_SHARED_NCCL "Build with shared NCCL library." OFF)
54-
option(BUILD_WITH_CUDA_CUB "Build with cub in CUDA installation" OFF)
5554
set(GPU_COMPUTE_VER "" CACHE STRING
5655
"Semicolon separated list of compute versions to be built against, e.g. '35;61'")
5756
## Copied From dmlc
@@ -115,9 +114,6 @@ endif (ENABLE_ALL_WARNINGS)
115114
if (BUILD_STATIC_LIB AND (R_LIB OR JVM_BINDINGS))
116115
message(SEND_ERROR "Cannot build a static library libxgboost.a when R or JVM packages are enabled.")
117116
endif (BUILD_STATIC_LIB AND (R_LIB OR JVM_BINDINGS))
118-
if (PLUGIN_RMM AND (NOT BUILD_WITH_CUDA_CUB))
119-
message(SEND_ERROR "Cannot build with RMM using cub submodule.")
120-
endif (PLUGIN_RMM AND (NOT BUILD_WITH_CUDA_CUB))
121117
if (PLUGIN_FEDERATED)
122118
if (CMAKE_CROSSCOMPILING)
123119
message(SEND_ERROR "Cannot cross compile with federated learning support")
@@ -152,10 +148,6 @@ if (USE_CUDA)
152148
set(GEN_CODE "")
153149
format_gencode_flags("${GPU_COMPUTE_VER}" GEN_CODE)
154150
add_subdirectory(${PROJECT_SOURCE_DIR}/gputreeshap)
155-
156-
if ((${CMAKE_CUDA_COMPILER_VERSION} VERSION_GREATER_EQUAL 11.4) AND (NOT BUILD_WITH_CUDA_CUB))
157-
set(BUILD_WITH_CUDA_CUB ON)
158-
endif ()
159151
endif (USE_CUDA)
160152

161153
if (FORCE_COLORED_OUTPUT AND (CMAKE_GENERATOR STREQUAL "Ninja") AND

cmake/Utils.cmake

+2-7
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,8 @@ function(xgboost_set_cuda_flags target)
165165
enable_nvtx(${target})
166166
endif (USE_NVTX)
167167

168-
if (NOT BUILD_WITH_CUDA_CUB)
169-
target_compile_definitions(${target} PRIVATE -DXGBOOST_USE_CUDA=1 -DTHRUST_IGNORE_CUB_VERSION_CHECK=1)
170-
target_include_directories(${target} PRIVATE ${xgboost_SOURCE_DIR}/cub/ ${xgboost_SOURCE_DIR}/gputreeshap)
171-
else ()
172-
target_compile_definitions(${target} PRIVATE -DXGBOOST_USE_CUDA=1)
173-
target_include_directories(${target} PRIVATE ${xgboost_SOURCE_DIR}/gputreeshap)
174-
endif (NOT BUILD_WITH_CUDA_CUB)
168+
target_compile_definitions(${target} PRIVATE -DXGBOOST_USE_CUDA=1)
169+
target_include_directories(${target} PRIVATE ${xgboost_SOURCE_DIR}/gputreeshap)
175170

176171
if (MSVC)
177172
target_compile_options(${target} PRIVATE

cub

-1
This file was deleted.

doc/build.rst

+1-2
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,7 @@ From the command line on Linux starting from the XGBoost directory:
128128
129129
mkdir build
130130
cd build
131-
# For CUDA toolkit >= 11.4, `BUILD_WITH_CUDA_CUB` is required.
132-
cmake .. -DUSE_CUDA=ON -DBUILD_WITH_CUDA_CUB=ON
131+
cmake .. -DUSE_CUDA=ON
133132
make -j4
134133
135134
.. note:: Specifying compute capability

plugin/federated/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ mkdir build
1515
cd build
1616
cmake .. -GNinja \
1717
-DPLUGIN_FEDERATED=ON \
18-
-DBUILD_WITH_CUDA_CUB=ON \
1918
-DUSE_CUDA=ON\
2019
-DUSE_NCCL=ON
2120
ninja

tests/buildkite/build-cuda-with-rmm.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ command_wrapper="tests/ci_build/ci_build.sh rmm docker --build-arg "`
2020

2121
echo "--- Build libxgboost from the source"
2222
$command_wrapper tests/ci_build/build_via_cmake.sh --conda-env=gpu_test -DUSE_CUDA=ON \
23-
-DUSE_NCCL=ON -DPLUGIN_RMM=ON -DBUILD_WITH_CUDA_CUB=ON ${arch_flag}
23+
-DUSE_NCCL=ON -DPLUGIN_RMM=ON ${arch_flag}
2424

2525
echo "-- Stash C++ test executable (testxgboost)"
2626
buildkite-agent artifact upload build/testxgboost

0 commit comments

Comments
 (0)