Merge branch release-2018
[alexxy/gromacs.git] / src / gromacs / gpu_utils / gpu_utils.cu
index 13cdae8d19863f7f8ac4c29fcf46739f727df8b9..d464bde726acd56cad8d1d9a12041fe268c21c7a 100644 (file)
@@ -137,7 +137,7 @@ static void checkCompiledTargetCompatibility(const gmx_device_info_t *devInfo)
     }
 }
 
-bool isHostMemoryPinned(void *h_ptr)
+bool isHostMemoryPinned(const void *h_ptr)
 {
     cudaPointerAttributes memoryAttributes;
     cudaError_t           stat = cudaPointerGetAttributes(&memoryAttributes, h_ptr);
@@ -254,7 +254,10 @@ static int do_sanity_checks(int dev_id, cudaDeviceProp *dev_prop)
     }
 
     /* try to execute a dummy kernel */
-    k_dummy_test<<< 1, 512>>> ();
+    KernelLaunchConfig config;
+    config.blockSize[0] = 512;
+    const auto         dummyArguments = prepareGpuKernelArguments(k_dummy_test, config);
+    launchGpuKernel(k_dummy_test, config, nullptr, "Dummy kernel", dummyArguments);
     if (cudaThreadSynchronize() != cudaSuccess)
     {
         return -1;