Extract interaction constraint from split evaluator. (#5034)
* Extract interaction constraints from split evaluator. The reason for doing so is mostly for model IO, where num_feature and interaction_constraints are copied in split evaluator. Also interaction constraint by itself is a feature selector, acting like column sampler and it's inefficient to bury it deep in the evaluator chain. Lastly removing one another copied parameter is a win. * Enable inc for approx tree method. As now the implementation is spited up from evaluator class, it's also enabled for approx method. * Removing obsoleted code in colmaker. They are never documented nor actually used in real world. Also there isn't a single test for those code blocks. * Unifying the types used for row and column. As the size of input dataset is marching to billion, incorrect use of int is subject to overflow, also singed integer overflow is undefined behaviour. This PR starts the procedure for unifying used index type to unsigned integers. There's optimization that can utilize this undefined behaviour, but after some testings I don't see the optimization is beneficial to XGBoost.
This commit is contained in:
@@ -80,13 +80,13 @@ struct DevicePredictionNode {
|
||||
|
||||
struct ElementLoader {
|
||||
bool use_shared;
|
||||
common::Span<const size_t> d_row_ptr;
|
||||
common::Span<const bst_row_t> d_row_ptr;
|
||||
common::Span<const Entry> d_data;
|
||||
int num_features;
|
||||
float* smem;
|
||||
size_t entry_start;
|
||||
|
||||
__device__ ElementLoader(bool use_shared, common::Span<const size_t> row_ptr,
|
||||
__device__ ElementLoader(bool use_shared, common::Span<const bst_row_t> row_ptr,
|
||||
common::Span<const Entry> entry, int num_features,
|
||||
float* smem, int num_rows, size_t entry_start)
|
||||
: use_shared(use_shared),
|
||||
@@ -166,7 +166,7 @@ __global__ void PredictKernel(common::Span<const DevicePredictionNode> d_nodes,
|
||||
common::Span<float> d_out_predictions,
|
||||
common::Span<size_t> d_tree_segments,
|
||||
common::Span<int> d_tree_group,
|
||||
common::Span<const size_t> d_row_ptr,
|
||||
common::Span<const bst_row_t> d_row_ptr,
|
||||
common::Span<const Entry> d_data, size_t tree_begin,
|
||||
size_t tree_end, size_t num_features,
|
||||
size_t num_rows, size_t entry_start,
|
||||
|
||||
Reference in New Issue
Block a user