Make HostDeviceVector single gpu only (#4773)
* Make HostDeviceVector single gpu only
This commit is contained in:
@@ -29,9 +29,9 @@
|
||||
#endif
|
||||
|
||||
#if defined(__CUDACC__)
|
||||
#define NGPUS 1
|
||||
#define GPUIDX 0
|
||||
#else
|
||||
#define NGPUS 0
|
||||
#define GPUIDX -1
|
||||
#endif
|
||||
|
||||
bool FileExists(const std::string& filename);
|
||||
@@ -189,11 +189,10 @@ std::unique_ptr<DMatrix> CreateSparsePageDMatrixWithRC(size_t n_rows, size_t n_c
|
||||
|
||||
gbm::GBTreeModel CreateTestModel();
|
||||
|
||||
inline GenericParameter CreateEmptyGenericParam(int gpu_id, int n_gpus) {
|
||||
inline GenericParameter CreateEmptyGenericParam(int gpu_id) {
|
||||
xgboost::GenericParameter tparam;
|
||||
std::vector<std::pair<std::string, std::string>> args {
|
||||
{"gpu_id", std::to_string(gpu_id)},
|
||||
{"n_gpus", std::to_string(n_gpus)}};
|
||||
{"gpu_id", std::to_string(gpu_id)}};
|
||||
tparam.Init(args);
|
||||
return tparam;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user