Support building XGBoost with CUDA 11 (#5808)
* Change serialization test. * Add CUDA 11 tests on Linux CI. Co-authored-by: Philip Hyunsu Cho <chohyu01@cs.washington.edu>
This commit is contained in:
@@ -9,7 +9,9 @@ if (USE_CUDA)
|
||||
file(GLOB_RECURSE CUDA_SOURCES *.cu *.cuh)
|
||||
target_sources(objxgboost PRIVATE ${CUDA_SOURCES})
|
||||
target_compile_definitions(objxgboost PRIVATE -DXGBOOST_USE_CUDA=1)
|
||||
target_include_directories(objxgboost PRIVATE ${xgboost_SOURCE_DIR}/cub/)
|
||||
if (CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 11.0)
|
||||
target_include_directories(objxgboost PRIVATE ${xgboost_SOURCE_DIR}/cub/)
|
||||
endif (CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 11.0)
|
||||
target_compile_options(objxgboost PRIVATE
|
||||
$<$<COMPILE_LANGUAGE:CUDA>:--expt-extended-lambda>
|
||||
$<$<COMPILE_LANGUAGE:CUDA>:--expt-relaxed-constexpr>
|
||||
|
||||
Reference in New Issue
Block a user