Revert "Enable back floating-point exceptions for SYCL build"
authorAndrey Alekseenko <al42and@gmail.com>
Mon, 28 Jun 2021 07:28:53 +0000 (10:28 +0300)
committerPaul Bauer <paul.bauer.q@gmail.com>
Tue, 29 Jun 2021 06:47:58 +0000 (06:47 +0000)
This reverts commit c502562354b1de48aa4e8e102a04d7586ce345e3.

Turns out, the FPEs are still occasionally triggered, at least for DG1.

api/legacy/include/gromacs/math/utilities.h
src/gromacs/math/utilities.cpp

index 19e7a45e437a1d68857a76a6244e67d759fdb0a0..a4c40e949677662777514c9324390953645e9ed3 100644 (file)
@@ -124,6 +124,8 @@ int gmx_fedisableexcept();
  *
  * Currently, it returns true unless any of the following conditions are met:
  * - release build,
+ * - SYCL build (Intel IGC, at least 1.0.5964, raises FP exceptions in JIT compilation),
+ * - - See https://github.com/intel/intel-graphics-compiler/issues/164
  * - compilers with known buggy FP exception support (clang with any optimization)
  *   or suspected buggy FP exception support (gcc 7.* with optimization).
  *
index 30e6a3d88f43f01c2b314507f90fcd83c33dde2f..14b7dd38aa52cad73c3050ab2f38534ba363c73a 100644 (file)
@@ -146,6 +146,8 @@ bool gmxShouldEnableFPExceptions()
     return false; // Release build
 #elif ((defined __clang__ || (defined(__GNUC__) && __GNUC__ == 7)) && defined __OPTIMIZE__)
     return false; // Buggy compiler
+#elif GMX_GPU_SYCL
+    return false; // avoid spurious FPE during SYCL JIT
 #else
     return true;
 #endif