#include "config.h"
-/* Some versions of Intel ICPX compiler (at least 2021.1.1 and 2021.1.2) fail to unroll a loop
- * in sycl::accessor::__init, and emit -Wpass-failed=transform-warning. This is a useful
- * warning, but mostly noise right now. Probably related to using shared memory accessors.
- * The unroll directive was introduced in https://github.com/intel/llvm/pull/2449. */
-#if GMX_SYCL_DPCPP
-# include <CL/sycl/version.hpp>
-# define DISABLE_UNROLL_WARNINGS \
- ((__SYCL_COMPILER_VERSION >= 20201113) && (__SYCL_COMPILER_VERSION <= 20201214))
-#else
-# define DISABLE_UNROLL_WARNINGS 0
-#endif
-
-#if DISABLE_UNROLL_WARNINGS
-# pragma clang diagnostic push
-# pragma clang diagnostic ignored "-Wpass-failed"
-#endif
-
// For hipSYCL, we need to activate floating-point atomics
#if GMX_SYCL_HIPSYCL
# define HIPSYCL_EXT_FP_ATOMICS
# include <CL/sycl.hpp>
#endif
-#if DISABLE_UNROLL_WARNINGS
-# pragma clang diagnostic pop
-#endif
-
#if GMX_SYCL_HIPSYCL
# pragma clang diagnostic pop
#endif
-#undef DISABLE_UNROLL_WARNINGS
-
/* Exposing Intel-specific extensions in a manner compatible with SYCL2020 provisional spec.
- * Despite ICPX (up to 2021.1.2 at the least) having SYCL_LANGUAGE_VERSION=202001,
- * some parts of the spec are still in custom sycl::ONEAPI namespace (sycl::intel in beta versions),
+ * Despite ICPX (up to 2021.3.0 at the least) having SYCL_LANGUAGE_VERSION=202001,
+ * some parts of the spec are still in custom sycl::ONEAPI namespace (sycl::ext::oneapi in beta versions),
* and some functions have different names. To make things easier to upgrade
* in the future, this thin layer is added.
* */
namespace detail
{
#if GMX_SYCL_DPCPP
-// Confirmed to work for 2021.1-beta10 (20201005), 2021.1.1 (20201113), 2021.1.2 (20201214).
+// Confirmed to work for 2021.1-beta10 (20201005) to 2021.3.0 (20210619).
+// Deprecated in favor of sycl::ext::oneapi on 20210717 in https://github.com/intel/llvm/commit/d703f578.
+// Removed on 20210927 with https://github.com/intel/llvm/pull/4488
+# if __clang_major__ >= 14
+namespace origin = sycl::ext::oneapi;
+# else
namespace origin = cl::sycl::ONEAPI;
+# endif
#elif GMX_SYCL_HIPSYCL
namespace origin = cl::sycl;
#else
return detail::origin::reduce(std::forward<Args>(args)...);
}
#elif GMX_SYCL_HIPSYCL
-// No atomic_ref in hipSYCL yet (2021-02-22)
+using detail::origin::atomic_ref;
using detail::origin::group_any_of;
using detail::origin::group_reduce;
#else