From 410e21e88db9d98c8144cd93047e506ecd0b7ab4 Mon Sep 17 00:00:00 2001 From: SiCongLi Date: Fri, 11 Dec 2020 15:07:53 +0000 Subject: Fix baremetal arm_compute_validation build errors * Add -C flag to instruct preprocessor not to strip comments. This is to prevent marker comments like '// fall through' that suppresses certain warnings from being removed. * Fix unused variable warnings. * Add M_PI definition that's missing from certain toolchain standard libraries. Resolves COMPMID-4054 Change-Id: I1d641db668685d4b678f3d0efed84bfe9e630b4b Signed-off-by: SiCongLi Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4692 Reviewed-by: Georgios Pinitas Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- src/core/NEON/NEMath.inl | 6 ++---- src/core/NEON/kernels/NEFFTRadixStageKernel.cpp | 1 + src/core/NEON/kernels/arm_gemm/gemm_qint8.cpp | 4 ++-- src/core/NEON/kernels/arm_gemm/gemm_quint8.cpp | 6 +++--- 4 files changed, 8 insertions(+), 9 deletions(-) (limited to 'src/core/NEON') diff --git a/src/core/NEON/NEMath.inl b/src/core/NEON/NEMath.inl index a1c3d41880..1f5cb56dfc 100644 --- a/src/core/NEON/NEMath.inl +++ b/src/core/NEON/NEMath.inl @@ -21,13 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ +#include "support/ToolchainSupport.h" + #include #include -#ifndef M_PI -#define M_PI (3.14159265358979323846) -#endif // M_PI - namespace arm_compute { /** Exponent polynomial coefficients */ diff --git a/src/core/NEON/kernels/NEFFTRadixStageKernel.cpp b/src/core/NEON/kernels/NEFFTRadixStageKernel.cpp index cb1391ab4e..971d4fdefe 100644 --- a/src/core/NEON/kernels/NEFFTRadixStageKernel.cpp +++ b/src/core/NEON/kernels/NEFFTRadixStageKernel.cpp @@ -32,6 +32,7 @@ #include "src/core/NEON/wrapper/wrapper.h" #include "src/core/helpers/AutoConfiguration.h" #include "src/core/helpers/WindowHelpers.h" +#include "support/ToolchainSupport.h" #include #include diff --git a/src/core/NEON/kernels/arm_gemm/gemm_qint8.cpp b/src/core/NEON/kernels/arm_gemm/gemm_qint8.cpp index 0ffe8080f4..8d9fee6da4 100644 --- a/src/core/NEON/kernels/arm_gemm/gemm_qint8.cpp +++ b/src/core/NEON/kernels/arm_gemm/gemm_qint8.cpp @@ -74,14 +74,14 @@ static const GemmImplementation gemm_qint8_methods { GemmMethod::GEMM_HYBRID, "sve_hybrid_s8qs_dot_6x4VL", - [](const GemmArgs &args, const Requantize32 &qp) { return quant_hybrid_symmetric(qp); }, + [](const GemmArgs &, const Requantize32 &qp) { return quant_hybrid_symmetric(qp); }, nullptr, [](const GemmArgs &args, const Requantize32 &qp) { return new GemmHybridIndirect(args, qp); } }, { GemmMethod::GEMM_HYBRID, "sve_hybrid_s8qa_dot_4x4VL", - [](const GemmArgs &args, const Requantize32 &qp) { return quant_hybrid_asymmetric(qp); }, + [](const GemmArgs &, const Requantize32 &qp) { return quant_hybrid_asymmetric(qp); }, nullptr, [](const GemmArgs &args, const Requantize32 &qp) { return new GemmHybridIndirect(args, qp); } }, diff --git a/src/core/NEON/kernels/arm_gemm/gemm_quint8.cpp b/src/core/NEON/kernels/arm_gemm/gemm_quint8.cpp index 84628c0c48..eead592d1f 100644 --- a/src/core/NEON/kernels/arm_gemm/gemm_quint8.cpp +++ b/src/core/NEON/kernels/arm_gemm/gemm_quint8.cpp @@ -69,15 +69,15 @@ static const GemmImplementation gemm_quint8_meth }, #ifdef SVE2 // Requantizing kernels include some SVE2 only instructions (SQRDMULH, SRSHL) { - GemmMethod::GEMM_HYBRID, + GemmMethod::GEMM_HYBRID, "sve_hybrid_u8qa_dot_4x4VL", - [](const GemmArgs &args, const Requantize32 &qp) { return quant_hybrid_asymmetric(qp); }, + [](const GemmArgs &, const Requantize32 &qp) { return quant_hybrid_asymmetric(qp); }, nullptr, [](const GemmArgs &args, const Requantize32 &qp) { return new GemmHybridIndirect(args, qp); } }, #endif { - GemmMethod::GEMM_HYBRID, + GemmMethod::GEMM_HYBRID, "sve_hybrid_u8u32_dot_6x4VL", nullptr, nullptr, -- cgit v1.2.1