Use array interface for CSC matrix. (#8672)

* Use array interface for CSC matrix.

Use array interface for CSC matrix and align the interface with CSR and dense.

- Fix nthread issue in the R package DMatrix.
- Unify the behavior of handling `missing` with other inputs.
- Unify the behavior of handling `missing` around R, Python, Java, and Scala DMatrix.
- Expose `num_non_missing` to the JVM interface.
- Deprecate old CSR and CSC constructors.
This commit is contained in:
Jiaming Yuan
2023-02-05 01:59:46 +08:00
committed by GitHub
parent 213b5602d9
commit c1786849e3
23 changed files with 673 additions and 380 deletions

View File

@@ -8,6 +8,7 @@
#include "../../../src/common/hist_util.h"
#include "../../../src/common/quantile.h"
#include "../../../src/data/adapter.h"
#include "xgboost/context.h"
namespace xgboost {
namespace common {
@@ -183,7 +184,7 @@ void TestSameOnAllWorkers() {
}
auto m = RandomDataGenerator{kRows, kCols, 0}
.Device(0)
.Device(Context::kCpuId)
.Type(ft)
.MaxCategory(17)
.Seed(rank + seed)