disable Optin Shared Mem

This commit is contained in:
amdsc21 2023-03-15 02:10:16 +01:00
parent 8207015e48
commit 4484c7f073
2 changed files with 3 additions and 1 deletions

View File

@ -173,9 +173,11 @@ inline size_t MaxSharedMemory(int device_idx) {
inline size_t MaxSharedMemoryOptin(int device_idx) {
int max_shared_memory = 0;
#if 0 /* CUDA Only */
dh::safe_cuda(hipDeviceGetAttribute
(&max_shared_memory, hipDeviceAttributeSharedMemPerBlockOptin,
device_idx));
#endif
return static_cast<std::size_t>(max_shared_memory);
}

View File

@ -294,7 +294,7 @@ void BuildGradientHistogram(CUDAContext const* ctx, EllpackDeviceAccessor const&
#if defined(XGBOOST_USE_CUDA)
dh::safe_cuda(cudaFuncSetAttribute(kernel, cudaFuncAttributeMaxDynamicSharedMemorySize,
max_shared_memory));
#elif defined(XGBOOST_USE_HIP)
#elif defined(XGBOOST_USE_HIP) && 0 /* CUDA Only */
dh::safe_cuda(hipFuncSetAttribute((const void *)kernel, hipFuncAttributeMaxDynamicSharedMemorySize,
max_shared_memory));
#endif