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:
@@ -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>
|
||||
|
||||
@@ -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_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user