Skip to content

Commit

Permalink
annotation.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Jun 3, 2023
1 parent 5c76e21 commit 7a45626
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/tree/updater_quantile_hist.cc
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ class HistBuilder {

CPUExpandEntry InitRoot(DMatrix *p_fmat, linalg::MatrixView<GradientPair const> gpair,
RegTree *p_tree) {
monitor_->Start(__func__);
CPUExpandEntry node(RegTree::kRoot, p_tree->GetDepth(0));

std::size_t page_id = 0;
Expand Down Expand Up @@ -475,12 +476,14 @@ class HistBuilder {
node = entries.front();
}

monitor_->Stop(__func__);
return node;
}

void BuildHistogram(DMatrix *p_fmat, RegTree *p_tree,
std::vector<CPUExpandEntry> const &valid_candidates,
linalg::MatrixView<GradientPair const> gpair) {
monitor_->Start(__func__);
std::vector<CPUExpandEntry> nodes_to_build(valid_candidates.size());
std::vector<CPUExpandEntry> nodes_to_sub(valid_candidates.size());

Expand Down Expand Up @@ -508,6 +511,7 @@ class HistBuilder {
nodes_to_sub, gpair.Values());
++page_id;
}
monitor_->Stop(__func__);
}

void UpdatePosition(DMatrix *p_fmat, RegTree const *p_tree,
Expand All @@ -525,6 +529,7 @@ class HistBuilder {
std::vector<bst_node_t> *p_out_position) {
monitor_->Start(__func__);
if (!task_->UpdateTreeLeaf()) {
monitor_->Stop(__func__);
return;
}
for (auto const &part : partitioner_) {
Expand Down

0 comments on commit 7a45626

Please sign in to comment.