Configure cub version automatically. (#7579)

Note that when cub inside CUDA is being used, XGBoost performs checks on input size
instead of using internal cub function to accept inputs larger than maximum integer.
This commit is contained in:
Jiaming Yuan 2022-01-20 19:49:26 +08:00 committed by GitHub
parent ac7a36367c
commit 529cf8a54a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,7 +138,7 @@ if (USE_CUDA)
add_subdirectory(${PROJECT_SOURCE_DIR}/gputreeshap)
if ((${CMAKE_CUDA_COMPILER_VERSION} VERSION_GREATER_EQUAL 11.4) AND (NOT BUILD_WITH_CUDA_CUB))
message(SEND_ERROR "`BUILD_WITH_CUDA_CUB` should be set to `ON` for CUDA >= 11.4")
set(BUILD_WITH_CUDA_CUB ON)
endif ()
endif (USE_CUDA)