Only define GMX_SYCL_DPCPP macro in SYLC builds
authorSzilárd Páll <pall.szilard@gmail.com>
Fri, 30 Jul 2021 15:38:56 +0000 (17:38 +0200)
committerSzilárd Páll <pall.szilard@gmail.com>
Fri, 30 Jul 2021 15:46:58 +0000 (17:46 +0200)
Previously the macro could get defined not only when the build was not a
hipSYCL build, but also when the build was not a SYCL build at all.

src/config.h.cmakein

index 1554d4aa853469d605cdc399025eef5f550248c4..bcd5a4dfe2064ccc755f00d65747b4cf1f340610 100644 (file)
 #cmakedefine01 GMX_SYCL_HIPSYCL
 
 /* Define if Intel's DPCPP is used (default unless hipSYCL is chosen) */
-#define GMX_SYCL_DPCPP (!GMX_SYCL_HIPSYCL)
+#define GMX_SYCL_DPCPP (!GMX_SYCL_HIPSYCL && GMX_GPU_SYCL)
 
 /* Use a single compilation unit when compiling the CUDA (non-bonded) kernels.  */
 #cmakedefine01 GMX_CUDA_NB_SINGLE_COMPILATION_UNIT