Make HostDeviceVector single gpu only (#4773)
* Make HostDeviceVector single gpu only
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
|
||||
TEST(Linear, shotgun) {
|
||||
auto mat = xgboost::CreateDMatrix(10, 10, 0);
|
||||
auto lparam = xgboost::CreateEmptyGenericParam(0, 0);
|
||||
auto lparam = xgboost::CreateEmptyGenericParam(GPUIDX);
|
||||
{
|
||||
auto updater = std::unique_ptr<xgboost::LinearUpdater>(
|
||||
xgboost::LinearUpdater::Create("shotgun", &lparam));
|
||||
@@ -33,7 +33,7 @@ TEST(Linear, shotgun) {
|
||||
|
||||
TEST(Linear, coordinate) {
|
||||
auto mat = xgboost::CreateDMatrix(10, 10, 0);
|
||||
auto lparam = xgboost::CreateEmptyGenericParam(0, 0);
|
||||
auto lparam = xgboost::CreateEmptyGenericParam(GPUIDX);
|
||||
auto updater = std::unique_ptr<xgboost::LinearUpdater>(
|
||||
xgboost::LinearUpdater::Create("coord_descent", &lparam));
|
||||
updater->Configure({{"eta", "1."}});
|
||||
|
||||
@@ -7,8 +7,7 @@ namespace xgboost {
|
||||
|
||||
TEST(Linear, GPUCoordinate) {
|
||||
auto mat = xgboost::CreateDMatrix(10, 10, 0);
|
||||
auto lparam = CreateEmptyGenericParam(0, 1);
|
||||
lparam.n_gpus = 1;
|
||||
auto lparam = CreateEmptyGenericParam(GPUIDX);
|
||||
auto updater = std::unique_ptr<xgboost::LinearUpdater>(
|
||||
xgboost::LinearUpdater::Create("gpu_coord_descent", &lparam));
|
||||
updater->Configure({{"eta", "1."}});
|
||||
|
||||
Reference in New Issue
Block a user