From ae078a113ef88a7bba88808ed59c057f41c7ea95 Mon Sep 17 00:00:00 2001 From: Dmitry Razdoburdin Date: Thu, 30 Nov 2023 11:18:54 +0000 Subject: [PATCH] fix compilation error for test_gpu_predictor.cu --- tests/cpp/predictor/test_gpu_predictor.cu | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/cpp/predictor/test_gpu_predictor.cu b/tests/cpp/predictor/test_gpu_predictor.cu index c9c7290410c3..50e036b90794 100644 --- a/tests/cpp/predictor/test_gpu_predictor.cu +++ b/tests/cpp/predictor/test_gpu_predictor.cu @@ -294,7 +294,8 @@ TEST(GPUPredictor, CategoricalPredictLeaf) { } TEST_F(MGPUPredictorTest, CategoricalPredictionLeafColumnSplit) { - RunWithInMemoryCommunicator(world_size_, TestCategoricalPredictLeaf, true, true); + auto ctx = MakeCUDACtx(common::AllVisibleGPUs() == 1 ? 0 : collective::GetRank()); + RunWithInMemoryCommunicator(world_size_, TestCategoricalPredictLeaf, &ctx, true); } TEST(GPUPredictor, PredictLeafBasic) {