aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/cpu/operators/CpuDepthwiseConvolution.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/cpu/operators/CpuDepthwiseConvolution.cpp')
-rw-r--r--src/runtime/cpu/operators/CpuDepthwiseConvolution.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/runtime/cpu/operators/CpuDepthwiseConvolution.cpp b/src/runtime/cpu/operators/CpuDepthwiseConvolution.cpp
index 183a2af0cd..6d097280e0 100644
--- a/src/runtime/cpu/operators/CpuDepthwiseConvolution.cpp
+++ b/src/runtime/cpu/operators/CpuDepthwiseConvolution.cpp
@@ -170,7 +170,7 @@ void CpuDepthwiseConvolution::CpuDepthwiseConvolutionOptimizedInternal::run(ITen
if(_permute)
{
ITensorPack pack;
- auto src = tensors.get_tensor(TensorType::ACL_SRC_0);
+ auto src = tensors.get_const_tensor(TensorType::ACL_SRC_0);
auto src_perm = tensors.get_tensor(TensorType::ACL_INT_0);
pack.add_tensor(TensorType::ACL_SRC, src);
pack.add_tensor(TensorType::ACL_DST, src_perm);
@@ -247,6 +247,8 @@ void CpuDepthwiseConvolution::CpuDepthwiseConvolutionOptimizedInternal::prepare(
pack.add_tensor(TensorType::ACL_DST, permuted_weights);
_permute_weights->run(pack);
+ weights->mark_as_unused();
+
ITensorPack pack_opt;
pack_opt.add_const_tensor(TensorType::ACL_SRC_1, permuted_weights);
pack_opt.add_tensor(TensorType::ACL_SRC_2, bias);