fix CMakeLists.txt

This commit is contained in:
amdsc21 2023-03-09 18:57:14 +01:00
parent 00c24a58b1
commit 6eba0a56ec
2 changed files with 2 additions and 0 deletions

View File

@ -198,6 +198,7 @@ if (USE_HIP)
set(CMAKE_HIP_FLAGS "${CMAKE_HIP_FLAGS} -I${HIP_INCLUDE_DIRS} -I${HIP_INCLUDE_DIRS}/hip")
set(CMAKE_HIP_FLAGS "${CMAKE_HIP_FLAGS} -Wunused-result")
set(CMAKE_HIP_FLAGS "${CMAKE_HIP_FLAGS} -D__HIP_PLATFORM_AMD__")
add_subdirectory(${PROJECT_SOURCE_DIR}/rocgputreeshap)
set(BUILD_WITH_HIP_CUB ON)

View File

@ -97,6 +97,7 @@ PackedReduceResult Reduce(Context const* ctx, MetaInfo const& info, Fn&& loss) {
dh::XGBCachingDeviceAllocator<char> alloc;
thrust::counting_iterator<size_t> begin(0);
thrust::counting_iterator<size_t> end = begin + labels.Size();
result = thrust::transform_reduce(
thrust::hip::par(alloc), begin, end,
[=] XGBOOST_DEVICE(size_t i) {