Skip to content

Commit

Permalink
missing device_index variable
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffdaily committed Sep 8, 2023
1 parent 3ad89f8 commit 7b8b6a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/objective/cuda/cuda_rank_objective.cu
Original file line number Diff line number Diff line change
Expand Up @@ -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<int>(label_gain_.size());

const int device_index = GetCUDADevice(__FILE__, __LINE__);
cudaDeviceProp device_prop;
CUDASUCCESS_OR_FATAL(cudaGetDeviceProperties(&device_prop, device_index));

Expand Down

0 comments on commit 7b8b6a0

Please sign in to comment.