Skip to content

Commit

Permalink
Fix multi-GPU test failures (#4259)
Browse files Browse the repository at this point in the history
  • Loading branch information
RAMitchell authored Mar 15, 2019
1 parent 4352fcd commit 5465b73
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/linear/updater_gpu_coordinate.cu
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,11 @@ class GPUCoordinateUpdater : public LinearUpdater {
monitor_.Stop("LazyInitShards");

monitor_.Start("UpdateGpair");
auto &in_gpair_host = in_gpair->ConstHostVector();
// Update gpair
dh::ExecuteIndexShards(&shards_, [&](int idx, std::unique_ptr<DeviceShard>& shard) {
if (!shard->IsEmpty()) {
shard->UpdateGpair(in_gpair->ConstHostVector(), model->param);
shard->UpdateGpair(in_gpair_host, model->param);
}
});
monitor_.Stop("UpdateGpair");
Expand Down

0 comments on commit 5465b73

Please sign in to comment.