Various bug fixes (#2825)

* Fatal error if GPU algorithm selected without GPU support compiled

* Resolve type conversion warnings

* Fix gpu unit test failure

* Fix compressed iterator edge case

* Fix python unit test failures due to flake8 update on pip
This commit is contained in:
Rory Mitchell
2017-10-25 14:45:01 +13:00
committed by GitHub
parent c71b62d48d
commit 13e7a2cff0
21 changed files with 163 additions and 180 deletions

View File

@@ -16,7 +16,7 @@ TEST(gpu_predictor, Test) {
std::unique_ptr<Predictor>(Predictor::Create("cpu_predictor"));
std::vector<std::unique_ptr<RegTree>> trees;
trees.push_back(std::unique_ptr<RegTree>());
trees.push_back(std::unique_ptr<RegTree>(new RegTree()));
trees.back()->InitModel();
(*trees.back())[0].set_leaf(1.5f);
(*trees.back()).stat(0).sum_hess = 1.0f;
@@ -39,7 +39,6 @@ TEST(gpu_predictor, Test) {
ASSERT_LT(std::abs(gpu_out_predictions[i] - cpu_out_predictions[i]),
abs_tolerance);
}
// Test predict instance
auto batch = dmat->RowIterator()->Value();
for (int i = 0; i < batch.size; i++) {