Skip to content
Snippets Groups Projects
Commit 1ffccf2d authored by Sam Yates's avatar Sam Yates Committed by Benjamin Cumming
Browse files

Clarify vectorization-enabled build errors. (#588)

Fixes #587.

* Eliminate Clang warnings from GCC-tree-optimization bug work-around.
* Error with static-assert if simd type is used with a missing simd abi.
* Clarify install documentation regarding use of ARB_VECTORIZE with ARB_ARCH.
parent f8da6eaf
No related branches found
No related tags found
No related merge requests found
...@@ -287,16 +287,17 @@ Vectorization ...@@ -287,16 +287,17 @@ Vectorization
------------- -------------
Explicit vectorization of computational kernels can be enabled in Arbor by setting the Explicit vectorization of computational kernels can be enabled in Arbor by setting the
``ARB_VECTORIZE`` CMake flag: ``ARB_VECTORIZE`` CMake flag. This option is typically used in conjunction with the
``ARB_ARCH`` option to specify the target architecture: without SIMD support in Arbor
for the architecture, enabling ``ARB_VECTORIZE`` will lead to a compilation error.
.. code-block:: bash .. code-block:: bash
cmake -DARB_VECTORIZE=ON cmake -DARB_VECTORIZE=ON -DARB_ARCH=native
With this flag set, the library will use architecture-specific vectorization intrinsics With this flag set, the library will use architecture-specific vectorization intrinsics
to implement these kernels. Arbor currently has vectorization support for x86 architectures to implement these kernels. Arbor currently has vectorization support for x86 architectures
with AVX, AVX2 or AVX512 ISA extensions. Enabling the `ARB_VECTORIZE` option for a target with AVX, AVX2 or AVX512 ISA extensions.
without support in Arbor will give a compilation error.
.. _gpu: .. _gpu:
......
...@@ -56,6 +56,8 @@ namespace simd_detail { ...@@ -56,6 +56,8 @@ namespace simd_detail {
template <typename Impl> template <typename Impl>
struct simd_impl { struct simd_impl {
static_assert(!std::is_void<Impl>::value, "no such SIMD ABI supported");
// Type aliases: // Type aliases:
// //
// scalar_type internal value type in one simd lane, // scalar_type internal value type in one simd lane,
......
...@@ -42,7 +42,7 @@ inline void compiler_barrier_if_icc_leq(unsigned ver) { ...@@ -42,7 +42,7 @@ inline void compiler_barrier_if_icc_leq(unsigned ver) {
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85597 // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85597
template <typename T> template <typename T>
#if defined(__GNUC__) &&\ #if !defined(__clang__) && defined(__GNUC__) &&\
( __GNUC__<6 ||\ ( __GNUC__<6 ||\
(__GNUC__==6 && __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 401) ||\ (__GNUC__==6 && __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 401) ||\
(__GNUC__==7 && __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 301) ||\ (__GNUC__==7 && __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 301) ||\
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment