files needed for :ref:`gmx trjconv` to split up trajectories into frames corresponding
to the clusters were not written. This adds support for writing this :ref:`index <ndx>` file
as well as proper :ref:`PDB <pdb>` files.
+
+Intel integrated GPUs are now supported for GPU offload with OpenCL
+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+On Intel CPUs with integrated GPUs, it is now possible to offload nonbonded tasks
+to the GPU the same way as offload is done to other GPU architectures.
+This can have performance benefits, in particular on modern desktop and mobile
+Intel CPUs this offload can give up to 20% higher simulation performance.
Running the OpenCL version of mdrun
-----------------------------------
-The current version works with GCN-based AMD GPUs, and NVIDIA CUDA
-GPUs. Make sure that you have the latest drivers installed. For AMD GPUs,
+Currently supported hardware architectures are:
+- GCN-based AMD GPUs;
+- NVIDIA GPUs (with at least OpenCL 1.2 support);
+- Intel iGPUs.
+Make sure that you have the latest drivers installed. For AMD GPUs,
the compute-oriented `ROCm <https://rocm.github.io/>`_ stack is recommended;
alternatively, the AMDGPU-PRO stack is also compatible; using the outdated
and unsupported `fglrx` proprietary driver and runtime is not recommended (but
For NVIDIA GPUs, using the proprietary driver is
required as the open source nouveau driver (available in Mesa) does not
provide the OpenCL support.
+TODO: add Intel driver recommendations
The minimum OpenCL version required is |REQUIRED_OPENCL_MIN_VERSION|. See
also the :ref:`known limitations <opencl-known-limitations>`.
gmx_device_info_t *dinfo = &gpu_info.gpu_dev[index];
- bool bGpuExists =
- dinfo->stat == egpuCompatible ||
- dinfo->stat == egpuIncompatible;
+ bool bGpuExists = (dinfo->stat != egpuNonexistent &&
+ dinfo->stat != egpuInsane);
if (!bGpuExists)
{
#include "gmxpre.h"
+#include "config.h"
+
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
return egpuCompatible;
}
- /* Only AMD and NVIDIA GPUs are supported for now */
+ /* Only AMD, Intel, and NVIDIA GPUs are supported for now */
switch (ocl_gpu_device->vendor_e)
{
case OCL_VENDOR_NVIDIA:
return egpuCompatible;
case OCL_VENDOR_AMD:
return runningOnCompatibleOSForAmd() ? egpuCompatible : egpuIncompatible;
+ case OCL_VENDOR_INTEL:
+ return GMX_OCL_NB_CLUSTER_SIZE == 4 ? egpuCompatible : egpuIncompatibleClusterSize;
default:
return egpuIncompatible;
}
return;
}
- gmx_device_info_t *dinfo = &gpu_info.gpu_dev[index];
+ gmx_device_info_t *dinfo = &gpu_info.gpu_dev[index];
- bool bGpuExists =
- dinfo->stat == egpuCompatible ||
- dinfo->stat == egpuIncompatible;
+ bool bGpuExists = (dinfo->stat != egpuNonexistent &&
+ dinfo->stat != egpuInsane);
if (!bGpuExists)
{
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2017, by the GROMACS development team, led by
+ * Copyright (c) 2017,2018, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
/* Names of the GPU detection/check results (see e_gpu_detect_res_t in hw_info.h). */
const char * const gpu_detect_res_str[egpuNR] =
{
- "compatible", "nonexistent", "incompatible", "insane"
+ "compatible", "nonexistent", "incompatible", "incompatible (please recompile with GMX_OCL_NB_CLUSTER_SIZE=4)", "insane"
};
* incompatible driver/runtime. */
typedef enum
{
- egpuCompatible = 0, egpuNonexistent, egpuIncompatible, egpuInsane, egpuNR
+ egpuCompatible = 0, egpuNonexistent, egpuIncompatible, egpuIncompatibleClusterSize, egpuInsane, egpuNR
} e_gpu_detect_res_t;
/* Names of the GPU detection/check results */
nbnxn_ocl_init_const(nb, ic, listParams, nbat);
- /* Enable LJ param manual prefetch for AMD or if we request through env. var.
+ /* Enable LJ param manual prefetch for AMD or Intel or if we request through env. var.
* TODO: decide about NVIDIA
*/
nb->bPrefetchLjParam =
(getenv("GMX_OCL_DISABLE_I_PREFETCH") == nullptr) &&
- ((nb->dev_info->vendor_e == OCL_VENDOR_AMD) || (getenv("GMX_OCL_ENABLE_I_PREFETCH") != nullptr));
+ ((nb->dev_info->vendor_e == OCL_VENDOR_AMD) || (nb->dev_info->vendor_e == OCL_VENDOR_INTEL)
+ || (getenv("GMX_OCL_ENABLE_I_PREFETCH") != nullptr));
/* NOTE: in CUDA we pick L1 cache configuration for the nbnxn kernels here,
* but sadly this is not supported in OpenCL (yet?). Consider adding it if