Add tests for prediction cache. (#7650)

* Extract the test from approx for other tree methods.
* Add note on how it works.
This commit is contained in:
Jiaming Yuan
2022-02-15 00:28:00 +08:00
committed by GitHub
parent 5cd1f71b51
commit 2369d55e9a
5 changed files with 134 additions and 57 deletions

View File

@@ -692,6 +692,9 @@ struct GPUHistMakerDevice {
if (GPUExpandEntry::ChildIsValid(param, tree.GetDepth(left_child_nidx),
num_leaves)) {
monitor.Start("UpdatePosition");
// Update position is only run when child is valid, instead of right after apply
// split (as in approx tree method). Hense we have the finalise position call
// in GPU Hist.
this->UpdatePosition(candidate.nid, p_tree);
monitor.Stop("UpdatePosition");