Vectorize fp16 tanh and logistic functions on Neon

Activates vectorization of the Eigen::half versions of the tanh and
logistic functions when they run on Neon. Both functions convert their
inputs to float before computing the output, and as a result of this
commit, the conversions and the computation in float are vectorized.
This commit is contained in:
Alex Druinsky
2021-10-26 12:24:33 -07:00
committed by Rasmus Munk Larsen
parent 185ad0e610
commit 6bb6a6bf53
4 changed files with 89 additions and 0 deletions

View File

@@ -263,6 +263,11 @@ using std::ptrdiff_t;
#include "src/Core/arch/GPU/Complex.h"
#endif
// Specializations of vectorized activation functions for NEON.
#ifdef EIGEN_VECTORIZE_NEON
#include "src/Core/arch/NEON/UnaryFunctors.h"
#endif
#include "src/Core/util/IndexedViewHelper.h"
#include "src/Core/util/ReshapedHelper.h"
#include "src/Core/ArithmeticSequence.h"