Optimize cpu sketch allreduce for sparse data. (#6009)
* Bypass RABIT serialization reducer and use custom allgather based merging.
This commit is contained in:
@@ -23,9 +23,9 @@ TEST(CAPI, XGDMatrixCreateFromMatDT) {
|
||||
std::shared_ptr<xgboost::DMatrix> *dmat =
|
||||
static_cast<std::shared_ptr<xgboost::DMatrix> *>(handle);
|
||||
xgboost::MetaInfo &info = (*dmat)->Info();
|
||||
ASSERT_EQ(info.num_col_, 2);
|
||||
ASSERT_EQ(info.num_row_, 3);
|
||||
ASSERT_EQ(info.num_nonzero_, 6);
|
||||
ASSERT_EQ(info.num_col_, 2ul);
|
||||
ASSERT_EQ(info.num_row_, 3ul);
|
||||
ASSERT_EQ(info.num_nonzero_, 6ul);
|
||||
|
||||
for (const auto &batch : (*dmat)->GetBatches<xgboost::SparsePage>()) {
|
||||
ASSERT_EQ(batch[0][0].fvalue, 0.0f);
|
||||
@@ -38,9 +38,9 @@ TEST(CAPI, XGDMatrixCreateFromMatDT) {
|
||||
}
|
||||
|
||||
TEST(CAPI, XGDMatrixCreateFromMatOmp) {
|
||||
std::vector<int> num_rows = {100, 11374, 15000};
|
||||
std::vector<bst_ulong> num_rows = {100, 11374, 15000};
|
||||
for (auto row : num_rows) {
|
||||
int num_cols = 50;
|
||||
bst_ulong num_cols = 50;
|
||||
int num_missing = 5;
|
||||
DMatrixHandle handle;
|
||||
std::vector<float> data(num_cols * row, 1.5);
|
||||
|
||||
Reference in New Issue
Block a user