Remove the cub submodule. (#8888)

XGBoost now uses CTK-11.8 for binary packages, there's no need to maintain a cub
submodule anymore.
This commit is contained in:
Jiaming Yuan 2023-03-10 11:43:02 +08:00 committed by GitHub
parent 5feee8d4a9
commit c5c8f643f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 4 additions and 23 deletions

3
.gitmodules vendored
View File

@ -2,9 +2,6 @@
path = dmlc-core path = dmlc-core
url = https://github.com/dmlc/dmlc-core url = https://github.com/dmlc/dmlc-core
branch = main branch = main
[submodule "cub"]
path = cub
url = https://github.com/NVlabs/cub
[submodule "gputreeshap"] [submodule "gputreeshap"]
path = gputreeshap path = gputreeshap
url = https://github.com/rapidsai/gputreeshap.git url = https://github.com/rapidsai/gputreeshap.git

View File

@ -51,7 +51,6 @@ option(HIDE_CXX_SYMBOLS "Build shared library and hide all C++ symbols" OFF)
option(USE_CUDA "Build with GPU acceleration" OFF) option(USE_CUDA "Build with GPU acceleration" OFF)
option(USE_NCCL "Build with NCCL to enable distributed GPU support." OFF) option(USE_NCCL "Build with NCCL to enable distributed GPU support." OFF)
option(BUILD_WITH_SHARED_NCCL "Build with shared NCCL library." OFF) option(BUILD_WITH_SHARED_NCCL "Build with shared NCCL library." OFF)
option(BUILD_WITH_CUDA_CUB "Build with cub in CUDA installation" OFF)
set(GPU_COMPUTE_VER "" CACHE STRING set(GPU_COMPUTE_VER "" CACHE STRING
"Semicolon separated list of compute versions to be built against, e.g. '35;61'") "Semicolon separated list of compute versions to be built against, e.g. '35;61'")
## Copied From dmlc ## Copied From dmlc
@ -115,9 +114,6 @@ endif (ENABLE_ALL_WARNINGS)
if (BUILD_STATIC_LIB AND (R_LIB OR JVM_BINDINGS)) if (BUILD_STATIC_LIB AND (R_LIB OR JVM_BINDINGS))
message(SEND_ERROR "Cannot build a static library libxgboost.a when R or JVM packages are enabled.") message(SEND_ERROR "Cannot build a static library libxgboost.a when R or JVM packages are enabled.")
endif (BUILD_STATIC_LIB AND (R_LIB OR JVM_BINDINGS)) endif (BUILD_STATIC_LIB AND (R_LIB OR JVM_BINDINGS))
if (PLUGIN_RMM AND (NOT BUILD_WITH_CUDA_CUB))
message(SEND_ERROR "Cannot build with RMM using cub submodule.")
endif (PLUGIN_RMM AND (NOT BUILD_WITH_CUDA_CUB))
if (PLUGIN_FEDERATED) if (PLUGIN_FEDERATED)
if (CMAKE_CROSSCOMPILING) if (CMAKE_CROSSCOMPILING)
message(SEND_ERROR "Cannot cross compile with federated learning support") message(SEND_ERROR "Cannot cross compile with federated learning support")
@ -152,10 +148,6 @@ if (USE_CUDA)
set(GEN_CODE "") set(GEN_CODE "")
format_gencode_flags("${GPU_COMPUTE_VER}" GEN_CODE) format_gencode_flags("${GPU_COMPUTE_VER}" GEN_CODE)
add_subdirectory(${PROJECT_SOURCE_DIR}/gputreeshap) add_subdirectory(${PROJECT_SOURCE_DIR}/gputreeshap)
if ((${CMAKE_CUDA_COMPILER_VERSION} VERSION_GREATER_EQUAL 11.4) AND (NOT BUILD_WITH_CUDA_CUB))
set(BUILD_WITH_CUDA_CUB ON)
endif ()
endif (USE_CUDA) endif (USE_CUDA)
if (FORCE_COLORED_OUTPUT AND (CMAKE_GENERATOR STREQUAL "Ninja") AND if (FORCE_COLORED_OUTPUT AND (CMAKE_GENERATOR STREQUAL "Ninja") AND

View File

@ -165,13 +165,8 @@ function(xgboost_set_cuda_flags target)
enable_nvtx(${target}) enable_nvtx(${target})
endif (USE_NVTX) endif (USE_NVTX)
if (NOT BUILD_WITH_CUDA_CUB) target_compile_definitions(${target} PRIVATE -DXGBOOST_USE_CUDA=1)
target_compile_definitions(${target} PRIVATE -DXGBOOST_USE_CUDA=1 -DTHRUST_IGNORE_CUB_VERSION_CHECK=1) target_include_directories(${target} PRIVATE ${xgboost_SOURCE_DIR}/gputreeshap)
target_include_directories(${target} PRIVATE ${xgboost_SOURCE_DIR}/cub/ ${xgboost_SOURCE_DIR}/gputreeshap)
else ()
target_compile_definitions(${target} PRIVATE -DXGBOOST_USE_CUDA=1)
target_include_directories(${target} PRIVATE ${xgboost_SOURCE_DIR}/gputreeshap)
endif (NOT BUILD_WITH_CUDA_CUB)
if (MSVC) if (MSVC)
target_compile_options(${target} PRIVATE target_compile_options(${target} PRIVATE

1
cub

@ -1 +0,0 @@
Subproject commit af39ee264f4627608072bf54730bf3a862e56875

View File

@ -128,8 +128,7 @@ From the command line on Linux starting from the XGBoost directory:
mkdir build mkdir build
cd build cd build
# For CUDA toolkit >= 11.4, `BUILD_WITH_CUDA_CUB` is required. cmake .. -DUSE_CUDA=ON
cmake .. -DUSE_CUDA=ON -DBUILD_WITH_CUDA_CUB=ON
make -j4 make -j4
.. note:: Specifying compute capability .. note:: Specifying compute capability

View File

@ -15,7 +15,6 @@ mkdir build
cd build cd build
cmake .. -GNinja \ cmake .. -GNinja \
-DPLUGIN_FEDERATED=ON \ -DPLUGIN_FEDERATED=ON \
-DBUILD_WITH_CUDA_CUB=ON \
-DUSE_CUDA=ON\ -DUSE_CUDA=ON\
-DUSE_NCCL=ON -DUSE_NCCL=ON
ninja ninja

View File

@ -20,7 +20,7 @@ command_wrapper="tests/ci_build/ci_build.sh rmm docker --build-arg "`
echo "--- Build libxgboost from the source" echo "--- Build libxgboost from the source"
$command_wrapper tests/ci_build/build_via_cmake.sh --conda-env=gpu_test -DUSE_CUDA=ON \ $command_wrapper tests/ci_build/build_via_cmake.sh --conda-env=gpu_test -DUSE_CUDA=ON \
-DUSE_NCCL=ON -DPLUGIN_RMM=ON -DBUILD_WITH_CUDA_CUB=ON ${arch_flag} -DUSE_NCCL=ON -DPLUGIN_RMM=ON ${arch_flag}
echo "-- Stash C++ test executable (testxgboost)" echo "-- Stash C++ test executable (testxgboost)"
buildkite-agent artifact upload build/testxgboost buildkite-agent artifact upload build/testxgboost