Remove column major specialization. (#5755)
Co-authored-by: Hyunsu Cho <chohyu01@cs.washington.edu>
This commit is contained in:
@@ -149,7 +149,8 @@ TEST(CpuPredictor, InplacePredict) {
|
||||
HostDeviceVector<float> data;
|
||||
gen.GenerateDense(&data);
|
||||
ASSERT_EQ(data.Size(), kRows * kCols);
|
||||
data::DenseAdapter x{data.HostPointer(), kRows, kCols};
|
||||
std::shared_ptr<data::DenseAdapter> x{
|
||||
new data::DenseAdapter(data.HostPointer(), kRows, kCols)};
|
||||
TestInplacePrediction(x, "cpu_predictor", kRows, kCols, -1);
|
||||
}
|
||||
|
||||
@@ -158,8 +159,9 @@ TEST(CpuPredictor, InplacePredict) {
|
||||
HostDeviceVector<bst_row_t> rptrs;
|
||||
HostDeviceVector<bst_feature_t> columns;
|
||||
gen.GenerateCSR(&data, &rptrs, &columns);
|
||||
data::CSRAdapter x(rptrs.HostPointer(), columns.HostPointer(),
|
||||
data.HostPointer(), kRows, data.Size(), kCols);
|
||||
std::shared_ptr<data::CSRAdapter> x{new data::CSRAdapter(
|
||||
rptrs.HostPointer(), columns.HostPointer(), data.HostPointer(), kRows,
|
||||
data.Size(), kCols)};
|
||||
TestInplacePrediction(x, "cpu_predictor", kRows, kCols, -1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ TEST(GPUPredictor, InplacePredictCupy) {
|
||||
gen.Device(0);
|
||||
HostDeviceVector<float> data;
|
||||
std::string interface_str = gen.GenerateArrayInterface(&data);
|
||||
data::CupyAdapter x{interface_str};
|
||||
auto x = std::make_shared<data::CupyAdapter>(interface_str);
|
||||
TestInplacePrediction(x, "gpu_predictor", kRows, kCols, 0);
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ TEST(GPUPredictor, InplacePredictCuDF) {
|
||||
gen.Device(0);
|
||||
std::vector<HostDeviceVector<float>> storage(kCols);
|
||||
auto interface_str = gen.GenerateColumnarArrayInterface(&storage);
|
||||
data::CudfAdapter x {interface_str};
|
||||
auto x = std::make_shared<data::CudfAdapter>(interface_str);
|
||||
TestInplacePrediction(x, "gpu_predictor", kRows, kCols, 0);
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ TEST(GPUPredictor, MGPU_InplacePredict) { // NOLINT
|
||||
gen.Device(1);
|
||||
HostDeviceVector<float> data;
|
||||
std::string interface_str = gen.GenerateArrayInterface(&data);
|
||||
data::CupyAdapter x{interface_str};
|
||||
auto x = std::make_shared<data::CupyAdapter>(interface_str);
|
||||
TestInplacePrediction(x, "gpu_predictor", kRows, kCols, 1);
|
||||
EXPECT_THROW(TestInplacePrediction(x, "gpu_predictor", kRows, kCols, 0),
|
||||
dmlc::Error);
|
||||
|
||||
Reference in New Issue
Block a user