[GPU-Plugin] (#2227)
* Add fast histogram algorithm * Fix Linux build * Add 'gpu_id' parameter
This commit is contained in:
committed by
Tianqi Chen
parent
d281c6aafa
commit
8ab5d4611c
@@ -79,6 +79,8 @@ struct TrainParam : public dmlc::Parameter<TrainParam> {
|
||||
bool refresh_leaf;
|
||||
// auxiliary data structure
|
||||
std::vector<int> monotone_constraints;
|
||||
// gpu to use for single gpu algorithms
|
||||
int gpu_id;
|
||||
// declare the parameters
|
||||
DMLC_DECLARE_PARAMETER(TrainParam) {
|
||||
DMLC_DECLARE_FIELD(learning_rate)
|
||||
@@ -186,6 +188,10 @@ struct TrainParam : public dmlc::Parameter<TrainParam> {
|
||||
DMLC_DECLARE_FIELD(monotone_constraints)
|
||||
.set_default(std::vector<int>())
|
||||
.describe("Constraint of variable monotonicity");
|
||||
DMLC_DECLARE_FIELD(gpu_id)
|
||||
.set_lower_bound(0)
|
||||
.set_default(0)
|
||||
.describe("gpu to use for single gpu algorithms");
|
||||
// add alias of parameters
|
||||
DMLC_DECLARE_ALIAS(reg_lambda, lambda);
|
||||
DMLC_DECLARE_ALIAS(reg_alpha, alpha);
|
||||
|
||||
Reference in New Issue
Block a user