Pairwise ranking objective implementation on gpu (#4873)

* - pairwise ranking objective implementation on gpu
   - there are couple of more algorithms (ndcg and map) for which support will be added
     as follow-up pr's
   - with no label groups defined, get gradient is 90x faster on gpu (120m instance
     mortgage dataset)
   - it can perform by an order of magnitude faster with ~ 10 groups (and adequate cores
     for the cpu implementation)

* Add JSON config to rank obj.
This commit is contained in:
sriramch
2019-10-22 20:40:07 -07:00
committed by Jiaming Yuan
parent 5620322a48
commit 310fe60b35
8 changed files with 776 additions and 412 deletions

View File

@@ -421,7 +421,7 @@ __global__ void SharedMemHistKernel(xgboost::ELLPackMatrix matrix,
// global memory
GradientSumT* atomic_add_ptr =
use_shared_memory_histograms ? smem_arr : d_node_hist;
AtomicAddGpair(atomic_add_ptr + gidx, d_gpair[ridx]);
dh::AtomicAddGpair(atomic_add_ptr + gidx, d_gpair[ridx]);
}
}
@@ -430,7 +430,7 @@ __global__ void SharedMemHistKernel(xgboost::ELLPackMatrix matrix,
__syncthreads();
for (auto i :
dh::BlockStrideRange(static_cast<size_t>(0), matrix.BinCount())) {
AtomicAddGpair(d_node_hist + i, smem_arr[i]);
dh::AtomicAddGpair(d_node_hist + i, smem_arr[i]);
}
}
}