From 4e15c6e35888da94cbd0f685e15a53e0b848bd1d Mon Sep 17 00:00:00 2001 From: fis Date: Fri, 16 Apr 2021 10:52:52 +0800 Subject: [PATCH] Fix. --- src/common/device_helpers.cuh | 4 ++-- src/metric/auc.cu | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/device_helpers.cuh b/src/common/device_helpers.cuh index ba1916e8c7bc..6693b2258658 100644 --- a/src/common/device_helpers.cuh +++ b/src/common/device_helpers.cuh @@ -1392,8 +1392,8 @@ void SegmentedArgSort(xgboost::common::Span values, TemporaryArray temp_storage(bytes); detail::DeviceSegmentedRadixSortPair( temp_storage.data().get(), bytes, values.data(), values_out.data().get(), - sorted_idx_out.data().get(), sorted_idx.data(), sorted_idx.size(), n_groups, - group_ptr.data(), group_ptr.data() + 1); + sorted_idx.data(), sorted_idx_out.data().get(), sorted_idx.size(), + n_groups, group_ptr.data(), group_ptr.data() + 1); safe_cuda(cudaMemcpyAsync(sorted_idx.data(), sorted_idx_out.data().get(), sorted_idx.size_bytes(), cudaMemcpyDeviceToDevice)); diff --git a/src/metric/auc.cu b/src/metric/auc.cu index 615dad5aef11..b4e187d9542a 100644 --- a/src/metric/auc.cu +++ b/src/metric/auc.cu @@ -269,7 +269,7 @@ float GPUMultiClassAUCOVR(common::Span predts, MetaInfo const &info }); // unique values are sparse, so we need a CSR style indptr - dh::TemporaryArray unique_class_ptr(class_ptr.size() + 1); + dh::TemporaryArray unique_class_ptr(class_ptr.size()); auto d_unique_class_ptr = dh::ToSpan(unique_class_ptr); auto n_uniques = dh::SegmentedUniqueByKey( thrust::cuda::par(alloc),