From 97b3f11a1655c05bedaf378f85f94cdccb1536ba Mon Sep 17 00:00:00 2001 From: Sheri Zhang Date: Mon, 4 Jan 2021 17:14:23 +0000 Subject: COMPMID-4076: ArmNN unittest failure with memory access voilation in FuseReLUIntoBatchNormFloat32CpuAccTest 1. Fix fusable and non-fusable configuration issue 2. Fix FP16 issue Signed-off-by: Sheri Zhang Change-Id: I6d0eacca7ac437f236ad403ddb283c10c8f419a6 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4761 Reviewed-by: Pablo Marquez Tello Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- src/core/NEON/kernels/batchnormalization/impl/NEON/fp32.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/core/NEON/kernels/batchnormalization/impl/NEON/fp32.cpp') diff --git a/src/core/NEON/kernels/batchnormalization/impl/NEON/fp32.cpp b/src/core/NEON/kernels/batchnormalization/impl/NEON/fp32.cpp index a24f7f624a..5b375e5d4d 100644 --- a/src/core/NEON/kernels/batchnormalization/impl/NEON/fp32.cpp +++ b/src/core/NEON/kernels/batchnormalization/impl/NEON/fp32.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Arm Limited. + * Copyright (c) 2020-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -137,7 +137,14 @@ namespace cpu void fp32_neon_batch_normalization(ITensor *src, ITensor *dst, const ITensor *mean, const ITensor *var, const ITensor *beta, const ITensor *gamma, float epsilon, ActivationLayerInfo &act_info, const Window &window) { - fused_map[act_info.activation()](src, dst, mean, var, beta, gamma, epsilon, act_info, window); + if(act_info.enabled()) + { + fused_map[act_info.activation()](src, dst, mean, var, beta, gamma, epsilon, act_info, window); + } + else + { + batch_normalization>(src, dst, mean, var, beta, gamma, epsilon, act_info, window); + } } } // namespace cpu } // namespace arm_compute -- cgit v1.2.1