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:
Andy Adinets
2020-07-20 01:58:41 +02:00
committed by GitHub
parent ac9136ee49
commit b3d2e7644a
7 changed files with 128 additions and 75 deletions

View File

@@ -19,8 +19,10 @@ target_link_libraries(testxgboost PRIVATE objxgboost)
if (USE_CUDA)
# OpenMP is mandatory for CUDA
find_package(OpenMP REQUIRED)
target_include_directories(testxgboost PRIVATE
${xgboost_SOURCE_DIR}/cub/)
if (CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 11.0)
target_include_directories(testxgboost PRIVATE
${xgboost_SOURCE_DIR}/cub/)
endif (CMAKE_CUDA_COMPILER_VERSION VERSION_LESS 11.0)
target_compile_options(testxgboost PRIVATE
$<$<COMPILE_LANGUAGE:CUDA>:--expt-extended-lambda>
$<$<COMPILE_LANGUAGE:CUDA>:--expt-relaxed-constexpr>

View File

@@ -148,8 +148,8 @@ void TestLearnerSerialization(Args args, FeatureMap const& fmap, std::shared_ptr
// Binary is not tested, as it is NOT reproducible.
class SerializationTest : public ::testing::Test {
protected:
size_t constexpr static kRows = 10;
size_t constexpr static kCols = 10;
size_t constexpr static kRows = 15;
size_t constexpr static kCols = 15;
std::shared_ptr<DMatrix> p_dmat_;
FeatureMap fmap_;