aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/cpu/operators/CpuFullyConnected.h
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2021-08-12 06:28:09 +0100
committerSiCong Li <sicong.li@arm.com>2021-08-12 14:23:46 +0000
commitfa1db17a9ad7d35a77e76bf9c61ebc8756149ab2 (patch)
tree2b6a64b43afea654f423c64ac96a21b9d31a45c2 /src/runtime/cpu/operators/CpuFullyConnected.h
parentd761a3e3c153083cd3843fe686f27e3438c87d1c (diff)
downloadComputeLibrary-fa1db17a9ad7d35a77e76bf9c61ebc8756149ab2.tar.gz
Ensure that correct transformed matrices are used in CpuFullyConnected
Execution pack of CpuFullyConnected was altered explicitly with local objects that were getting out of scope. Leading to incorrect results or memory related issues. Track transformed weights and register the weights matrix explicitly during execution honoring the object lifetime scope. Resolves: COMPMID-4762, COMPMID-4764 Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Change-Id: I53449c377fb1cfccdf5e6f9505d963518748c318 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/c/VisualCompute/ComputeLibrary/+/349345 Tested-by: bsgcomp <bsgcomp@arm.com> Reviewed-by: Pablo Tello <pablo.tello@arm.com> Comments-Addressed: bsgcomp <bsgcomp@arm.com> Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6092 Tested-by: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Reviewed-by: SiCong Li <sicong.li@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/runtime/cpu/operators/CpuFullyConnected.h')
-rw-r--r--src/runtime/cpu/operators/CpuFullyConnected.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/runtime/cpu/operators/CpuFullyConnected.h b/src/runtime/cpu/operators/CpuFullyConnected.h
index 954a7b7ffc..498ceae68d 100644
--- a/src/runtime/cpu/operators/CpuFullyConnected.h
+++ b/src/runtime/cpu/operators/CpuFullyConnected.h
@@ -128,14 +128,16 @@ private:
std::unique_ptr<CpuGemm> _mm_gemm;
std::unique_ptr<CpuGemmLowpMatrixMultiplyCore> _mm_gemmlowp;
- TensorInfo _flattened_src;
- TensorInfo _converted_weights;
- TensorInfo _reshaped_weights;
+ TensorInfo _flattened_src;
+ TensorInfo _converted_weights;
+ TensorInfo _reshaped_weights;
+ TensorInfo _trans_weights;
+ AuxTensorIdx _trans_weights_idx;
experimental::MemoryRequirements _aux_mem;
- bool _are_weights_converted;
- bool _are_weights_reshaped;
+ bool _needs_weights_conversion;
+ bool _needs_weights_reshape;
bool _is_fc_after_conv;
bool _is_quantized_asymmetric;
bool _is_prepared;