From: Mark Abraham Date: Fri, 13 Aug 2021 08:06:18 +0000 (+0000) Subject: Provide better defaults for GMX_GPU_NB_CLUSTER_SIZE with SYCL X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=1dc014e6b18bcb5528e7872c47661ee364fe84aa;p=alexxy%2Fgromacs.git Provide better defaults for GMX_GPU_NB_CLUSTER_SIZE with SYCL Now that we know whether a SYCL configuration targets hipSYCL and if so for which hardware, we can provide a default non-bonded cluster size that works well in all SYCL cases. Refs #3965 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 344ac3428f..eb9fd66f44 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -579,8 +579,13 @@ if(GMX_GPU) # default cluster size is 8 with OpenCL and 4 with SYCL for now if(${_gmx_gpu_uppercase} STREQUAL "OPENCL") set(_gmx_gpu_nb_cluster_size_value 8) - else() - set(_gmx_gpu_nb_cluster_size_value 4) + elseif(GMX_GPU_SYCL) + if (GMX_SYCL_HIPSYCL AND NOT GMX_HIPSYCL_HAVE_LEVELZERO_TARGET) + set(_gmx_gpu_nb_cluster_size_value 8) + else() + # Either DPCPP or hipSYCL targeting Intel Level0 + set(_gmx_gpu_nb_cluster_size_value 4) + endif() endif() endif() set(GMX_GPU_NB_CLUSTER_SIZE ${_gmx_gpu_nb_cluster_size_value} CACHE STRING "Cluster size used by the nonbonded kernel. Set to 4 for Intel GPUs.") diff --git a/src/gromacs/nbnxm/pairlistparams.h b/src/gromacs/nbnxm/pairlistparams.h index a204a3eeda..e1df6bbfbd 100644 --- a/src/gromacs/nbnxm/pairlistparams.h +++ b/src/gromacs/nbnxm/pairlistparams.h @@ -59,7 +59,7 @@ enum class KernelType; //! The i-cluster size for CPU kernels, always 4 atoms static constexpr int c_nbnxnCpuIClusterSize = 4; -//! The i- and j-cluster size for GPU lists, 8 atoms for CUDA, set at compile time for OpenCL and SYCL +//! The i- and j-cluster size for GPU lists, 8 atoms for CUDA, set at configure time for OpenCL and SYCL #if GMX_GPU_OPENCL || GMX_GPU_SYCL static constexpr int c_nbnxnGpuClusterSize = GMX_GPU_NB_CLUSTER_SIZE; #else