add max shared mem workaround

This commit is contained in:
amdsc21 2023-03-19 20:08:42 +01:00
parent 0325ce0bed
commit 595cd81251

View File

@ -278,7 +278,11 @@ void BuildGradientHistogram(CUDAContext const* ctx, EllpackDeviceAccessor const&
#endif #endif
// opt into maximum shared memory for the kernel if necessary // opt into maximum shared memory for the kernel if necessary
#if defined(XGBOOST_USE_CUDA)
size_t max_shared_memory = dh::MaxSharedMemoryOptin(device); size_t max_shared_memory = dh::MaxSharedMemoryOptin(device);
#elif defined(XGBOOST_USE_HIP)
size_t max_shared_memory = dh::MaxSharedMemory(device);
#endif
size_t smem_size = size_t smem_size =
sizeof(GradientPairInt64) * feature_groups.max_group_bins; sizeof(GradientPairInt64) * feature_groups.max_group_bins;