From 22337bb64132a049388cc586f0fccd19266ef3fe Mon Sep 17 00:00:00 2001 From: Tracy Sharpe <42477615+tracysh@users.noreply.github.com> Date: Fri, 18 Jan 2019 16:11:53 -0800 Subject: [PATCH] fix linaro build (#355) --- onnxruntime/core/mlas/lib/activate.cpp | 9 ++++++--- onnxruntime/core/mlas/lib/mlasi.h | 9 --------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/onnxruntime/core/mlas/lib/activate.cpp b/onnxruntime/core/mlas/lib/activate.cpp index 91c76a210f..eea0b74327 100644 --- a/onnxruntime/core/mlas/lib/activate.cpp +++ b/onnxruntime/core/mlas/lib/activate.cpp @@ -113,9 +113,7 @@ struct MLAS_ACTIVATION_FUNCTION template<> struct MLAS_ACTIVATION_FUNCTION { -#if defined(MLAS_SSE2_INTRINSICS) const MLAS_FLOAT32X4 ZeroFloat32x4 = MlasZeroFloat32x4(); -#endif MLAS_FLOAT32X4 AlphaBroadcast; @@ -129,7 +127,12 @@ struct MLAS_ACTIVATION_FUNCTION MLAS_FLOAT32X4 ValueTimesAlpha = MlasMultiplyFloat32x4(Value, AlphaBroadcast); #if defined(MLAS_NEON_INTRINSICS) - return vbslq_f32(vclezq_f32(Value), ValueTimesAlpha, Value); +#if defined(_WIN32) + return vbslq_f32(vcleq_z_f32_ex(Value), ValueTimesAlpha, Value); +#else + // N.B. Standard NEON headers lack an intrinsic for the "vcle #0" form. + return vbslq_f32(vcleq_f32(Value, ZeroFloat32x4), ValueTimesAlpha, Value); +#endif #elif defined(MLAS_AVX_INTRINSICS) return _mm_blendv_ps(ValueTimesAlpha, Value, _mm_cmple_ps(ZeroFloat32x4, Value)); #elif defined(MLAS_SSE2_INTRINSICS) diff --git a/onnxruntime/core/mlas/lib/mlasi.h b/onnxruntime/core/mlas/lib/mlasi.h index bbdbe56637..facbcdcd8f 100644 --- a/onnxruntime/core/mlas/lib/mlasi.h +++ b/onnxruntime/core/mlas/lib/mlasi.h @@ -327,15 +327,6 @@ MlasExecuteThreaded( #endif #endif -#if defined(_M_ARM) || defined(_M_ARM64) || defined(_M_HYBRID_X86_ARM64) -#ifndef vcgezq_f32 -#define vcgezq_f32(src) vcgeq_z_f32_ex(src) -#endif -#ifndef vclezq_f32 -#define vclezq_f32(src) vcleq_z_f32_ex(src) -#endif -#endif - // // Cross-platform wrappers for vector intrinsics. //