Fixed single-GPU tests. (#4053)

- ./testxgboost (without filters) failed if run on a multi-GPU machine because
  the memory was allocated on the current device, but device 0
  was always passed into LaunchN
This commit is contained in:
Andy Adinets
2019-01-11 08:33:15 +01:00
committed by Rory Mitchell
parent 5f151c5cf3
commit 0f8af85f64
2 changed files with 15 additions and 0 deletions

View File

@@ -32,6 +32,7 @@ struct ReadSymbolFunction {
};
TEST(CompressedIterator, TestGPU) {
dh::safe_cuda(cudaSetDevice(0));
std::vector<int> test_cases = {1, 3, 426, 21, 64, 256, 100000, INT32_MAX};
int num_elements = 1000;
int repetitions = 1000;