From fa1db17a9ad7d35a77e76bf9c61ebc8756149ab2 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Thu, 12 Aug 2021 06:28:09 +0100 Subject: 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 Change-Id: I53449c377fb1cfccdf5e6f9505d963518748c318 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/c/VisualCompute/ComputeLibrary/+/349345 Tested-by: bsgcomp Reviewed-by: Pablo Tello Comments-Addressed: bsgcomp Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6092 Tested-by: Arm Jenkins Reviewed-by: Gian Marco Iodice Reviewed-by: SiCong Li Comments-Addressed: Arm Jenkins --- src/runtime/cpu/operators/internal/CpuGemmAssemblyDispatch.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/runtime/cpu/operators/internal/CpuGemmAssemblyDispatch.cpp') diff --git a/src/runtime/cpu/operators/internal/CpuGemmAssemblyDispatch.cpp b/src/runtime/cpu/operators/internal/CpuGemmAssemblyDispatch.cpp index bbbd5ac458..9786161dee 100644 --- a/src/runtime/cpu/operators/internal/CpuGemmAssemblyDispatch.cpp +++ b/src/runtime/cpu/operators/internal/CpuGemmAssemblyDispatch.cpp @@ -424,6 +424,8 @@ void Fallback::prepare(ITensorPack &tensors) CpuAuxTensorHandler pretranspose(offset_int_vec(Pretranspose), _pretranspose_info, tensors, false); ARM_COMPUTE_ERROR_ON(pretranspose.get()->buffer() == nullptr); _gemm_kernel_asm->pretranspose_B_array(pretranspose.get()->buffer(), in1_ptr, ldb, multi_stride_b); + + b->mark_as_unused(); } if(_gemm_info.method == AsmConvMethod::Indirect) -- cgit v1.2.1