Simplify the data backends. (#5893)
This commit is contained in:
@@ -12,12 +12,16 @@ void DMatrixProxy::FromCudaColumnar(std::string interface_str) {
|
||||
auto const& value = adapter->Value();
|
||||
this->batch_ = adapter;
|
||||
device_ = adapter->DeviceIdx();
|
||||
this->Info().num_col_ = adapter->NumColumns();
|
||||
this->Info().num_row_ = adapter->NumRows();
|
||||
}
|
||||
|
||||
void DMatrixProxy::FromCudaArray(std::string interface_str) {
|
||||
std::shared_ptr<CupyAdapter> adapter(new CupyAdapter(interface_str));
|
||||
this->batch_ = adapter;
|
||||
device_ = adapter->DeviceIdx();
|
||||
this->Info().num_col_ = adapter->NumColumns();
|
||||
this->Info().num_row_ = adapter->NumRows();
|
||||
}
|
||||
|
||||
} // namespace data
|
||||
|
||||
Reference in New Issue
Block a user