diff options
author | SiCong Li <sicong.li@arm.com> | 2020-12-02 09:43:12 +0000 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2020-12-03 23:22:01 +0000 |
commit | 7b48166b37d30dc0d651e5f366a691b38a0c8006 (patch) | |
tree | 690038c7a3e3c508c346f9a0ac09a8a1a7213273 /src/runtime/NEON/functions/NEGEMMLowpMatrixMultiplyCore.cpp | |
parent | a085a0c91c5b3061e616fa810d81be5798b240d8 (diff) | |
download | ComputeLibrary-7b48166b37d30dc0d651e5f366a691b38a0c8006.tar.gz |
Fix NEGEMMLowpMatrixMultiplyCore nonfused activation
* Include the missing activation info when passing it from
NEGEMMConvolutionLayer to NEGEMMLowpMatrixMultiplyCore
* Fix the logics for running the separate NEActivationLayer when it
cannot be fused into NEGEMMAssemblyDispatch
Resolves COMPMID-4039
Change-Id: Id6b3a698333f278ee65f195853c7d3b5c7adec72
Signed-off-by: SiCong Li <sicong.li@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4638
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/runtime/NEON/functions/NEGEMMLowpMatrixMultiplyCore.cpp')
-rw-r--r-- | src/runtime/NEON/functions/NEGEMMLowpMatrixMultiplyCore.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/runtime/NEON/functions/NEGEMMLowpMatrixMultiplyCore.cpp b/src/runtime/NEON/functions/NEGEMMLowpMatrixMultiplyCore.cpp index d8f9d08c13..50c7fe4c66 100644 --- a/src/runtime/NEON/functions/NEGEMMLowpMatrixMultiplyCore.cpp +++ b/src/runtime/NEON/functions/NEGEMMLowpMatrixMultiplyCore.cpp @@ -257,14 +257,13 @@ void NEGEMMLowpMatrixMultiplyCore::configure(const ITensor *a, const ITensor *b, _offset_contribution_kernel = std::make_unique<NEGEMMLowpOffsetContributionKernel>(); _offset_contribution_kernel->configure(output, _a_offset == 0 ? nullptr : &_vector_sum_col, _b_offset == 0 ? nullptr : &_vector_sum_row, a_to_use->info()->dimension(0), _a_offset, _b_offset); } - - // Configure activation - const ActivationLayerInfo &activation = gemm_info.activation_info(); - _run_activation = activation.enabled() && (!_assembly_path || (_assembly_path && !NEGEMMAssemblyDispatch::is_activation_supported(activation))); - if(_run_activation) - { - _activation_func.configure(output, nullptr, activation); - } + } + // Configure activation + const ActivationLayerInfo &activation = gemm_info.activation_info(); + _run_activation = activation.enabled() && (!_assembly_path || !NEGEMMAssemblyDispatch::is_activation_supported(activation)); + if(_run_activation) + { + _activation_func.configure(output, nullptr, activation); } // Allocate tensors @@ -564,7 +563,7 @@ void NEGEMMLowpMatrixMultiplyCore::run() } // Run fused activation unless already run in the fused assembly - if(_run_activation && !_fused_assembly_path) + if(_run_activation) { _activation_func.run(); } |