Medial Code Documentation
Loading...
Searching...
No Matches
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 <dmlc/thread_local.h> // for ThreadLocalStore
11#include <xgboost/parameter.h> // for XGBoostParameter
12
13#include <cstdint> // for int32_t
14
15namespace xgboost {
16struct GlobalConfiguration : public XGBoostParameter<GlobalConfiguration> {
17 std::int32_t verbosity{1};
18 bool use_rmm{false};
19 DMLC_DECLARE_PARAMETER(GlobalConfiguration) {
20 DMLC_DECLARE_FIELD(verbosity)
21 .set_range(0, 3)
22 .set_default(1) // shows only warning
23 .describe("Flag to print out detailed breakdown of runtime.");
24 DMLC_DECLARE_FIELD(use_rmm).set_default(false).describe(
25 "Whether to use RAPIDS Memory Manager to allocate GPU memory in XGBoost");
26 }
27};
28
30} // namespace xgboost
31
32#endif // XGBOOST_GLOBAL_CONFIG_H_
A threadlocal store to store threadlocal variables. Will return a thread local singleton of type T.
Definition thread_local.h:35
macro for using C++11 enum class as DMLC parameter
namespace of xgboost
Definition base.h:90
Definition global_config.h:16
Definition parameter.h:84
Portable thread local storage.