diff --git a/src/plugins/intel_cpu/src/nodes/executors/acl/acl_deconv.cpp b/src/plugins/intel_cpu/src/nodes/executors/acl/acl_deconv.cpp index fa40b3a27322c2..ada33e055777c0 100644 --- a/src/plugins/intel_cpu/src/nodes/executors/acl/acl_deconv.cpp +++ b/src/plugins/intel_cpu/src/nodes/executors/acl/acl_deconv.cpp @@ -91,13 +91,23 @@ bool AclDeconvExecutor::init(const DeconvAttrs& deconvAttrs, return false; } + lifetime_mgr = std::make_shared(); + pool_mgr = std::make_shared(); + aclMemoryManager = std::make_shared(lifetime_mgr, pool_mgr); + aclMemoryGroup = std::make_shared(aclMemoryManager); + + aclMemoryGroup->manage(&srcTensor); + aclMemoryGroup->manage(&weiTensor); + aclMemoryGroup->manage(&dstTensor); srcTensor.allocator()->init(srcTensorInfo); weiTensor.allocator()->init(weiTensorInfo); dstTensor.allocator()->init(dstTensorInfo); - if (deconvAttrs.withBiasesParam) + if (deconvAttrs.withBiasesParam) { + aclMemoryGroup->manage(&biasTensor); biasTensor.allocator()->init(biasTensorInfo); + } - deconv = std::make_unique(); + deconv = std::make_unique(aclMemoryManager); configureThreadSafe([&] { deconv->configure(&srcTensor, &weiTensor, deconvAttrs.withBiasesParam ? &biasTensor : nullptr, &dstTensor, deconv_info, deconvAttrs.aclFastMath); }); @@ -185,6 +195,11 @@ void AclDeconvExecutor::exec(const std::vector& src, const std::vect dstTensor.allocator()->import_memory(dst[0]->getData()); if (deconvAttrs.withBiasesParam) biasTensor.allocator()->import_memory(src[2]->getData()); + + arm_compute::Allocator allocator{}; + aclMemoryManager->populate(allocator, 1); + aclMemoryGroup->acquire(); + deconv->run(); srcTensor.allocator()->free(); @@ -192,6 +207,9 @@ void AclDeconvExecutor::exec(const std::vector& src, const std::vect weiTensor.allocator()->free(); if (deconvAttrs.withBiasesParam) biasTensor.allocator()->free(); + + aclMemoryGroup->release(); + aclMemoryManager->clear(); } bool AclDeconvExecutorBuilder::customIsSupported(const DeconvAttrs &deconvAttrs, diff --git a/src/plugins/intel_cpu/src/nodes/executors/acl/acl_deconv.hpp b/src/plugins/intel_cpu/src/nodes/executors/acl/acl_deconv.hpp index ad743690f45c52..6d4750319c0559 100644 --- a/src/plugins/intel_cpu/src/nodes/executors/acl/acl_deconv.hpp +++ b/src/plugins/intel_cpu/src/nodes/executors/acl/acl_deconv.hpp @@ -6,6 +6,10 @@ #include "nodes/executors/deconv.hpp" #include "arm_compute/runtime/NEON/NEFunctions.h" +#include "arm_compute/runtime/PoolManager.h" +#include "arm_compute/runtime/MemoryManagerOnDemand.h" +#include "arm_compute/runtime/BlobLifetimeManager.h" +#include "arm_compute/runtime/Allocator.h" #include "utils/debug_capabilities.h" #include "acl_utils.hpp" #include "src/cpu/CpuTypes.h" @@ -48,6 +52,10 @@ class AclDeconvExecutor : public DeconvExecutor { arm_compute::Tensor weiTensor; arm_compute::Tensor biasTensor; arm_compute::Tensor dstTensor; + std::shared_ptr lifetime_mgr = nullptr; + std::shared_ptr pool_mgr = nullptr; + std::shared_ptr aclMemoryManager = nullptr; + std::shared_ptr aclMemoryGroup = nullptr; std::unique_ptr deconv = nullptr; }; diff --git a/src/plugins/intel_cpu/thirdparty/ComputeLibrary b/src/plugins/intel_cpu/thirdparty/ComputeLibrary index c61bd3387403b7..f44f09dfd263c2 160000 --- a/src/plugins/intel_cpu/thirdparty/ComputeLibrary +++ b/src/plugins/intel_cpu/thirdparty/ComputeLibrary @@ -1 +1 @@ -Subproject commit c61bd3387403b76d618915ccebf5e9585f52a071 +Subproject commit f44f09dfd263c2bb0238f4323e366a210e9d4aae