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
# 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.")
//! 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