- A new DMatrix type. - Extract common code into a new QDM base class. Not yet working: - Not exposed to the interface yet, will wait for the GPU implementation. - ~No meta info yet, still working on the source.~ - Exporting data to CSR is not supported yet.
22 lines
728 B
Plaintext
22 lines
728 B
Plaintext
/**
|
|
* Copyright 2021-2024, XGBoost contributors
|
|
*/
|
|
#include "../common/device_helpers.cuh" // for CurrentDevice
|
|
#include "proxy_dmatrix.cuh" // for Dispatch, DMatrixProxy
|
|
#include "simple_dmatrix.cuh" // for CopyToSparsePage
|
|
#include "sparse_page_source.h"
|
|
#include "xgboost/data.h" // for SparsePage
|
|
|
|
namespace xgboost::data {
|
|
void DevicePush(DMatrixProxy *proxy, float missing, SparsePage *page) {
|
|
auto device = proxy->Device();
|
|
if (!device.IsCUDA()) {
|
|
device = DeviceOrd::CUDA(dh::CurrentDevice());
|
|
}
|
|
CHECK(device.IsCUDA());
|
|
|
|
cuda_impl::Dispatch(proxy,
|
|
[&](auto const &value) { CopyToSparsePage(value, device, missing, page); });
|
|
}
|
|
} // namespace xgboost::data
|