Skip to content

Commit 20d4290

Browse files
committed
Revert "Move the event."
This reverts commit 5d09de1.
1 parent 5d09de1 commit 20d4290

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/tree/updater_gpu_hist.cu

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -526,9 +526,9 @@ struct GPUHistMakerDevice {
526526
monitor.Start("Partition-BuildHist");
527527

528528
std::int32_t k{0};
529-
curt::Event e;
530-
531529
for (auto const& page : p_fmat->GetBatches<EllpackPage>(ctx_, StaticBatch(prefetch_copy))) {
530+
curt::Event e;
531+
532532
page.Impl()->Visit(ctx_, {}, [&](auto&& d_matrix) {
533533
using Acc = std::remove_reference_t<decltype(d_matrix)>;
534534
auto go_left = GoLeftOp<Acc>{d_matrix};
@@ -552,8 +552,9 @@ struct GPUHistMakerDevice {
552552
}
553553
});
554554
++k;
555+
556+
this->ctx_->CUDACtx()->Stream().Wait(e);
555557
}
556-
this->ctx_->CUDACtx()->Stream().Wait(e);
557558

558559
monitor.Stop("Partition-BuildHist");
559560

0 commit comments

Comments
 (0)