Author: XNNPACK Team Date: Mon, 25 Nov 2024 13:00:56 -0800 Description: Fix FTBFS with GCC 13 on aarch64 Forwarded: https://github.com/google/XNNPACK/issues/7489 Applied-Upstream: https://github.com/google/XNNPACK/commit/5f23827e66cca435fa400b6e221892ac95af0079 --- --- a/src/reference/unary-elementwise.cc +++ b/src/reference/unary-elementwise.cc @@ -127,6 +127,16 @@ } }; +#ifdef XNN_HAVE_FLOAT16 +template <> +struct ConvertOp { + explicit ConvertOp(const xnn_unary_uparams*) {} + _Float16 operator()(xnn_bfloat16 x) const { + return static_cast<_Float16>(static_cast(x)); + } +}; +#endif + template const xnn_unary_elementwise_config* get_convert_config( std::true_type /*input_quantized*/, std::true_type /*output_quantized*/) { --- a/src/xnnpack/simd/s16-neon.h +++ b/src/xnnpack/simd/s16-neon.h @@ -70,7 +70,7 @@ v_low = vget_high_s16(v); } if (num_elements & 2) { - vst1_lane_s32((void*) output, vreinterpret_s32_s16(v_low), 0); + vst1_lane_s32((int32_t*) output, vreinterpret_s32_s16(v_low), 0); output += 2; v_low = vext_s16(v_low, v_low, 2); }