xgboost

global_config.h
Go to the documentation of this file.
1
7 #ifndef XGBOOST_GLOBAL_CONFIG_H_
8 #define XGBOOST_GLOBAL_CONFIG_H_
9
10 #include <xgboost/parameter.h>
11 #include <vector>
12 #include <string>
13
14 namespace xgboost {
15 class Json;
16
17 struct GlobalConfiguration : public XGBoostParameter<GlobalConfiguration> {
18 int verbosity { 1 };
19 bool use_rmm { false };
20 DMLC_DECLARE_PARAMETER(GlobalConfiguration) {
21 DMLC_DECLARE_FIELD(verbosity)
22 .set_range(0, 3)
23 .set_default(1) // shows only warning
24 .describe("Flag to print out detailed breakdown of runtime.");
25 DMLC_DECLARE_FIELD(use_rmm)
26 .set_default(false)
27 .describe("Whether to use RAPIDS Memory Manager to allocate GPU memory in XGBoost");
28 }
29 };
30
31 using GlobalConfigThreadLocalStore = dmlc::ThreadLocalStore<GlobalConfiguration>;
32 } // namespace xgboost
33
34 #endif // XGBOOST_GLOBAL_CONFIG_H_
xgboost::GlobalConfiguration
Definition: global_config.h:17
parameter.h
macro for using C++11 enum class as DMLC parameter
xgboost::GlobalConfiguration::use_rmm
bool use_rmm
Definition: global_config.h:19
xgboost::XGBoostParameter
Definition: parameter.h:84
xgboost::GlobalConfigThreadLocalStore
dmlc::ThreadLocalStore< GlobalConfiguration > GlobalConfigThreadLocalStore
Definition: global_config.h:31
xgboost::GlobalConfiguration::verbosity
int verbosity
Definition: global_config.h:18
xgboost::GlobalConfiguration::DMLC_DECLARE_PARAMETER
DMLC_DECLARE_PARAMETER(GlobalConfiguration)
Definition: global_config.h:20
xgboost
namespace of xgboost
Definition: base.h:110