Remove unused variables. (#9210)
- remove used variables. - Remove signed comparison warnings.
This commit is contained in:
@@ -252,7 +252,7 @@ inline AllgatherVResult<T> AllgatherV(std::vector<T> const &inputs,
|
||||
|
||||
// Calculate input offsets (std::exclusive_scan).
|
||||
std::vector<std::size_t> offsets(all_sizes.size());
|
||||
for (auto i = 1; i < offsets.size(); i++) {
|
||||
for (std::size_t i = 1; i < offsets.size(); i++) {
|
||||
offsets[i] = offsets[i - 1] + all_sizes[i - 1];
|
||||
}
|
||||
|
||||
|
||||
@@ -263,8 +263,7 @@ class PartitionBuilder {
|
||||
template <typename ExpandEntry>
|
||||
void PartitionByMask(const size_t node_in_set, std::vector<ExpandEntry> const& nodes,
|
||||
const common::Range1d range, GHistIndexMatrix const& gmat,
|
||||
const common::ColumnMatrix& column_matrix, const RegTree& tree,
|
||||
const size_t* rid, BitVector const& decision_bits,
|
||||
const RegTree& tree, const size_t* rid, BitVector const& decision_bits,
|
||||
BitVector const& missing_bits) {
|
||||
common::Span<const size_t> rid_span(rid + range.begin(), rid + range.end());
|
||||
common::Span<size_t> left = GetLeftBuffer(node_in_set, range.begin(), range.end());
|
||||
|
||||
@@ -67,7 +67,7 @@ class ColumnSplitHelper {
|
||||
const int32_t nid = nodes[node_in_set].nid;
|
||||
const size_t task_id = partition_builder_->GetTaskIdx(node_in_set, begin);
|
||||
partition_builder_->AllocateForTask(task_id);
|
||||
partition_builder_->PartitionByMask(node_in_set, nodes, r, gmat, column_matrix, *p_tree,
|
||||
partition_builder_->PartitionByMask(node_in_set, nodes, r, gmat, *p_tree,
|
||||
(*row_set_collection_)[nid].begin, decision_bits_,
|
||||
missing_bits_);
|
||||
});
|
||||
|
||||
@@ -298,7 +298,7 @@ class HistEvaluator {
|
||||
std::vector<CPUExpandEntry> all_entries(num_entries * world);
|
||||
std::vector<uint32_t> cat_bits;
|
||||
std::vector<std::size_t> cat_bits_sizes;
|
||||
for (auto i = 0; i < num_entries; i++) {
|
||||
for (std::size_t i = 0; i < num_entries; i++) {
|
||||
all_entries[num_entries * rank + i].CopyAndCollect(entries[i], &cat_bits, &cat_bits_sizes);
|
||||
}
|
||||
collective::Allgather(all_entries.data(), all_entries.size() * sizeof(CPUExpandEntry));
|
||||
@@ -586,7 +586,7 @@ class HistMultiEvaluator {
|
||||
std::vector<uint32_t> cat_bits;
|
||||
std::vector<std::size_t> cat_bits_sizes;
|
||||
std::vector<GradientPairPrecise> gradients;
|
||||
for (auto i = 0; i < num_entries; i++) {
|
||||
for (std::size_t i = 0; i < num_entries; i++) {
|
||||
all_entries[num_entries * rank + i].CopyAndCollect(entries[i], &cat_bits, &cat_bits_sizes,
|
||||
&gradients);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user