-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sketching from adapters #5365
Sketching from adapters #5365
Conversation
I'm a little bit concerned about removing weight, we should do some experiments to estimate the impact on various datasets with different characteristics. |
Weighted quantile sketch is one of prominent contribution of XGBoost paper (2016). Is it necessary to remove it? |
We cant currently access weights via the adapter constructor - they get added after in different c_api functions. If we can change the c_api to get weights on dmatrix construction we can do it. |
Can we create an empty DMatrix handle at first? |
Current implementation preserves existing behaviour, using weights to compute quantiles when available from the DMatrix. When we implement DMatrix from adapters we can revisit how to access weights in this case. |
7a4e713
to
85a7c62
Compare
} | ||
// Count the entries in each column and exclusive scan | ||
void GetColumnSizesScan(int device, | ||
dh::caching_device_vector<size_t>* column_sizes_scan, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I defined bst_row_t
and bst_feature_t
and we should use them more often.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted. If something is a sum I think it is reasonable to use size_t. For example a sum of bst_row_t
can exceed 32 bits.
85a7c62
to
5852f48
Compare
I don't think the maker function can be a cause of fatal error right? It's just a helper function for type deduction |
This is the whole definition of template <class AdaptableUnaryFunction, class Iterator>
inline __host__ __device__
transform_iterator<AdaptableUnaryFunction, Iterator>
make_transform_iterator(Iterator it, AdaptableUnaryFunction fun)
{
return transform_iterator<AdaptableUnaryFunction, Iterator>(it, fun);
} // end make_transform_iterator Other than it's a host device function, there's no difference with your implementation. Could you take a deeper look into the fatal error you encountered? I think it's worth the debugging effort. |
My implementation explicitly specifies the return type. The issue has always beem automatic return type deduction on msvc. I can look further. |
Yup thanks! You can just print the return type by debugger or use |
These are the two return types for my version and thrust: thrust::transform_iterator<__nv_dl_wrapper_t<__nv_dl_tag<void (__cdecl*)(xgboost::data::CupyAdapter *,unsigned __int64,unsigned __int64,float,xgboost::common::SketchContainer *,int),&xgboost::common::ProcessBatch<xgboost::data::CupyAdapter>,1>,xgboost::data::CupyAdapterBatch const >,thrust::counting_iterator<unsigned __int64,thrust::use_default,thrust::use_default,thrust::use_default>,xgboost::data::COOTuple,thrust::use_default>
thrust::transform_iterator<__nv_dl_wrapper_t<__nv_dl_tag<void (__cdecl*)(xgboost::data::CupyAdapter *,unsigned __int64,unsigned __int64,float,xgboost::common::SketchContainer *,int),&xgboost::common::ProcessBatch<xgboost::data::CupyAdapter>,2>,xgboost::data::CupyAdapterBatch const >,thrust::counting_iterator<unsigned __int64,thrust::use_default,thrust::use_default,thrust::use_default>,thrust::use_default,thrust::use_default> |
Let me take another look today. It seems weird that the |
This reverts commit a38e7bd.
This reverts commit 6a85632.
Overhaul of GPU sketching code to support sketching on external data.
Todo:
Verify peak memory usage
Some performance charts: