if(GMX_GPU_OPENCL)
add_subdirectory(opencl)
set(NBNXM_OPENCL_KERNELS ${NBNXM_OPENCL_KERNELS} PARENT_SCOPE)
- gmx_add_libgromacs_sources(nbnxm_gpu_data_mgmt.cpp nbnxm_gpu_buffer_ops_stubs.cpp)
+ gmx_add_libgromacs_sources(nbnxm_gpu_data_mgmt.cpp nbnxm_gpu_buffer_ops.cpp)
endif()
if(GMX_GPU_SYCL)
#include "gromacs/gpu_utils/device_stream.h"
#if GMX_GPU_CUDA
# include "gromacs/gpu_utils/gpueventsynchronizer.cuh"
+#elif GMX_GPU_OPENCL
+# include "gromacs/gpu_utils/gpueventsynchronizer_ocl.h"
#elif GMX_GPU_SYCL
# include "gromacs/gpu_utils/gpueventsynchronizer_sycl.h"
#endif
#include "gromacs/nbnxm/nbnxm_gpu_buffer_ops_internal.h"
#if GMX_GPU_CUDA
# include "gromacs/nbnxm/cuda/nbnxm_cuda_types.h"
+#elif GMX_GPU_OPENCL
+# include "gromacs/nbnxm/opencl/nbnxm_ocl_types.h"
#elif GMX_GPU_SYCL
# include "gromacs/nbnxm/sycl/nbnxm_sycl_types.h"
#endif
int numColumnsMax,
bool mustInsertNonLocalDependency)
{
- static_assert((bool)GMX_GPU_CUDA || (bool)GMX_GPU_SYCL,
- "nbnxn_gpu_x_to_nbat_x only supported with CUDA and SYCL");
+ GMX_ASSERT((bool)GMX_GPU_CUDA || (bool)GMX_GPU_SYCL,
+ "NBNXM X buffer operations only supported in CUDA and SYCL");
GMX_ASSERT(nb, "Need a valid nbnxn_gpu object");
gmx::InteractionLocality interactionLoc = gmx::atomToInteractionLocality(locality);
*/
/*! \internal \file
- * \brief
- * Common code for GPU buffer operations, namely the coordinate layout conversion
+ * \brief Define OpenCL implementation for transforming position coordinates from rvec to nbnxm layout.
*
* \ingroup module_nbnxm
*/
#include "config.h"
+#include "gromacs/gpu_utils/devicebuffer_datatype.h"
+#include "gromacs/gpu_utils/device_stream.h"
#include "gromacs/nbnxm/nbnxm_gpu.h"
-
-#if !GMX_GPU_CUDA
+#include "gromacs/nbnxm/nbnxm_gpu_buffer_ops_internal.h"
namespace Nbnxm
{
-void nbnxn_gpu_x_to_nbat_x(const Nbnxm::Grid& /*grid*/,
- NbnxmGpu* /*nb*/,
- DeviceBuffer<gmx::RVec> /*d_x*/,
- GpuEventSynchronizer* /*xReadyOnDevice*/,
- const gmx::AtomLocality /*locality*/,
- int /*gridId*/,
- int /*numColumnsMax*/,
- bool /*mustInsertNonLocalDependency*/)
+void launchNbnxmKernelTransformXToXq(const Grid& /* grid */,
+ NbnxmGpu* /* nb */,
+ DeviceBuffer<Float3> /* d_x */,
+ const DeviceStream& /* deviceStream */,
+ unsigned int /* numColumnsMax */,
+ int /* gridId */)
{
- GMX_RELEASE_ASSERT(false, "nbnxn_gpu_x_to_nbat_x only supported with CUDA");
+ GMX_RELEASE_ASSERT(false, "NBNXM buffer ops are not supported with OpenCL");
}
} // namespace Nbnxm
-
-#endif // !GMX_GPU_CUDA