1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
Author: XNNPACK Team <xnnpack-github-robot@google.com>
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<xnn_bfloat16, _Float16> {
+ explicit ConvertOp(const xnn_unary_uparams*) {}
+ _Float16 operator()(xnn_bfloat16 x) const {
+ return static_cast<_Float16>(static_cast<float>(x));
+ }
+};
+#endif
+
template <typename TIn, typename TOut>
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);
}
|