Skip to content

Commit 61e0371

Browse files
authored
[backport] Partial fix for CTK 12.5 (dmlc#10574) (dmlc#10638)
1 parent 3fd8451 commit 61e0371

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

src/tree/updater_gpu_common.cuh

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
1-
/*!
2-
* Copyright 2017-2019 XGBoost contributors
1+
/**
2+
* Copyright 2017-2024, XGBoost contributors
33
*/
44
#pragma once
5-
#include <thrust/random.h>
6-
#include <cstdio>
7-
#include <cub/cub.cuh>
8-
#include <stdexcept>
9-
#include <string>
10-
#include <vector>
11-
#include "../common/categorical.h"
12-
#include "../common/device_helpers.cuh"
13-
#include "../common/random.h"
5+
#include <limits> // for numeric_limits
6+
#include <ostream> // for ostream
7+
148
#include "gpu_hist/histogram.cuh"
159
#include "param.h"
10+
#include "xgboost/base.h"
1611

1712
namespace xgboost::tree {
1813
struct GPUTrainingParam {
@@ -54,8 +49,8 @@ enum DefaultDirection {
5449
};
5550

5651
struct DeviceSplitCandidate {
57-
float loss_chg {-FLT_MAX};
58-
DefaultDirection dir {kLeftDir};
52+
float loss_chg{-std::numeric_limits<float>::max()};
53+
DefaultDirection dir{kLeftDir};
5954
int findex {-1};
6055
float fvalue {0};
6156
// categorical split, either it's the split category for OHE or the threshold for partition-based

src/tree/updater_gpu_hist.cu

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "../common/cuda_context.cuh" // CUDAContext
2020
#include "../common/device_helpers.cuh"
2121
#include "../common/hist_util.h"
22+
#include "../common/random.h" // for ColumnSampler, GlobalRandom
2223
#include "../common/timer.h"
2324
#include "../data/ellpack_page.cuh"
2425
#include "../data/ellpack_page.h"

0 commit comments

Comments
 (0)