From 7b8b6a0e59e20c6e6ae13fff7e63106a664a6d4c Mon Sep 17 00:00:00 2001 From: Jeff Daily Date: Fri, 8 Sep 2023 18:26:32 +0000 Subject: [PATCH] missing device_index variable --- src/objective/cuda/cuda_rank_objective.cu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/objective/cuda/cuda_rank_objective.cu b/src/objective/cuda/cuda_rank_objective.cu index b6323ef5e708..5bdc0577e367 100644 --- a/src/objective/cuda/cuda_rank_objective.cu +++ b/src/objective/cuda/cuda_rank_objective.cu @@ -308,7 +308,7 @@ __global__ void GetGradientsKernel_LambdarankNDCG_Sorted( void CUDALambdarankNDCG::LaunchGetGradientsKernel(const double* score, score_t* gradients, score_t* hessians) const { const int num_blocks = (num_queries_ + NUM_QUERY_PER_BLOCK - 1) / NUM_QUERY_PER_BLOCK; const data_size_t num_rank_label = static_cast(label_gain_.size()); - + const int device_index = GetCUDADevice(__FILE__, __LINE__); cudaDeviceProp device_prop; CUDASUCCESS_OR_FATAL(cudaGetDeviceProperties(&device_prop, device_index));