|
template<typename Container > |
Args | UpdateAllowUnknown (Container const &kwargs) |
|
void | ConfigureGpuId (bool require_gpu) |
| Configure the parameter ‘gpu_id’.
|
|
std::int32_t | Threads () const |
| Returns the automatically chosen number of threads based on the nthread parameter and the system settting.
|
|
bool | IsCPU () const |
| Is XGBoost running on CPU?
|
|
bool | IsCUDA () const |
| Is XGBoost running on a CUDA device?
|
|
DeviceOrd | Device () const |
| Get the current device and ordinal.
|
|
bst_d_ordinal_t | Ordinal () const |
| Get the CUDA device ordinal.
|
|
std::string | DeviceName () const |
| Name of the current device.
|
|
CUDAContext const * | CUDACtx () const |
| Get a CUDA device context for allocator and stream.
|
|
Context | MakeCUDA (bst_d_ordinal_t ordinal=0) const |
| Make a CUDA context based on the current context.
|
|
Context | MakeCPU () const |
| Make a CPU context based on the current context.
|
|
template<typename CPUFn , typename CUDAFn > |
decltype(auto) | DispatchDevice (CPUFn &&cpu_fn, CUDAFn &&cuda_fn) const |
| Call function based on the current device.
|
|
| DMLC_DECLARE_PARAMETER (Context) |
|
Args | UpdateAllowUnknown (Container const &kwargs) |
|
bool | GetInitialised () const |
|
Runtime context for XGBoost.
Contains information like threads and device.