Unify evaluation functions. (#6037)
This commit is contained in:
@@ -242,7 +242,7 @@ class GradientPairInternal {
|
||||
|
||||
XGBOOST_DEVICE explicit GradientPairInternal(int value) {
|
||||
*this = GradientPairInternal<T>(static_cast<float>(value),
|
||||
static_cast<float>(value));
|
||||
static_cast<float>(value));
|
||||
}
|
||||
|
||||
friend std::ostream &operator<<(std::ostream &os,
|
||||
|
||||
@@ -247,7 +247,7 @@ class SparsePage {
|
||||
/*! \brief the data of the segments */
|
||||
HostDeviceVector<Entry> data;
|
||||
|
||||
size_t base_rowid{};
|
||||
size_t base_rowid {0};
|
||||
|
||||
/*! \brief an instance of sparse vector in the batch */
|
||||
using Inst = common::Span<Entry const>;
|
||||
@@ -548,7 +548,7 @@ class DMatrix {
|
||||
int nthread,
|
||||
int max_bin);
|
||||
|
||||
virtual DMatrix *Slice(common::Span<int32_t const> ridxs) = 0;
|
||||
virtual DMatrix *Slice(common::Span<int32_t const> ridxs) = 0;
|
||||
/*! \brief page size 32 MB */
|
||||
static const size_t kPageSize = 32UL << 20UL;
|
||||
|
||||
|
||||
@@ -104,13 +104,12 @@ namespace common {
|
||||
#if defined(__CUDA_ARCH__)
|
||||
#define SPAN_LT(lhs, rhs) \
|
||||
if (!((lhs) < (rhs))) { \
|
||||
printf("%lu < %lu failed\n", static_cast<size_t>(lhs), \
|
||||
static_cast<size_t>(rhs)); \
|
||||
printf("[xgboost] Condition: %lu < %lu failed\n", \
|
||||
static_cast<size_t>(lhs), static_cast<size_t>(rhs)); \
|
||||
asm("trap;"); \
|
||||
}
|
||||
#else
|
||||
#define SPAN_LT(lhs, rhs) \
|
||||
SPAN_CHECK((lhs) < (rhs))
|
||||
#define SPAN_LT(lhs, rhs) SPAN_CHECK((lhs) < (rhs))
|
||||
#endif // defined(__CUDA_ARCH__)
|
||||
|
||||
namespace detail {
|
||||
|
||||
Reference in New Issue
Block a user