From 6fb5a34360cf66512cc4141b41b853e24091cede Mon Sep 17 00:00:00 2001 From: Megvii Engine Team Date: Wed, 16 Mar 2022 18:52:33 +0800 Subject: [PATCH] build(flatbuffer/cx2): fix cx2 build and fix uclibc build flatbuffer GitOrigin-RevId: af851e155f131e88b400add1879077cf82259d16 --- dnn/src/arm_common/conv_bias/int8/strategy_2x3_8x8.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dnn/src/arm_common/conv_bias/int8/strategy_2x3_8x8.cpp b/dnn/src/arm_common/conv_bias/int8/strategy_2x3_8x8.cpp index e36c130e..d9e0a2a2 100644 --- a/dnn/src/arm_common/conv_bias/int8/strategy_2x3_8x8.cpp +++ b/dnn/src/arm_common/conv_bias/int8/strategy_2x3_8x8.cpp @@ -59,6 +59,13 @@ void transpose_8x4(const int16_t* src, int16_t* dst, int lda, int ldb) { vst1_s16(dst + 7 * ldb, c3.val[1]); } +#if defined(__GNUC__) && !defined(__llvm__) && !defined(_MSC_VER) +#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) +#if GCC_VERSION < 50500 +#pragma GCC push_options +#pragma GCC optimize("O0") +#endif +#endif struct FilterTransform2X3_qs8 { static void transform( const int8_t* filter_ptr, int16_t* filter_transform_buf, @@ -140,6 +147,12 @@ struct FilterTransform2X3_qs8 { #undef get_v_searal } }; +#if defined(__GNUC__) && !defined(__llvm__) && !defined(_MSC_VER) +#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) +#if GCC_VERSION < 50500 +#pragma GCC pop_options +#endif +#endif struct InputTransform2X3_qs8 { template