Allow bypassing OpenCL device compatibility check
authorSzilárd Páll <pall.szilard@gmail.com>
Wed, 3 Aug 2016 19:29:33 +0000 (21:29 +0200)
committerSzilárd Páll <pall.szilard@gmail.com>
Fri, 17 Mar 2017 16:33:23 +0000 (17:33 +0100)
An environment variable added to allow testing on platforms
(e.g. Intel iGPU) without source modification.

Change-Id: I1daef54509427475267e3e6b1a8fcbe4ed529b48

docs/user-guide/environment-variables.rst
src/gromacs/gpu_utils/gpu_utils_ocl.cpp

index 15e1be8166af7ecea0553aa9b5d498018ea35519..86ce9dd2658f6aa9a5b72fb63e5ad3ca3626d990 100644 (file)
@@ -454,6 +454,11 @@ compilation of OpenCL kernels, but they are also used in device selection.
         override |Gromacs| default behavior, or if you want to test
         your own kernels.
 
+``GMX_OCL_DISABLE_COMPATIBILITY_CHECK``
+        Disables the hardware compatibility check. Useful for developers
+        and allows testing the OpenCL kernels on non-supported platforms
+        (like Intel iGPUs) without source code modification.
+
 Analysis and Core Functions
 ---------------------------
 ``GMX_QM_ACCURACY``
index 4d4d6d6d2390317bcd2899233470b6ae4c9e10bd..37ee78430a3e411c7754ff93230abefad32c9cb3 100644 (file)
@@ -114,6 +114,11 @@ runningOnCompatibleOSForAmd()
  */
 static int is_gmx_supported_gpu_id(struct gmx_device_info_t *ocl_gpu_device)
 {
+    if ((getenv("GMX_OCL_DISABLE_COMPATIBILITY_CHECK")) != NULL)
+    {
+        return egpuCompatible;
+    }
+
     /* Only AMD and NVIDIA GPUs are supported for now */
     switch (ocl_gpu_device->vendor_e)
     {