Replace device sync with stream sync. (#7737)

This commit is contained in:
Jiaming Yuan
2022-03-19 23:22:23 +08:00
committed by GitHub
parent da351621a1
commit 9a400731d9

View File

@@ -665,7 +665,7 @@ struct GPUHistMakerDevice {
new_candidates[i * 2 + 1] = GPUExpandEntry(); new_candidates[i * 2 + 1] = GPUExpandEntry();
} }
} }
dh::safe_cuda(cudaDeviceSynchronize()); dh::DefaultStream().Sync();
driver.Push(new_candidates.begin(), new_candidates.end()); driver.Push(new_candidates.begin(), new_candidates.end());
expand_set = driver.Pop(); expand_set = driver.Pop();
} }