Go to the documentation of this file.
5 #ifndef XGBOOST_GENERIC_PARAMETERS_H_
6 #define XGBOOST_GENERIC_PARAMETERS_H_
8 #include <xgboost/logging.h>
17 static int32_t constexpr
kCpuId = -1;
48 "Random number seed during training.");
49 DMLC_DECLARE_ALIAS(
seed, random_state);
53 "Seed PRNG determnisticly via iterator number, "
54 "this option will be switched on automatically on distributed "
56 DMLC_DECLARE_FIELD(
nthread).set_default(0).describe(
57 "Number of threads to use.");
58 DMLC_DECLARE_ALIAS(
nthread, n_jobs);
63 .describe(
"The primary GPU device ordinal.");
66 .describe(
"Fail with error when gpu_id is invalid.");
69 .describe(
"Enable checking whether parameters are used or not.");
74 #endif // XGBOOST_GENERIC_PARAMETERS_H_
int gpu_id
Definition: generic_parameters.h:29
DMLC_DECLARE_PARAMETER(GenericParameter)
Definition: generic_parameters.h:46
Definition: generic_parameters.h:15
macro for using C++11 enum class as DMLC parameter
bool seed_per_iteration
Definition: generic_parameters.h:24
bool fail_on_invalid_gpu_id
Definition: generic_parameters.h:31
Definition: parameter.h:84
static constexpr int64_t kDefaultSeed
Definition: generic_parameters.h:18
void ConfigureGpuId(bool require_gpu)
Configure the parameter ‘gpu_id’.
bool validate_parameters
Definition: generic_parameters.h:32
int nthread
Definition: generic_parameters.h:27
static constexpr int32_t kCpuId
Definition: generic_parameters.h:17
int64_t seed
Definition: generic_parameters.h:22
namespace of xgboost
Definition: base.h:110