Partial fix for CTK 12.5 (#10574)

This commit is contained in:
Jiaming Yuan 2024-07-16 17:41:50 +08:00 committed by GitHub
parent 370dce9d57
commit 5a92ffe3ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 13 deletions

View File

@ -1,18 +1,13 @@
/*! /**
* Copyright 2017-2019 XGBoost contributors * Copyright 2017-2024, XGBoost contributors
*/ */
#pragma once #pragma once
#include <thrust/random.h> #include <limits> // for numeric_limits
#include <cstdio> #include <ostream> // for ostream
#include <cub/cub.cuh>
#include <stdexcept>
#include <string>
#include <vector>
#include "../common/categorical.h"
#include "../common/device_helpers.cuh"
#include "../common/random.h"
#include "gpu_hist/histogram.cuh" #include "gpu_hist/histogram.cuh"
#include "param.h" #include "param.h"
#include "xgboost/base.h"
namespace xgboost::tree { namespace xgboost::tree {
struct GPUTrainingParam { struct GPUTrainingParam {
@ -54,7 +49,7 @@ enum DefaultDirection {
}; };
struct DeviceSplitCandidate { struct DeviceSplitCandidate {
float loss_chg {-FLT_MAX}; float loss_chg{-std::numeric_limits<float>::max()};
DefaultDirection dir{kLeftDir}; DefaultDirection dir{kLeftDir};
int findex {-1}; int findex {-1};
float fvalue {0}; float fvalue {0};

View File

@ -19,6 +19,7 @@
#include "../common/cuda_context.cuh" // CUDAContext #include "../common/cuda_context.cuh" // CUDAContext
#include "../common/device_helpers.cuh" #include "../common/device_helpers.cuh"
#include "../common/hist_util.h" #include "../common/hist_util.h"
#include "../common/random.h" // for ColumnSampler, GlobalRandom
#include "../common/timer.h" #include "../common/timer.h"
#include "../data/ellpack_page.cuh" #include "../data/ellpack_page.cuh"
#include "../data/ellpack_page.h" #include "../data/ellpack_page.h"