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;
37 if (this->n_gpus != 0) {
40 << this->__MANAGER__()->Find(
"n_gpus")->GetFieldInfo().description;
53 "Random number seed during training.");
54 DMLC_DECLARE_ALIAS(
seed, random_state);
58 "Seed PRNG determnisticly via iterator number, "
59 "this option will be switched on automatically on distributed "
61 DMLC_DECLARE_FIELD(
nthread).set_default(0).describe(
62 "Number of threads to use.");
63 DMLC_DECLARE_ALIAS(
nthread, n_jobs);
68 .describe(
"The primary GPU device ordinal.");
71 .describe(
"Fail with error when gpu_id is invalid.");
75 .describe(
"GPU page size when running in external memory mode.");
78 .describe(
"Enable checking whether parameters are used or not.");
79 DMLC_DECLARE_FIELD(n_gpus)
83 "\n\tDeprecated. Single process multi-GPU training is no longer supported."
84 "\n\tPlease switch to distributed training with one process per GPU."
85 "\n\tThis can be done using Dask or Spark. See documentation for details.");
94 #endif // XGBOOST_GENERIC_PARAMETERS_H_
int gpu_id
Definition: generic_parameters.h:29
DMLC_DECLARE_PARAMETER(GenericParameter)
Definition: generic_parameters.h:51
Definition: generic_parameters.h:15
macro for using C++11 enum class as DMLC parameter
bool seed_per_iteration
Definition: generic_parameters.h:24
void CheckDeprecated()
Definition: generic_parameters.h:36
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’.
size_t gpu_page_size
Definition: generic_parameters.h:33
bool validate_parameters
Definition: generic_parameters.h:34
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