Check CUDA available/compiled code compatibility
commit29ba77b8483f803766806b4f6987aeeef00747e5
authorSzilárd Páll <pall.szilard@gmail.com>
Mon, 16 Oct 2017 15:40:23 +0000 (16 17:40 +0200)
committerMark Abraham <mark.j.abraham@gmail.com>
Tue, 31 Oct 2017 19:19:09 +0000 (31 20:19 +0100)
tree824d8991aef232f4774198026e575094146bdad6
parent48620e5ef3e62b43ed618e9ceb1f49d4bf41913b
Check CUDA available/compiled code compatibility

Added an early check to detect when the gmx binary does not embed code
compatible with the GPU device it tries to use nor does it have PTX that
could have been JIT-ed.

Additionally, if the user manually sets GMX_CUDA_TARGET_COMPUTE=20 and
no later SM or COMPUTE but runs on >2.0 hardware, we'd be executing
JIT-ed Fermi kernels with incorrect host-side code assumptions
(e.g amount of shared memory allocated or texture type).
This change also prevents such cases.

Fixes #2273

Change-Id: I5472b1a33e584a75f451e21e9fd25992633fbea9
src/gromacs/gpu_utils/gpu_utils.cu