Disable CUDA textures on NVIDIA Volta
authorSzilárd Páll <pall.szilard@gmail.com>
Tue, 19 Jan 2021 12:09:15 +0000 (12:09 +0000)
committerPaul Bauer <paul.bauer.q@gmail.com>
Tue, 19 Jan 2021 12:09:15 +0000 (12:09 +0000)
This has significant performance benefit for the nbnxm kernels with
tabulated Ewald correction and it has negligible impact on the PME kernels.

Partially addresses #3845

src/gromacs/gpu_utils/cuda_arch_utils.cuh

index 86b50cf3c6539b955f30269718726c317e745088..f3484d5d569a64b75909dabf8c9be7cf1767c19a 100644 (file)
@@ -2,7 +2,7 @@
  * This file is part of the GROMACS molecular simulation package.
  *
  * Copyright (c) 2012,2014,2015,2016,2017 by the GROMACS development team.
- * Copyright (c) 2018,2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2018,2019,2020,2021, 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.
@@ -69,12 +69,14 @@ static const unsigned int c_fullWarpMask = 0xffffffff;
  *
  *  Only texture objects supported.
  *  Disable texture support missing in clang (all versions up to <=5.0-dev as of writing).
+ *  Disable texture support on CC 7.0 for performance reasons (Issue #3845).
  *
  *  This option will not influence functionality. All features using textures ought
  *  to have fallback for texture-less reads (direct/LDG loads), all new code needs
  *  to provide fallback code.
  */
-#if defined(GMX_DISABLE_CUDA_TEXTURES) || (defined(__clang__) && defined(__CUDA__))
+#if defined(GMX_DISABLE_CUDA_TEXTURES) || (defined(__clang__) && defined(__CUDA__)) \
+        || (GMX_PTX_ARCH == 700)
 #    define DISABLE_CUDA_TEXTURES 1
 #else
 #    define DISABLE_CUDA_TEXTURES 0