Allow OCL CL_SIZE to be set to 4 for Intel
authorRoland Schulz <roland.schulz@intel.com>
Thu, 29 Mar 2018 01:55:52 +0000 (18:55 -0700)
committerRoland Schulz <roland.schulz@intel.com>
Tue, 15 May 2018 16:25:09 +0000 (09:25 -0700)
commita168d2e692fa1228998e222076de8f47956569b3
treec7b9ae92d89e6990138baa9d61470c04b1e3a649
parent2f839a8152d7c152f35e254bfce262b2bbc4c033
Allow OCL CL_SIZE to be set to 4 for Intel

Add GMX_OCL_CLUSTER_SIZE which can be set to 4 for e.g. Intel.
The kernel should now work on any HW with at least
CL_SIZE*CL_SIZE/2 wide sub-groups (warp-sync execution).
This is 8(/32) for CL_SIZE 4(/8). Not tested for CL_SIZE other
than 4 or 8.

Fixes:
- make_fep_list_supersub was incorrect for CL_SIZE!=8.
- reduce_force_i_pow2 was incorrect for CL_SIZE<8 and 2 warps.
- i-atom preload, nbnxn_excl_t, warp-any init for CL_SIZE!=8.
- gpu_ref for CL_SIZE!=8.

Change-Id: I1114e408d28b9eb6306722c41fd6a6ccec52211b
cmake/gmxManageOpenCL.cmake
src/config.h.cmakein
src/gromacs/gpu_utils/ocl_compiler.cpp
src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_gpu_ref.cpp
src/gromacs/mdlib/nbnxn_ocl/nbnxn_ocl_kernel.clh
src/gromacs/mdlib/nbnxn_ocl/nbnxn_ocl_kernel_pruneonly.clh
src/gromacs/mdlib/nbnxn_ocl/nbnxn_ocl_kernel_utils.clh
src/gromacs/mdlib/nbnxn_pairlist.h
src/gromacs/mdlib/nbnxn_search.cpp