Merge generic device helper functions into gpu set. (#3626)
* Remove the use of old NDevices* functions. * Use GPUSet in timer.h.
This commit is contained in:
committed by
Rory Mitchell
parent
3261002099
commit
60787ecebc
@@ -11,6 +11,7 @@
|
||||
#include <xgboost/tree_model.h>
|
||||
#include <xgboost/tree_updater.h>
|
||||
#include <memory>
|
||||
#include "../common/gpu_set.h"
|
||||
#include "../common/device_helpers.cuh"
|
||||
#include "../common/host_device_vector.h"
|
||||
|
||||
@@ -464,7 +465,7 @@ class GPUPredictor : public xgboost::Predictor {
|
||||
Predictor::Init(cfg, cache);
|
||||
cpu_predictor->Init(cfg, cache);
|
||||
param.InitAllowUnknown(cfg);
|
||||
devices = GPUSet::Range(param.gpu_id, dh::NDevicesAll(param.n_gpus));
|
||||
devices = GPUSet::All(param.n_gpus).Normalised(param.gpu_id);
|
||||
max_shared_memory_bytes = dh::MaxSharedMemory(param.gpu_id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user